Archive Monthly Archives: October 2014

Eventual consistency

4 Ways to Handle Eventual Consistency on the UI

Ever tried to hold a writhing slippery eel in your hands? In case you haven’t, its hard. Building a UI for a CQRS system needn’t be that tricky but you do need to contend with some interesting challenges:

  1. The commands ‘complete’ far faster than you may expect –  compared to a consistent application.
  2. The read model is ‘eventually consistent’.

But what is ‘eventual consistency’? ‘Eventual consistency’ is when a read of the data store may return stale results. That is a command has completed but the data store is not yet reflecting the change. This state in a typical line of business application can last for ten’s to the mid hundreds of milliseconds. The actual time is dependant on the specifics of the application. This presents a challenge for designing the user experience. Here are 4 possible approaches to solving this issue.Continue reading

6 Code Smells with your CQRS Events – and How to Avoid Them

When starting out with CQRS, designing the ‘events’ is not always obvious or easy. The more experienced you are, the more likely your habits will lead you astray.  This post will help you spot the problems early and stay on the right track.Continue reading

UI Wireframe

How to Build a Master Details View when using CQRS and Event Sourcing

One of the most liberating things about the CQRS ES way, is the simplicity of the read side. However, if you are new to CQRS you may have wondered how it works. How for example, would it work for a classic master details view? You are not alone, in fact, I am writing this post in answer to exactly this question I found on stackoverflow:

“So my question is how are people handling a screen where by for example it displays a summary of customer details and then a list of their orders with a [more detail] link etc….”Continue reading

CQRS + Event Sourcing – A Step by Step Overview

A common issue I see is understanding the flow of commands, events and queries within a typical CQRS ES based system. The following post is designed to clear up what happens at each step. Hopefully this will help you to reason about your code and what each part does.Continue reading