gitmyhub

cadence

Go ★ 9.3k updated 1d ago

Cadence is a distributed, scalable, durable, and highly available orchestration engine to execute asynchronous long-running business logic in a scalable and resilient way.

An open-source platform for running long-running business processes reliably across distributed systems, automatically handling retries, state checkpointing, and recovery from crashes, originally built at Uber.

GoJavaPythonRubyCassandraMySQLPostgreSQLKafkasetup: hardcomplexity 4/5

Cadence is an open-source platform for running long-running, multi-step business processes reliably across distributed systems. It was originally developed at Uber and open-sourced in 2017. The core idea is that you write your business logic as a "workflow," which is a sequence of steps that can take seconds or months to complete, and Cadence makes sure those steps execute correctly even if servers crash, network connections drop, or services become temporarily unavailable.

Without a system like Cadence, developers typically handle these long-running processes by manually writing retry logic, checkpointing state to databases, and building recovery mechanisms. Cadence handles all of that automatically. Your workflow code reads as if it runs straight through from start to finish, but Cadence durably records the progress at each step, so if something fails midway the execution resumes from where it left off rather than starting over.

The backend is made up of multiple services that run together. For storage it requires a database, either Cassandra, MySQL, or PostgreSQL. For search and visibility features, Kafka and Elasticsearch can optionally be added. The quickest way to start locally is through Docker Compose, which spins up all the required components at once. A web UI is included and shows the history and status of every workflow execution.

Developers write their workflow logic using one of the client libraries. Official SDKs exist for Go and Java. Community-maintained SDKs for Python and Ruby are also available. Once a workflow is defined, it can be started from the command line or through the API. The CLI tool handles common operations like triggering workflows, inspecting their state, and managing the server configuration. Kubernetes deployment is supported through an official Helm chart.

Cadence is licensed under Apache 2.0 and is maintained as an open-source project with an active community on GitHub and Slack.

Where it fits