Handling Distributed Transactions: A Deep Dive into the Saga Pattern

In today’s world, scalability is a common challenge that most of us face when developing applications. To scale out and build easily manageable services, we often break down a system’s responsibilities into multiple microservices. In a microservices architecture, each service manages its own database, and the type of database can differ between services. This diversity complicates implementing a two-phase commit, and in many cases, services don’t always require strong consistency. ...

October 18, 2024 Β· 9 min Β· Saddam H

Mastering Microservices: The Battle Between Choreography & Orchestration

In Choreography, dancers perform independently based on cues or signals from each other, without a central leader directing them. Each dancer knows their part and reacts to the movements or signals from others, much like how microservices communicate through events. The performance unfolds naturally as each dancer responds to the rhythm and flow. Dancers performing choreography in sync with the music In Orchestration, however, a conductor leads the musicians, directing them when to start, stop, or change tempo. The conductor has full control over the entire performance, much like how an orchestrator in microservices coordinates each service, managing the flow and ensuring everything happens in the right sequence. ...

September 24, 2024 Β· 6 min Β· Saddam H