Chapter 8. Balancing Orchestration and Choreography
Connected to the rise of microservices are event-driven architectures. In these architectures, services emit events whenever something substantial happens; other services can then react to these events. This is known as choreography.
You might ask yourself why you need to read about this in a book about process automation. It’s such a good question that it will take this full chapter to answer.
This chapter:
-
Introduces events
-
Explains how processes can be implemented solely by choreography and event chains
-
Discusses the trade-offs of event chains when automating processes
-
Describes how orchestration differs from choreography and how both communication styles can be balanced
-
Explains the role of workflow engines in these architectures
-
Debunks common myths around orchestration and choreography
Event-Driven Systems
Event-driven systems have become increasingly popular over the last few years. The main reasons to build event-driven systems are the desire for team autonomy and the need to build decoupled systems.
Let’s look at an example in order to understand how this can be achieved. Think back to the order fulfillment example introduced a couple of times in this book already. Assume there is a requirement that customers should receive notifications if anything of interest happens, like the order having been placed, accepted, or shipped.
All microservices can publish events. Events refer to things that happened in ...
Get Practical Process Automation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.