Skip to content

Sponsor: Do you build complex software systems? See how NServiceBus makes it easier to design, build, and manage software systems that use message queues to achieve loose coupling. Get started for free.

Learn more about Software Architecture & Design.
Join thousands of developers getting weekly updates to increase your understanding of software architecture and design concepts.


Follow @CodeOpinion

Asynchronous Request-Response Pattern for Non-Blocking Workflows

What’s the asynchronous request-response pattern for? We’re used to synchronous communication. You make a request to another service and get a response. When you move to asynchronous communication, you often think of messages as fire-and-forget. You send a command to a queue, and the consumer handles it asynchronously. Because of the temporal decoupling, you don’t know when the message was processed or what the result was. However, there is a solution! Let me explain how you can use the request-response pattern to reply sender once a message is processed. YouTube Check out my YouTube channel where I post all kinds of content… Read More »Asynchronous Request-Response Pattern for Non-Blocking Workflows

Anti-corruption Layer for mapping between Boundaries

What does an anti-corruption layer solve? Most systems rely on data or behaviors from another service or an external 3rd party. The problem is they often don’t share the same semantics or data structures. Left unchecked this leads to convoluting up your own boundary with concepts from another boundary. Let me explain how you can use an anti-corruption layer as a way to translate the concepts from another boundary in isolation. YouTube Check out my YouTube channel where I post all kinds of content that accompanies my posts including this video showing everything that is in this post. Anti-corruption Layer A Service… Read More »Anti-corruption Layer for mapping between Boundaries

Avoiding Distributed Transactions with the Reservation Pattern

A long-running business process could last seconds to days, you cannot lock resources within a service using a distributed transaction. So what’s the alternative? The real world has a solution, it’s a reservation. The reservation pattern allows you to have a time-bound limited guarantee which allows you to coordinate with other services. YouTube Check out my YouTube channel where I post all kinds of content that accompanies my posts including this video showing everything that is in this post. Distributed Transaction When working with a traditional monolith, you can use a database transaction. Wrap all the relevant database calls within a transaction,… Read More »Avoiding Distributed Transactions with the Reservation Pattern