Life Beyond Distributed Transactions: An Apostate's Implementation - Failures and Retries

Posts in this series: A Primer Document Coordination Document Example Dispatching Example Failures and Retries In the last post, we looked at an example of dispatching document messages to other documents using a central dispatcher. Our example worked well in the happy path scenario, but what happens when something goes wrong? We of course do not want a failure in dispatching messages to make the entire request fail, but what [Read More]

Life Beyond Distributed Transactions: An Apostate's Implementation - Dispatching Example

Posts in this series: A Primer Document Coordination Document Example Dispatching Example Failures and Retries In the last post, we looked at refactoring our documents to use messaging to communicate changes. We're still missing something, however - the dispatcher: Our dispatcher is the main component that facilitates document communication. For a given document, it needs to: Read messages out of a document's outbox Find the the document message handler for [Read More]

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

Posts in this series: A Primer Document Coordination Document Example Dispatching Example Failures and Retries In the last post, I walked through the "happy path" scenario of coordinated communication/activities between multiple resources that otherwise can't participate in a transaction. In this post, I'll walk through a code example of building out document coordination in Azure Cosmos DB. My starting point is this set of code for approving an invoice [Read More]

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 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 of distributed transactions, and some potential ideas around [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 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 see can blissfully ignore the inner workings of [Read More]