Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Temporal workflow vs Cadence workflow

Tags:

How is temporal.io related to cadenceworkflow.io? What should be used if starting a new project depending on the cadence workflow service?

like image 826
Felix Mamonov Avatar asked Apr 11 '20 13:04

Felix Mamonov


People also ask

What is a temporal workflow?

Temporal is an open source, distributed and scalable workflow orchestration engine capable of running millions of workflows. Workflows can hold state and describe which activities (workflow tasks) should be carried out.

What is Cadence workflow?

Cadence is designed to scale out horizontally to handle millions of concurrent workflows. Cadence provides out-of-the-box asynchronous history event replication that can help you recover from zone failures.

Is Temporal a fork of Cadence?

Temporal is a mature technology, a fork of Uber's Cadence. Temporal is being developed by Temporal Technologies, a startup by the creators of Cadence.

What is Cadence temporal?

Cadence is an open source workflow orchestration service. It is a scalable, fault-tolerant, and developer focused platform that centralizes business logic and allows you to build complex workflows that integrate with your distributed service architecture.


1 Answers

Disclaimer: I'm the original co-founder and tech lead of the Cadence project and currently co-founder/CEO of the Temporal Technologies.

temporal.io is the fork of the Cadence project by the original founders and tech leads of the Cadence project Maxim Fateev and Samar Abbas. The fork is fully open source under the same MIT (with some SDKs under Apache 2.0) license as Cadence. We started Temporal Technologies and received VC funding as we believe that the programming model that we pioneered through AWS Simple Workflow, Durable Task Framework and the Cadence project has potential which goes far beyond a single company. Having a commercial entity to drive the project forward is essential for the longevity of the project.

The temporal.io fork has all the features of Cadence as it constantly merges from it. It also implemented multiple new features.

Here are some of the technical differences between Cadence and Temporal as of initial release of the Temporal fork (expected to reach production status at 05/2020)

All thrift structures are replaced by protobuf ones

All public APIs of Cadence rely on Thrift. Thrift object are also stored in DB in serialized form.

Temporal converted all these structures to Protocol Buffers. This includes objects stored in the DB.

Communication protocol switched from TChannel to gRPC

Cadence relies on TChannel which was TCP based multiplexing protocol which was developed at Uber. TChannel has a lot of limitations like not supporting any security and having a very limited number of language bindings. It is essentially deprecated even at Uber.

Temporal uses gRPC for all interprocess communication.

TLS Support

Cadence doesn't support any communication security as it is a limitation of TChannel.

Temporal has support for mutual TLS and is going to support more advanced authentication and authorization features in the future.

Simplified configuration

Temporal has reworked the service configuration. Some of the most confusing parts of it are removed. For example, the need to configure membership seeds is eliminated. In temporal each host upon startup registers itself with the database and uses the list from the database as the seed list.

Release pipelines

Cadence doesn't test any publicly released artifacts including docker images as its internal release pipeline is ensuring the quality of the internally built artifacts only. It also doesn't perform any release testing for dependencies that are not used within Uber. For example, MySQL integration is not tested beyond rather incomplete unit tests. The same applies to the CLI and other components.

Temporal is making heavy investment into the release process. All the artifacts including a full supported matrix of dependencies are going to be subjected through a full release pipeline which is going to include multi-day stress runs.

The other important part of the release process is the ability to generate patches for production issues. The ability to ensure quality of such patches and produce all the necessary artifacts in a timely manner is important for anyone running Temporal in production.

Payload Metadata

Cadence stores activity inputs and outputs and other payloads as binary blobs without any associated metadata.

Temporal allows associating metadata with every payload. It enables features like dynamically pluggable serialization mechanisms, seamless compression, and encryption.

Failure Propagation

In Cadence activity and workflow failures are modeled as a single binary payload and a string reason field. Only Java client supports chaining exceptions across workflow and activity boundaries. But this chaining relies on fragile GSON serialization and doesn't work with other languages.

Temporal activity and workflow failures are modeled as protobufs and can be chained across components implemented in different SDKs. For example, a single failure trace can contain a chain that is caused by an exception that originates in activity written in Python, propagated through Go child workflow up to Java workflow, and later to the client.

Go SDK

Temporal implemented the following improvements over Cadence Go client:

  • Protobuf & gRPC
  • No global registration of activity and workflow types
  • Ability to register activity structure instance with the worker. It greatly simplifies passing external dependencies to the activities.
  • Workflow and activity interceptors which allow implementing features like configuring timeouts through external config files.
  • Activity and workflow type names do not include package names. This makes code refactoring without breaking changes much simpler.
  • Most of the timeouts which were required by Cadence are optional now.
  • workflow.Await method

Java SDK

Temporal implemented the following improvements over Cadence Java client:

  • Workflow and activity annotations to allow activity and workflow implementation objects to implement non-workflow and activity interfaces. This is important to play nice with AOP frameworks like Spring.
  • Polymorphic workflow and activity interfaces. This allows having a common interface among multiple activity and workflow types.
  • Dynamic registration of signal and query handlers.
  • Workflow and activity interceptors which allow implementing features like configuring timeouts through external config files.
  • Activity and workflow type name generation improved

PHP SDK Cadence doesn't support PHP. Temporal recently released PHP SDK.

Typescript SDK Temporal has released an alpha of Typescript SDK.

We have a lot of other features and client SDKs for other languages planned. You can find us at Temporal Community Forum.

like image 153
Maxim Fateev Avatar answered Sep 24 '22 20:09

Maxim Fateev