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

CQRS

Idempotent Aggregates

This blog post will cover creating Idempotent Aggregates and is apart of a series of posts related. Please take a look any previous posts as they may give more context to the code samples below. Thin Controllers with CQRS and MediatR Identify Commands & Events Idempotent Commands Follow @codeopinion Idempotence Idempotence is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application. In my previous post Idempotent Commands, I looked at creating idempotency at the persistence level if you are using an ACID compliance database. But what happens… Read More »Idempotent Aggregates

Idempotent Commands

Idempotence is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application. When you click the “Place Order” button on magical unicorn e-commerce site, you expect your order to be submitted only once.  You also expect that your credit card on on the order you just placed shouldn’t happen more than once. There are different ways to handle idempotency at various levels of your application. Persistence Context is important.  In my context, I’m using a ACID compliant database (MySQL) for storing my current state. I’m also using… Read More »Idempotent Commands

Identify Commands & Events

Once I started down the path of segregating commands and queries, I soon enough ran into a few issues that I needed to solve. Identifying Commands & Events Correlating Commands & Events Idempotent Commands Idempotent Events If you are familiar with CQRS, then you may have run into these issues as well.  If you are not completely familiar with CQRS but have heard of it, to be clear, I’m not talking about Event Sourcing, Domain Driven Design, or having multiple data stores or any of the overly complex version people think it is. I’m simply talking about splitting up incoming requests into commands and queries.… Read More »Identify Commands & Events