Tag Archives for " event-sourcing "

How to Upgrade CQRS Events Without Busting Your Event Stream

Events are at the heart of a CQRS Event Sourced system. Which is why changing or upgrading them can be problematic. In this post I’m going to cover a few principles to bear in mind, which should help you avoid hitting the rocks. Before I dive into  ‘how to upgrade CQRS events’ I’m going to recap the role Events play in the system.Continue reading

Business Rules – When to Break Them

The nice thing about programming is that everything is black and white.

Wrong!

When designing new features, we all go through a process of discovering requirements. If you are a good developer, you will start to ask questions and probe deeper to find the edge cases. Why? Because you know the edge cases can often take up 80% of the development time. But is that where 80% of the value is?Continue reading

4 Secrets to Inter-Aggregate Communication in an Event Sourced System

Ok, so you have two event sourced aggregate roots. You need to call a method in one from the other. How do you do it?

If you find your self asking this question, don’t worry, your not alone. It comes up a lot.

The short answer – it suggests there could be something wrong with your aggregate root (AR) boundaries.Continue reading

Is a 100% Provable Audit Log Possible? – Hint, with Event Sourcing it Is and I’ll Show You How

If you’ve been developing for any length of time you’ve probably had to create an audit log. Here’s the question though, are any of these logs, a 100% provable audit of all changes in the system? I’m guessing not. With event sourcing, a 100% provable event log just happens to be a handy by product. So how does it work and how can you implement it?

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

Handling Concurrency Conflicts

Handling Concurrency Conflicts in a CQRS and Event Sourced system

Handling Concurrency Conflicts

Imagine if it was possible, when faced with a potential concurrency issue to programmatically check if any previous ‘events’ actually conflict with the current action being requested. With a CQRS Event Sourced application, it is possible to significantly reduce the problems of concurrency and in the remainder of this article I will show you how.

Continue reading

‘Messaging’, the new silver bullet?

I had an ‘Ah ha!’ moment just over a year ago when I attended a Greg Young’s CQRS and Event sourcing course with skillsmatter. The ‘Ah ha’ wasn’t about CQRS, or even Event sourcing, it was about how Greg structured his code to work with messages. This approach can have far reaching effects on your software, making it simpler, easier to test and much more flexible. It can even remove the need for an AOP framework (amongst other things).Continue reading