Cadence Community Spotlight Update - November 2023

Welcome to the latest of our regular monthly Community Spotlight updates that gives you news from in and around the Cadence community! It's been a couple of months since our last update so we have a lot of updates to share with you. Please see below for a roundup of the highlights: Proposal for Cadence Native Authentication Community member Mantas Sidlauskas has drafted a proposal around Cadence native authentication and is asking for community feedback. If you are interested in reviewing the current proposal and providing comments or feedback then please find the proposal details at the link below: Cadence Native Authentication Proposal This is a great example of how we can focus on collaborating together to find a collective solution. A big thank you to Mantas for initiating this work and we hope to see the result ...

Cadence Community Spotlight Update - August 2023

Welcome to the latest of our regular monthly Community Spotlight updates that gives you news from in and around the Cadence community! Please see below for a roundup of the highlights: More Cadence How To's You might have noticed that we have had a few more contributions to our blog from Chris Qin. Chris has been busy sharing insights, and tips on a few important Cadence topics. The objective is to help the community with any potential problems. Here are the latest topics: Bad Practices and Anti-Patterns with Cadence - Part 1 Non-Determistic Errors, Replayers and Shadowers Even if you have not encountered these use cases - it is good to be prepared and have a solution ready.Please take a look and let us have your feedback. Chris is also going to take a look at ...

Non-deterministic errors, replayers and shadowers

It is conceivable that developers constantly update their Cadence workflow code based upon new business use cases and needs. However, the definition of a Cadence workflow must be deterministic because behind the scenes cadence uses event sourcing to construct the workflow state by replaying the historical events stored for this specific workflow. Introducing components that are not compatible with an existing running workflow will yield to non-deterministic errors and sometimes developers find it tricky to debug. Consider the following workflow that executes two activities. func SampleWorkflow(ctx workflow.Context, data string) (string, error) { ao := workflow.ActivityOptions{ ScheduleToStartTimeout: time.Minute, StartToCloseTimeout: time.Minute, } ctx = workflow.WithActivityOptions(ctx, ao) var result1 string err := workflow.ExecuteActivity(ctx, ActivityA, data).Get(ctx, &result1) if err != nil { return "", err } v ...

Cadence non-derministic errors common question Q&A (part 1)

NO. This change will not trigger non-deterministic error. An Activity is the smallest unit of execution for Cadence and what happens inside activities are not recorded as historical events and therefore will not be replayed. In short, this change is deterministic and it is fine to modify logic inside activities. Does changing the workflow definition trigger non-determinstic errors? YES. This is a very typical non-deterministic error. When a new workflow code change is deployed, Cadence will find if it is compatible with Cadence history. Changes to workflow definition will fail the replay process of Cadence as it finds the new workflow definition imcompatible with previous historical events. Here is a list of common workflow definition changes. Changing workflow parameter counts Changing workflow parameter types Changing workflow return types The following changes are not categorized as definition changes and therefore will not trigger non-deterministic ...

Cadence Community Spotlight Update - July 2023

Welcome to the latest of our regular monthly Community Spotlight updates that gives you news from in and around the Cadence community! Please see below for a roundup of the highlights: Getting Started with Cadence Are you new to Cadence and want to understand the basic concepts and architecture? Well we have some great information for you! Community member Chris Qin has written a short blog post that takes you through the the three main components that make up a Cadence application. Please take a look and feel free to give us your comments and feedback. Thanks Chris for sharing your knowledge and helping others to get started. Cadence Go Client v1.0 Released This month saw the release of v1.0 of the Cadence Go Client. Note that the work done on this release was as a result ...