Chapter 8. Building Workflows with Microservices

Microservices, by their very definition, operate on only a small portion of the overall business workflow of an organization. A workflow is a particular set of actions that compose a business process, including any logical branching and compensatory actions. Workflows commonly require multiple microservices, each with its own bounded context, performing its tasks and emitting new events to downstream consumers. Most of what we’ve looked at so far has been how single microservices operate under the hood. Now we’re going to take a look at how multiple microservices can work together to fulfill larger business workflows, and some of the pitfalls and issues that arise from an event-driven microservice approach.

Here are some of the main considerations for implementing EDM workflows.

Creating and modifying workflows
  • How are the services related within the workflow?

  • How can I modify existing workflows without:

    • Breaking work already in progress?

    • Requiring changes to multiple microservices?

    • Breaking monitoring and visibility?

Monitoring workflows
  • How can I tell when the workflow is completed for an event?

  • How can I tell if an event has failed to process or is stuck somewhere in the workflow?

  • How can I monitor the overall health of a workflow?

Implementing distributed transactions
  • Many workflows require that a number of actions happen together or not at all. How do I implement distributed transactions?

  • How ...

Get Building Event-Driven Microservices 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.