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

Messaging

CAP: Event Bus & Outbox Pattern

If you’re thinking of building or already are implementing a system using async messaging (SOA or Microservices) then you need to start thinking about what type of messaging library you want to use in front of a message broker. CAP is an Event Bus that implements the Outbox Pattern to deal with distributed transactions. YouTube I did a live stream exploring CAP that is over on my YouTube Channel. Distributed Transaction When you’re using messages (events) to communicate between systems you will run into the situation where you need to save data to your database, then publish an event to… Read More »CAP: Event Bus & Outbox Pattern

Why use DTOs (Data Transfer Objects)?

Should you really use DTOs (Data Transfer Objects)? Seem like a lot of work mapping your database entities to another object? Why Bother? The simple answer is coupling. Data Transfer Objects First, what are DTOs? When people refer to Data Transfer Objects, what they mean are objects that represent data structures that generally do not contain any business logic or behavior. If they do contain behavior, it’s generally trivial. Data Transfer Objects are often used to be serialized by the producer and then deserialized by the consumer. Often times these consumers may live in another process being used by an… Read More »Why use DTOs (Data Transfer Objects)?

Message Sender: Who Sent the Command/Event?

When handling a message, regardless if it’s a command or event, you often want to know who sent the message. Who was the message sender? Not the service, but the actual user who initiated it. If it’s a command then who invoked it. If it’s an event, who invoked the command that changed state within the system that created the event. This post is in a series related to messaging. The overview is available in my Message Properties post. Authorization The most common reason for wanting to know who sent a message is to determine if they are authorized to… Read More »Message Sender: Who Sent the Command/Event?