Event-driven architecture with Publish-Subscribe patterns and Event sourcing with CQRS

Beatriz Uezu

Goal

Digital transformation has motivated many companies to sell their products through digital platforms and, as a result, the value of products and services suffers a high price fluctuation in e-commerce.

 

Proof of concept of a product price update flow to explain the event-driven architecture presenting application solutions in the publish-subscribe and event-sourcing architectural patterns with Command and Query Responsibility Segregation (CQRS).

Concepts

Benefits

  • Granularity;
  • Scalability;
  • Technological flexibility;
  • Flexibility of business requirements;
  • Low coupling;
  • Continuous delivery support and easy rollback;
  • High testability.

Development method

Implementation

Publish-subscribe

Event Sourcing with CQRS

Conclusion

Conclusion

  • Effective and positive for building resilient, scalable, interoperable, and loosely coupled systems;

  • allowing data analysis and generation of useful knowledge for the company;

  • Publish-subscribe offers a simpler solution for less complex systems;

Conclusion

  • Event sourcing with CQRS is more suitable for larger systems with more granular reading and writing demands and allows message reprocessing.

  • Message bus adds resilience and scalability to services, ensuring interoperability between them

  • CQRS results in a greater number of messages due to commands and events.

Conclusion

  • Architectures can be complex and require technical knowledge;

  • Generate financial costs;

  • Require adequate planning;

  • The choice of approach will depend on the needs and size of the system in question.

Made with Slides.com