At my current client, data flows in at different times, from different sources. All of this data needs to come together and when a complete set of data is available, some calculations take place, some of this gets persisted etc.

This is perfect situation for a reactive architecture. The system is driven by external events, certain actions need to happen in response to theses events.

We don’t however want to throw away the simplicity of RESTful services, they are so simple to reason about and to test.

What we have built is a hybrid, with some RESTful services and some event sourced asynchronous services.

  • RESTful services know how to do a particular thing, but not when to do it.
  • Async services know when a particular thing needs to happen.

So far this has been awesome, changes are naturally isolated from each other. A change to the business process is always on the async side, a change to business rules is always on the REST side.

As always with micro-services you need to make sure you have some essentials in place:

  • Well tested code, including thorough-enough integration tests.
  • Good logging and log access (we are using ELK stack)
  • Good metrics and monitoring (we are using Datadog)
  • An easy way to get it all running and communicating (Docker)

I’ll keep you posted how this all pans out.