Click or drag to resize

Cadence Upgrade

Temporal as a fork of Uber Cadence and works much the same. There are substantial breaking changes though. This page descibes how the Neon.Temporal .NET client differents from Neon.Cadence and describes what you'll need to do to upgrade.

The Neon.Temporal client has renamed anything called "Cadence" to "Temporal". Here are the major changes:

  1. Neon.Cadence namespace has been renamed to Neon.Temporal.

  2. CadenceClient has been renamed to TemporalClient.

  3. CadenceSettings has been renamed to TemporalSettings.

  4. Some options in TemporalSettings, ActivityOptions, ChildWorkflowOptions, and WorkflowOptions have been renamed for consistency with Temporal conventions.

  5. The Worker lifecycle has changed a bit from Cadence. To start a worker on Cadence, you'd first establish a client connection, then register your workflow and activity implementations with the client and then call the client to start the worker. This model was a bit broken because it implies that there can only be one worker per client instance.

    For Temporal after establishing the client connection, you'll call the client's NewWorkerAsync first, then register your workflow and activity registrations directly with the worker via RegisterAssemblyAsync, RegisterAssemblyActrivitiesAsync, RegisterAssemblyWorkflowsAsync, RegisterActivityAsync, or RegisterWorkflowAsync and then after you've registered everything, you'll call StartAsync to start the worker.

    You may call Dispose to explicitly stop a worker or let the client do this when it is disposed. This behaviour is unchanged from Cadence.

  6. The Cadence ActivityWorkerStartedException and WorkflowWorkerStartedException exceptions have been replaced by InvalidOperationtionException when an attempt to register additional activities or workflows on a worker that has already started.

See Also