Course of Communication Between Microservices: Event-Driven Architecture

Javier FerrerRafa Gómez

By Javier Ferrer y Rafa Gómez Software Design and Architecture

Publish and consume domain events, eventual consistency, RabbitMQ and AWS SNS-SQS, migration from monolith to services, and much more.

💸 First lesson available without registration! 💸

Once the foundations of a Software Architecture within a certain service are laid out with the courses on Hexagonal Architecture, CQRS, and CQRS and Event Sourcing; we focus on how to define the architecture of our services and the communication between them to be optimal.

In this course, we will start by analyzing why to move from a monolithic system to a microservices-based one, we analyze the different alternatives when sharing information between our services: From sharing the database to publishing and consuming domain events, even using HTTP APIs and circuit breakers. What are the benefits and disadvantages of each alternative? When would it be beneficial to use one over the other?

Additionally, we will go into detail proposing possible concrete implementation solutions when defining our infrastructure in RabbitMQ, in AWS with SNS and SQS. Not only that, but we will also see how to publish and consume events from PHP and Scala, and what best practices or considerations we should keep in mind.

We will also directly tackle analyzing solutions to the new problems we will face arising from using message queues for the publication and consumption of events: What do we do with events that do not arrive in order? And when they get duplicated?

Finally, we will propose a migration plan to extract services based on an existing monolith. Aspects to consider to maintain backward compatibility and not force our clients to point to the new service, reducing the risk in the migration process to the new service, and other best practices to keep in mind.

In summary, you will learn to:

  • Identify when it is a problem or limitation to continue using a monolith
  • Pros and cons of defining services sharing a database
  • Pros and cons of communicating our services via HTTP APIs
  • What a circuit breaker is, when to use it, and what benefits it brings
  • Strengthen SOLID concepts by analyzing the parallelism between its application at the class level and how to carry it to the service architecture level
  • Define the structure of our domain events
  • What elements make up a messaging queue system
  • What types of exchanges we have available and when to use each of them
  • Manage errors arising from messaging queues such as non-guaranteed order and duplication of our events when consuming them
  • Define our queue structure in RabbitMQ
  • Leverage SNS and SQS to implement our queues in AWS optimizing for more efficient consumption
  • Publish and consume events from systems like PHP and Scala (or other JVM-based languages like Java)
  • Gradually migrate from an existing monolith to microservices

Don't hesitate any longer and subscribe for just 30€/month to learn all these concepts and small tricks that we have condensed into a direct and to-the-point course 🙂

Videos of the course

Related courses

See full catalogue

Pay according to your needs

lite (only monthly)

19 €
per month
  • Access to a subset of courses to lay the foundation for maintainable, scalable, and testable code
  • Company invoice
Popular

standard

24,92 €
Save 121
Annual payment of 299
per month
  • Full course catalog
  • Design and architecture challenges
  • Highlighted solutions videos for challenges
  • Receive job offers verified by Codely
  • Company invoice

premium

41,58 €
Save 89
Annual payment of 499
per month
  • Everything above
  • More benefits coming soon

We won’t increase the price while your subscription is active