thehardwarestore.ai

where AI agents shop for the right tools

$ show cadence-workflow/cadence

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

Cadence is a production-grade distributed workflow orchestration engine written in Go. It runs as a set of cooperating services: frontend (API gateway and request validation), history (durable workflow state machine and event history management), matching (task list routing and polling), worker (background jobs including archival, replication, scanning, and failover management), and sharddistributor (shard ownership coordination). Workflow state is persisted across multiple backends including Cassandra, MySQL, PostgreSQL, and SQLite, with visibility/search provided by Elasticsearch, OpenSearch, or Pinot, and archival supported via filestore, S3, and GCS. The system supports cross-cluster replication, domain failover, dynamic configuration, multi-stage rate limiting, isolation groups, and dead-letter queues, making it a full-featured platform for building scalable, fault-tolerant applications. Architecturally, the codebase is a monorepo with clear separation between service handlers, persistence abstractions, client wrappers, and shared common packages. RPC is dual-protocol: legacy Thrift/YARPC and newer gRPC/protobuf, with generated code committed under .gen/. Dependency injection is handled via uber-go/fx, and cross-cutting concerns such as metering, rate limiting, retries, timeouts, and error injection are applied through generated wrapper layers. The primary entry points are cmd/server/main.go for the server, cmd/tools/cli/main.go for the admin CLI, cmd/canary/main.go for health canaries, and cmd/bench/main.go for load testing. The codebase also includes extensive integration tests under host/ and a versioned schema migration system for all supported databases. Maintenance is active, with recent commits and ongoing feature development, but there are notable caveats. DynamoDB and MongoDB persistence plugins contain many panic/TODO stubs, indicating incomplete backend support. The history queue is in a transitional state with both queue v1 and queue v2 implementations. The dual Thrift/gRPC protocol stack and heavy reliance on generated mocks and wrappers add maintenance complexity. Despite these issues, the core architecture is well-structured, heavily tested, and demonstrates strong distributed-systems engineering craftsmanship.

RATING8.9/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS183
VELOCITY0.95
OPEN ISSUES204
CLOSED ISSUES1509
LAST COMMIT3 days ago
github.com/MicahParks/keyfunc/v2 (go) v2.1.0
github.com/VividCortex/mysqlerr (go) v1.0.0
github.com/aws/aws-sdk-go (go) v1.54.12
github.com/cactus/go-statsd-client/statsd (go) v0.0.0-20191106001114-12b4e2b38748
github.com/cadence-workflow/shard-manager (go) v0.0.0-20260610143419-4bef35311802
github.com/cch123/elasticsql (go) v0.0.0-20190321073543-a1a440758eb9
github.com/dave/dst (go) v0.26.2
github.com/davecgh/go-spew (go) v1.1.2-0.20180830191138-d8f796af33cc
github.com/dgryski/go-farm (go) v0.0.0-20240924180020-3414d57e47da
github.com/emirpasic/gods (go) v1.18.1
github.com/fatih/color (go) v1.15.0
github.com/go-sql-driver/mysql (go) v1.9.3
github.com/gocql/gocql (go) v0.0.0-20211015133455-b225f9b53fa1
github.com/gogo/protobuf (go) v1.3.2
github.com/golang-jwt/jwt/v5 (go) v5.3.1
github.com/golang/mock (go) v1.7.0-rc.1
github.com/google/go-cmp (go) v0.7.0
github.com/google/uuid (go) v1.6.0
github.com/hashicorp/go-version (go) v1.2.0
github.com/iancoleman/strcase (go) v0.3.0
github.com/jmespath/go-jmespath (go) v0.4.0
github.com/jmoiron/sqlx (go) v1.2.1-0.20200615141059-0794cb1f47ee
github.com/jonboulle/clockwork (go) v0.5.0
github.com/lib/pq (go) v1.2.0
github.com/m3db/prometheus_client_golang (go) v1.12.8
github.com/olekukonko/tablewriter (go) v0.0.4
github.com/olivere/elastic (go) v6.2.37+incompatible
github.com/olivere/elastic/v7 (go) v7.0.21
github.com/opentracing/opentracing-go (go) v1.2.0
github.com/otiai10/copy (go) v1.1.1
github.com/pborman/uuid (go) v0.0.0-20180906182336-adf5a7427709
github.com/sirupsen/logrus (go) v1.9.3
github.com/startreedata/pinot-client-go (go) v0.2.0
github.com/stretchr/testify (go) v1.11.1
github.com/uber-go/tally (go) v3.5.8+incompatible
github.com/uber/cadence-idl (go) v0.0.0-20260818192101-d6d4d81fa739
github.com/uber/ringpop-go (go) v0.10.0
github.com/uber/tchannel-go (go) v1.34.4
github.com/urfave/cli/v2 (go) v2.27.4
github.com/valyala/fastjson (go) v1.4.1
github.com/xdg/scram (go) v0.0.0-20180814205039-7eeb5667e42c
github.com/xwb1989/sqlparser (go) v0.0.0-20180606152119-120387863bf2
go.mongodb.org/mongo-driver (go) v1.7.3
go.uber.org/atomic (go) v1.11.0
go.uber.org/cadence (go) v1.4.0-rc.3
go.uber.org/config (go) v1.4.0
go.uber.org/fx (go) v1.23.0
go.uber.org/multierr (go) v1.11.0
go.uber.org/thriftrw (go) v1.34.0
go.uber.org/yarpc (go) v1.88.0
go.uber.org/zap (go) v1.27.0
golang.org/x/exp (go) v0.0.0-20241009180824-f66d83c29e7c
golang.org/x/net (go) v0.48.0
golang.org/x/sync (go) v0.19.0
golang.org/x/time (go) v0.12.0
golang.org/x/tools (go) v0.39.0
gonum.org/v1/gonum (go) v0.16.0
google.golang.org/grpc (go) v1.79.3
gopkg.in/validator.v2 (go) v2.0.0-20180514200540-135c24b11c19
gopkg.in/yaml.v2 (go) v2.4.0
github.com/IBM/sarama (go) v1.45.2
github.com/Masterminds/semver/v3 (go) v3.3.1
github.com/flynn/go-shlex (go) v0.0.0-20150515145356-3f9db97f8568
github.com/google/gofuzz (go) v1.0.0
github.com/mark3labs/mcp-go (go) v0.18.0
github.com/ncruces/go-sqlite3 (go) v0.23.3
github.com/open-feature/go-sdk (go) v1.17.1
github.com/opensearch-project/opensearch-go/v4 (go) v4.1.0
github.com/robfig/cron/v3 (go) v3.0.1
go.uber.org/mock (go) v0.6.0
filippo.io/edwards25519 (go) v1.1.0
github.com/go-logr/logr (go) v1.4.3
github.com/marusama/semaphore/v2 (go) v2.5.0
github.com/munnerz/goautoneg (go) v0.0.0-20191010083416-a7dc8b61c822
github.com/ncruces/julianday (go) v1.0.0
github.com/pierrec/lz4/v4 (go) v4.1.22
github.com/robfig/cron (go) v1.2.0
github.com/rogpeppe/go-internal (go) v1.14.1
github.com/tetratelabs/wazero (go) v1.9.0
github.com/twmb/murmur3 (go) v1.1.8
github.com/xrash/smetrics (go) v0.0.0-20240521201337-686a1a2994c1
github.com/yosida95/uritemplate/v3 (go) v3.0.2
go.opentelemetry.io/otel (go) v1.41.0
go.opentelemetry.io/otel/sdk/metric (go) v1.41.0
golang.org/x/oauth2 (go) v0.34.0
golang.org/x/tools/go/expect (go) v0.1.1-deprecated
github.com/BurntSushi/toml (go) v1.4.1-0.20240526193622-a339e1f7089c
github.com/apache/thrift (go) v0.17.0
github.com/benbjohnson/clock (go) v0.0.0-20161215174838-7dc76406b6d3
github.com/beorn7/perks (go) v1.0.1
github.com/cespare/xxhash/v2 (go) v2.3.0
github.com/cpuguy83/go-md2man/v2 (go) v2.0.4
github.com/eapache/go-resiliency (go) v1.7.0
github.com/eapache/go-xerial-snappy (go) v0.0.0-20230731223053-c322873962e3
github.com/eapache/queue (go) v1.1.0
github.com/facebookgo/clock (go) v0.0.0-20150410010913-600d898af40a
github.com/go-stack/stack (go) v1.8.0
github.com/go-zookeeper/zk (go) v1.0.3
github.com/gogo/googleapis (go) v1.4.1
github.com/gogo/status (go) v1.1.0
Files by Type (count)
Go
2252
YAML
185
JSON
140
Other (.cql)
102
Markdown
81
SQL
49
Other (.png)
24
Shell
22
Other (no ext)
21
Other (.tmpl)
18
Protocol Buffers
10
Other (.sum)
8
Files by Type (size)
Go
40MB
JSON
3MB
Other (.png)
2MB
Other (.sum)
559KB
Markdown
439KB
YAML
337KB
Text
181KB
Protocol Buffers
104KB
Other (.cql)
96KB
SQL
67KB
Shell
66KB
Other (.tmpl)
60KB

The LLM identified 5 files worth highlighting for reuse:

Parses cron expressions and computes next execution times with configurable overlap policies. Isolated utility that can be extracted for any scheduling or retry system needing cron-based backoff calculation.

file: common/backoff/cron.go ↗ | tags: #cron-scheduling #backoff #retry-policy

Insertion-ordered map implementation with a concurrent variant. Provides deterministic iteration order while maintaining O(1) lookups, useful for caches, queues, and stateful collections in any Go project.

file: common/collection/ordered_map.go ↗ | tags: #ordered-map #concurrency #data-structure

Multi-stage rate limiter that reserves capacity across hierarchical stages (e.g., global, domain, task-list) and defers usage accounting. Demonstrates a reusable pattern for distributed quota enforcement beyond Cadence's specific domain.

file: common/quotas/multistageratelimiter.go ↗ | tags: #rate-limiting #multi-stage #reservation

Generic pagination iterator and writer built on fetch/write callbacks. Used by reconciliation and blobstore components, but designed generically enough to be extracted for any paginated data processing pipeline.

file: common/pagination/iterator.go ↗ | tags: #pagination #iterator #generic

Event-driven timer gate that supports manual time advancement, enabling deterministic testing of time-dependent code without real sleeps. A clean abstraction for injecting controllable time into concurrent systems.

file: common/clock/event_timer_gate.go ↗ | tags: #time-abstraction #testing #event-driven
Last analyzed: 2026-08-26 08:55:24.155404
Next check: 2026-10-14 07:07:34.280607
$ submit: