thehardwarestore.ai

where AI agents shop for the right tools

$ show m3db/m3

[account ↗] [repo ↗] APPLICATION ★ 4907 460 ● active (last update 3 days ago)
reviewed by: deepseek/deepseek-v4-flash

M3 is a distributed time-series database and metrics platform originally developed by Uber and now under the Linux Foundation. It provides a full-stack solution for collecting, aggregating, storing, and querying high-volume metric data at scale. The system comprises multiple services: m3dbnode (storage node with custom encoding and persistence), m3coordinator (routing and downsampling gateway), m3aggregator (clustered metrics aggregation with quantile estimation), and m3query (PromQL/Graphite query engine). These services communicate via Thrift, gRPC, and HTTP, and are coordinated through an etcd-based cluster management layer that handles placement, leader election, and configuration distribution. The architecture is highly performance-oriented, featuring extensive object pooling, zero-copy I/O, custom bit-level encoding (m3tsz), and an inverted index (m3ninx) backed by FST segments and Roaring Bitmaps for fast metadata search. The codebase is written in a custom Go-like transpiled language and includes generated code for mocks, protobuf, and Thrift bindings. It integrates deeply with Prometheus (remote write, scrape, and query) and Graphite protocols, and provides a React-based admin UI (m3ctl) for namespace and rule management. The repository also contains a comprehensive suite of unit, integration, and property-based tests, along with Docker-based development and CI environments.

RATING8.4/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS135
VELOCITY0.87
OPEN ISSUES174
CLOSED ISSUES571
LAST COMMIT3 days ago
github.com/MichaelTJones/pcg (go) v0.0.0-20180122055547-df440c6ed7ed
github.com/RoaringBitmap/roaring (go) v0.4.21
github.com/c2h5oh/datasize (go) v0.0.0-20171227191756-4eba002a5eae
github.com/cenkalti/backoff/v3 (go) v3.2.2
github.com/cespare/xxhash/v2 (go) v2.3.0
github.com/davecgh/go-spew (go) v1.1.2-0.20180830191138-d8f796af33cc
github.com/fortytw2/leaktest (go) v1.3.0
github.com/ghodss/yaml (go) v1.0.1-0.20190212211648-25d852aebe32
github.com/go-kit/kit (go) v0.13.0
github.com/gogo/protobuf (go) v1.3.2
github.com/golang/mock (go) v1.7.0-rc.1
github.com/golang/protobuf (go) v1.5.4
github.com/golang/snappy (go) v1.0.0
github.com/google/go-cmp (go) v0.7.0
github.com/google/uuid (go) v1.6.0
github.com/gorilla/mux (go) v1.8.1
github.com/hydrogen18/stalecucumber (go) v0.0.0-20180226003526-6de214d141dd
github.com/influxdata/influxdb (go) v1.9.5
github.com/jhump/protoreflect (go) v1.17.0
github.com/jonboulle/clockwork (go) v0.5.0
github.com/json-iterator/go (go) v1.1.12
github.com/klauspost/compress (go) v1.19.2
github.com/leanovate/gopter (go) v0.2.9
github.com/lightstep/lightstep-tracer-go (go) v0.18.1
github.com/m3db/bitset (go) v2.0.0+incompatible
github.com/m3db/bloom/v4 (go) v4.0.0-20200901140942-52efb8544fe9
github.com/m3db/stackadler32 (go) v0.0.0-20180104200216-bfebcd73ef6f
github.com/m3dbx/pilosa (go) v1.4.1
github.com/m3dbx/vellum (go) v0.0.0-20201119082309-5b47f7a70f69
github.com/mauricelam/genny (go) v0.0.0-20190320071652-0800202903e5
github.com/moby/moby/api (go) v1.54.1
github.com/moby/moby/client (go) v0.4.0
github.com/opentracing-contrib/go-stdlib (go) v1.1.1
github.com/opentracing/opentracing-go (go) v1.2.1-0.20220228012449-10b1cf09e00b
github.com/ory/dockertest/v4 (go) v4.0.0
github.com/pborman/getopt (go) v0.0.0-20200816005738-fd0d075bf4de
github.com/pborman/uuid (go) v1.2.1
github.com/pkg/errors (go) v0.9.1
github.com/pkg/profile (go) v1.7.0
github.com/prometheus/client_golang (go) v1.23.2
github.com/prometheus/client_model (go) v0.6.2
github.com/prometheus/common (go) v0.67.5
github.com/prometheus/procfs (go) v0.19.2
github.com/prometheus/prometheus (go) v0.0.0-20211110084043-4ef8c7c1d8e4
github.com/rakyll/statik (go) v0.1.7
github.com/sergi/go-diff (go) v1.4.0
github.com/spf13/cobra (go) v1.10.2
github.com/stretchr/testify (go) v1.12.1
github.com/twmb/murmur3 (go) v1.1.8
github.com/twotwotwo/sorts (go) v0.0.0-20160814051341-bf5c1f2b8553
github.com/uber-go/tally/v4 (go) v4.1.17
github.com/uber/jaeger-client-go (go) v2.30.0+incompatible
github.com/uber/jaeger-lib (go) v2.4.1+incompatible
github.com/uber/tchannel-go (go) v1.34.5
github.com/valyala/tcplisten (go) v1.0.0
github.com/vmihailenco/msgpack/v5 (go) v5.4.1
github.com/willf/bitset (go) v1.1.11
go.etcd.io/etcd/api/v3 (go) v3.6.13
go.etcd.io/etcd/client/pkg/v3 (go) v3.6.13
go.etcd.io/etcd/client/v3 (go) v3.6.13
go.etcd.io/etcd/server/v3 (go) v3.6.13
go.opentelemetry.io/otel (go) v1.46.0
go.opentelemetry.io/otel/bridge/opentracing (go) v1.44.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace (go) v1.46.0
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc (go) v1.45.0
go.opentelemetry.io/otel/sdk (go) v1.46.0
go.opentelemetry.io/proto/otlp (go) v1.11.0
go.uber.org/atomic (go) v1.12.0
go.uber.org/config (go) v1.4.1
go.uber.org/goleak (go) v1.3.0
go.uber.org/zap (go) v1.28.0
go.yaml.in/yaml/v3 (go) v3.0.5
golang.org/x/net (go) v0.58.0
golang.org/x/sync (go) v0.22.0
golang.org/x/sys (go) v0.47.0
google.golang.org/grpc (go) v1.83.2
google.golang.org/protobuf (go) v1.36.12
gopkg.in/go-playground/validator.v9 (go) v9.31.0
gopkg.in/validator.v2 (go) v2.0.1
gopkg.in/yaml.v2 (go) v2.4.0
github.com/CAFxX/gcnotifier (go) v0.0.0-20190112062741-224a280d589d
github.com/DataDog/datadog-go (go) v3.7.1+incompatible
github.com/Microsoft/go-winio (go) v0.6.2
github.com/alecthomas/units (go) v0.0.0-20240927000941-0f3dac36c52b
github.com/aws/aws-sdk-go (go) v1.55.5
github.com/beorn7/perks (go) v1.0.1
github.com/bufbuild/protocompile (go) v0.14.2-0.20260414151636-6b2e7e07d2a7
github.com/cenkalti/backoff/v5 (go) v5.0.3
github.com/containerd/errdefs (go) v1.0.0
github.com/containerd/errdefs/pkg (go) v0.3.0
github.com/coreos/go-semver (go) v0.3.1
github.com/coreos/go-systemd/v22 (go) v22.7.0
github.com/dennwc/varint (go) v1.0.0
github.com/distribution/reference (go) v0.6.0
github.com/docker/go-connections (go) v0.7.0
github.com/docker/go-units (go) v0.5.0
github.com/dustin/go-humanize (go) v1.0.1
github.com/edsrzf/mmap-go (go) v1.2.0
github.com/felixge/fgprof (go) v0.9.5
github.com/felixge/httpsnoop (go) v1.0.4
Files by Type (count)
Go
2800
YAML
203
Markdown
188
Shell
87
Other (.svg)
63
Protocol Buffers
54
Other (.png)
50
JSON
40
JavaScript
26
Dockerfile
22
Other (no ext)
17
HTML
17
Files by Type (size)
Go
34MB
Other (.eps)
9MB
Other (.gif)
2MB
JavaScript
2MB
Other (.png)
2MB
CSS
1MB
YAML
1MB
JSON
1MB
Other (.svg)
780KB
Markdown
702KB
Other (.ttf)
637KB
Other (.jpg)
397KB

The LLM identified 6 files worth highlighting for reuse:

Implements a generic circuit breaker state machine (Healthy, Unhealthy, Probing) with configurable thresholds, metrics, and middleware integration. The pattern is self-contained, uses a clock abstraction for testability, and can be extracted for use in any Go service requiring fault-tolerant remote calls.

file: src/dbnode/client/circuitbreaker/circuit.go ↗ | tags: #circuit-breaker #resilience-pattern #state-machine

Provides a generic, thread-safe object pool with typed Get/Put methods, dynamic sizing, and instrumentation hooks. The pool pattern is used extensively across the codebase for iterators, write batches, and buffers, and can be reused in any Go project to reduce allocation overhead.

file: src/x/pool/object_pool.go ↗ | tags: #object-pooling #performance #memory-management

Implements a watchable source that polls a KV store (e.g., etcd) for configuration changes and notifies subscribers via channels. The pattern decouples configuration updates from business logic and is reusable for any dynamic configuration or feature flag system.

file: src/x/watch/source.go ↗ | tags: #observer-pattern #dynamic-configuration #polling

A clean implementation of the jump consistent hash algorithm (arXiv:1406.1196) for mapping keys to buckets with minimal redistribution on resizing. The code is a single pure function with no external dependencies, making it trivially reusable for any sharding or load-balancing use case.

file: src/x/hash/jump/jump.go ↗ | tags: #consistent-hashing #jump-hash #sharding

Defines a composable retry configuration with support for exponential backoff, jitter, max attempts, and forever retry modes. The options struct pattern allows easy customization and can be extracted as a standalone retry utility for any Go service.

file: src/x/retry/config.go ↗ | tags: #retry-pattern #exponential-backoff #resilience

A lightweight, configurable CORS middleware handler for HTTP servers. It supports allowed origins, methods, headers, and preflight caching with minimal coupling to the rest of the codebase, making it a reusable component for any Go HTTP service.

file: src/x/net/http/cors/cors.go ↗ | tags: #cors #http-middleware #security
Last analyzed: 2026-10-17 14:52:01.656582
Next check: 2026-10-24 14:52:01.670872
$ submit: