MCPcopy Index your code
hub / github.com/cadence-workflow/cadence

github.com/cadence-workflow/cadence @v1.4.1 sqlite

repository ↗ · DeepWiki ↗ · release v1.4.1 ↗
38,200 symbols 204,705 edges 2,060 files 16,370 documented · 43%
README

Cadence

Build Status Coverage Slack Status Github release License

Cadence Workflow is an open-source platform since 2017 for building and running scalable, fault-tolerant, and long-running workflows. This repository contains the core orchestration engine and tools including CLI, schema managment, benchmark and canary.

Getting Started

Cadence backend consists of multiple services, a database (Cassandra/MySQL/PostgreSQL) and optionally Kafka+Elasticsearch. As a user, you need a worker which contains your workflow implementation. Once you have Cadence backend and worker(s) running, you can trigger workflows by using SDKs or via CLI.

  1. Start cadence backend components locally
docker compose -f docker/docker-compose.yml up
  1. Run the Samples

Try out the sample recipes for Go or Java.

  1. Visit UI

Visit http://localhost:8088 to check workflow histories and detailed traces.

Kubernetes Deployment

For a guided Kubernetes installation experience, KubeStellar Console provides a step-by-step mission that deploys Cadence using the official Helm chart from cadence-charts. The mission includes pre-flight checks, validation, troubleshooting, and rollback support.

Client Libraries

You can implement your workflows with one of our client libraries: - Official Cadence Go SDK - Official Cadence Java SDK There are also unofficial Python and Ruby SDKs developed by the community.

You can also use iWF as a DSL framework on top of Cadence.

CLI

Cadence CLI can be used to operate workflows, tasklist, domain and even the clusters.

You can use the following ways to install Cadence CLI: * Use brew to install CLI: brew install cadence-workflow * Follow the instructions if you need to install older versions of CLI via homebrew. Usually this is only needed when you are running a server of a too old version. * Use docker image for CLI: docker run --rm ubercadence/cli:<releaseVersion> or docker run --rm ubercadence/cli:master . Be sure to update your image when you want to try new features: docker pull ubercadence/cli:master * Build the CLI binary yourself, check out the repo and run make cadence to build all tools. See CONTRIBUTING for prerequisite of make command. * Build the CLI image yourself, see instructions

Cadence CLI is a powerful tool. The commands are organized by tabs. E.g. workflow->batch->start, or admin->workflow->describe.

Please read the documentation and always try out --help on any tab to learn & explore.

UI

Try out Cadence Web UI to view your workflows on Cadence. (This is already available at localhost:8088 if you run Cadence with docker compose)

Other binaries in this repo

Bench/stress test workflow tools

See bench documentation.

Periodical feature health check workflow tools(aka Canary)

See canary documentation.

Schema tools for SQL and Cassandra

The tools are for manual setup or upgrading database schema

The easiest way to get the schema tool is via homebrew.

brew install cadence-workflow also includes cadence-sql-tool and cadence-cassandra-tool. * The schema files are located at /usr/local/etc/cadence/schema/. * To upgrade, make sure you remove the old ElasticSearch schema first: mv /usr/local/etc/cadence/schema/elasticsearch /usr/local/etc/cadence/schema/elasticsearch.old && brew upgrade cadence-workflow. Otherwise ElasticSearch schemas may not be able to get updated. * Follow the instructions if you need to install older versions of schema tools via homebrew. However, easier way is to use new versions of schema tools with old versions of schemas. All you need is to check out the older version of schemas from this repo. Run git checkout v0.21.3 to get the v0.21.3 schemas in the schema folder.

Contributing

We'd love your help in making Cadence great. Please review our contribution guide.

If you'd like to propose a new feature, first join the CNCF Slack workspace in the #cadence-users channel to start a discussion.

Please visit our documentation site for production/cluster setup.

Learning Resources

See Maxim's talk at Data@Scale Conference for an architectural overview of Cadence.

Visit cadenceworkflow.io to learn more about Cadence. Join us in Cadence Documentation project. Feel free to raise an Issue or Pull Request there.

Community

  • Github Discussion
  • Best for Q&A, support/help, general discusion, and annoucement
  • Github Issues
  • Best for reporting bugs and feature requests
  • StackOverflow
  • Best for Q&A and general discusion
  • Slack - Join #cadence-users channel on CNCF Slack
  • Best for contributing/development discussion

Stars over time

Stargazers over time

License

Apache 2.0 License, please see LICENSE for details.

Extension points exported contracts — how you extend this code

WriteRequest (Interface)
WriteRequest is the interface for all types of AddTask* requests [15 implementers]
client/matching/loadbalancer.go
Service (Interface)
Service is the interface which must be implemented by all the services TODO: Service contains many methods that are not [7 …
host/service.go
Runnable (Interface)
Runnable is an interface for anything that exposes a Run method [473 implementers]
canary/canary.go
Lifecycler (Interface)
Lifecycler is the minimal Start/Stop surface AssertInjectsLifecycleDelay drives. Both canary shard processors satisfy it [193 …
service/sharddistributor/canary/testhelper/lifecycletest.go
ClientWorker (Interface)
ClientWorker is a cadence client worker [193 implementers]
service/worker/archiver/client_worker.go
ActivityReplicator (Interface)
ActivityReplicator handles sync activity process [21 implementers]
service/history/ndc/activity_replicator.go
Daemon (Interface)
Daemon is the base interfaces implemented by background tasks within Cadence [193 implementers]
common/daemon.go
PProfInitializer (Interface)
PProfInitializer initialize the pprof based on config [205 implementers]
common/pprof.go

Core symbols most depended-on inside this repo

Return
called by 11206
common/metrics/mocks/Scope.go
Equal
called by 9665
common/persistence/tasks.go
Helper
called by 5272
common/log/interface.go
New
called by 2952
common/mapq/types/consumer.go
Error
called by 2944
common/log/interface.go
Run
called by 2261
bench/lib/types.go
Get
called by 1824
common/archiver/interface.go
Errorf
called by 1790
common/quotas/global/shared/sanity.go

Shape

Method 22,889
Function 11,006
Struct 3,571
Interface 389
TypeAlias 207
FuncType 138

Languages

Go100%

Modules by API surface

common/archiver/s3store/mocks/s3_api_mock.go1,906 symbols
common/types/shared.go1,042 symbols
common/persistence/sql/sqlplugin/interface_mock.go778 symbols
common/types/mapper/thrift/shared.go615 symbols
common/persistence/nosql/nosqlplugin/interfaces_mock.go562 symbols
common/types/mapper/proto/api.go487 symbols
common/types/mapper/proto/api_test.go437 symbols
service/history/execution/mutable_state_mock.go358 symbols
common/persistence/data_manager_interfaces.go328 symbols
common/persistence/tasks.go283 symbols
common/persistence/data_manager_interfaces_mock.go266 symbols
common/types/mapper/thrift/shared_test.go246 symbols

Dependencies from manifests, versioned

cloud.google.com/gov0.115.1 · 1×
cloud.google.com/go/auth/oauth2adaptv0.2.4 · 1×
cloud.google.com/go/compute/metadatav0.9.0 · 1×
cloud.google.com/go/storagev1.43.0 · 1×
github.com/BurntSushi/tomlv1.4.1-0.20240526193 · 1×
github.com/IBM/saramav1.45.2 · 1×
github.com/Masterminds/goutilsv1.1.1 · 1×
github.com/Masterminds/semver/v3v3.2.1 · 1×
github.com/MicahParks/keyfunc/v2v2.1.0 · 1×

Datastores touched

(mysql)Database · 1 repos
(mongodb)Database · 1 repos

For agents

$ claude mcp add cadence \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact