How does Apache DolphinScheduler solve the troubles of data warehouse scheduling in ITcast?

At the Apache DolphinScheduler&Hudi joint meetup in July, Kong Shuai, a senior researcher of Chuanzhi Education, shared the practice of Apache DolphinScheduler in ITcast. Before we dive into the…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Implementing Sagas using AWS Step Functions

Distributed systems are naturally complex. Part I of this SSENSE-TECH series demonstrated how transactions that were taken for granted, require a specific approach to be achieved in such systems.

I presented some of the challenges associated, advocated the use of Sagas to help us to bring back transaction support, and presented the two flavors of Sagas: Choreographed and Orchestrated.

In this article, I will defend the case on why AWS Step Functions (SF) can be a good option and introduce how to implement our sample domain using it. So let’s begin by taking a closer look at the inner workings of an orchestrated Saga.

At the heart of the orchestrated Saga is the SEC (Saga Execution Coordinator), which like the name implies, is responsible for coordinating the execution of the actions involved to deliver the expected functionality (ex. place an order).

An SEC maintains a definition of which actions should be executed, in which order they will be executed, and the compensating actions in case of failures. This can be represented as an acyclic directed graph (ADG) and implemented using a state machine pattern. Figure 1 represents one simple Saga.

Figure 1. A simple Saga.

The SEC persists the current state and uses that state to determine what to do next when receiving the replies from the commands it sends.

In the example above, the SEC instructs the system to allocate the item, keeps track of this, and upon receiving the response determines whether I ship the item or cancel the order.

Due to its central role, any implementation of an SEC should be:

You should be able to start as many SEC executions as necessary to accommodate the business needs.

Problems will happen and the compute node responsible for the SEC may need to be interrupted (ex. hardware problems, maintenance). You want to be able to resume from where it stopped without any additional issues.

The implementation must be able to route the replies to previously sent commands to the right SEC instance as…

Add a comment

Related posts:

Tent Functions And Equation Groups

Thanks to a dear reader of mine, I stumbled over tent maps and groups of equations. Although I never got involved in this matter, my curious mind couldn’t just let it slide. So I began reading about…

Storytelling Design in Data Analytics Products

Storytelling has been a buzzword in the data analytics/BI vertical for decades. However, very few products are able to really make a home run in this direction, either due to the lack of focus on the…

What Are The Most Important Things You Should Upgrade In Your House?

There are many house upgrades that you can do in order to improve the quality of your home. Some of them may be more important than others, but they all have the potential to make your house a better…