Life Beyond Distributed Transactions: An Apostate's Implementation - Document Coordination

Posts in this series: A Primer Document Coordination Document Example Dispatching Example Failures and Retries Failure Recovery Sagas Sample code from this series Quick note - I've updated this post to use the more accurate term "Document" than the less-accurate, DDD-specific term "Aggregate". In the images, it still has the older term "Aggregate", let's pretend I fixed all those images. In the last post, I walked through the general problem [Read More]

Life Beyond Distributed Transactions: An Apostate's Implementation - A Primer

Posts in this series: A Primer Document Coordination Document Example Dispatching Example Failures and Retries Failure Recovery Sagas Sample code from this series For those working with SQL databases, working with transactions is more or less a given. The most we may need to worry about is: Using the appropriate isolation level Not doing too much in a single transaction to prevent excessive locks The vast majority of applications I [Read More]

The False Dichotomy of Monoliths and Microservices

When learning about microservices, you're nearly always introduced to the concept of a monolith. If you're not doing microservices, you're building a monolith. If you're not building a monolith, you must go with microservices. If you're building a monolith, perhaps you're doing it well and it's a majestic monolith. From my early encounters with microservices, this dichotomy bothered me. The discussion of a monolith was nearly always focused on its [Read More]

My Microservices FAQ

Mainly because I get asked all the time about microservices and I'm tired of having to remember on the spot: What is a microservice? A microservice is a service with a design focus towards the smallest autonomous boundary. What is a service? (From Clemens) A service is software that: is owned, built, and run by an organization is responsible for holding, processing, and/or distributing particular kinds of information within [Read More]

Designing Microservice Messages: A Primer

When you move from monoliths to microservices, and your services aren't 100% isolated from each other, eventually you need your microservices to communicate. They need to expose their capabilities to other applications and systems, and when you get to this point, you need to design their means of communication. Microservices doesn't prescribe a specific mode of messaging (nor should it), and I personally like the presentation "Messaging and Microservices" (slides) [Read More]