Example

In this lesson, we'll look at an example of asynchronous communication with Atom.

Introduction #

The example can be found at https://github.com/ewolff/microservice-atom.

The example for Atom is analogous to the example in the Kafka chapter and is based on the example for events from chapter 6.

  • The ordering system creates orders.
  • Based on the data in the order, the invoicing microservice creates invoices.
  • The shipping microservice creates deliveries.

The data models and database schemas are identical to the Kafka example. Only the communication is now done via Atom.

The drawing above shows how the example is structured:

  • The Apache httpd distributes calls to the microservices.

    • For this purpose, the Apache httpd uses Docker Compose service links.
    • Docker compose offers simple load balancing. The Apache httpd uses the load balancing of Docker compose to forward external calls to one of the microservice instances.
  • The order microservice offers an Atom feed from which the invoicing and shipping microservice can read the information about new orders.

  • All microservices use the same Postgres database.

    • Within the database, each microservice has its own separate database
...