Not Found
We couldn't find the page you were looking for. This is either because:
There is an error in the URL entered into your web browser. Please check the URL and try again.
The page you are looking for has been moved or deleted.
You can return to our homepage by clicking here, or you can look at our most recent blog posts:
One of the challenges of designing distributed systems is balancing the local and global complexity. In some cases, we might want to reduce the local complexity (and cognitive load) by splitting a single system into multiple smaller ones, that are going to be loosely coupled.
That often brings a problem of managing the specification of behaviours of the subsystems in the context of the whole system. Usually, we want to have the specification consistent between the subsystems, but at the same time keep them loosely coupled and independent.
There is quite a lot of confusion in the community with regards to EventStoreDB and Kafka - especially when it comes to event sourcing. Developers not familiar with both products are having a hard time deciding which technology they should use, how do they compare and what are the trade-offs that they will have to make.
In this article, you will learn what the two solutions offer, how to use them effectively, and when to use one over the other. In order to do that, we first need to agree on the definition of event sourcing and requirements that the solution should meet.
In an Event Sourced system, the current state of an aggregate is usually reconstituted from the full history of events. It means that before handling a command we need to do a full read of a single fine-grained stream and transport the events over the network. For a well-designed aggregate, it’s usually not a problem as it’s lifecycle is bounded to a specific time period and the number of events doesn’t grow indefinitely. But what if our design isn’t optimal, or we have some outliers that are requiring thousands of events to be transported every time we want to handle a command?
One of the topics that came up a few times (and I noticed quite a number of searches for it) is how the Aggregates and Projections differ or relate to each other. The reason for this confusion is that some parts of the implementation logic are very similar - in particular, the current state of an Aggregate derived from the event log. In this blog post, we will explore the differences and look at some examples.
Some of you found yourself in a situation, where your company asked you to start working remotely very suddenly. Some of you were already working partially or mostly remotely for some time and found ways of dealing with the challenges it presents. No matter which group you are identifying with - remote communication and modelling isn’t always easy, and each day brings new ideas, tools, discoveries, and challenges.
From time to time I get asked a question: "how to get better at designing systems and software architecture?". I could recommend a number of books or videos, but as you know these two alone aren't going to magically teach us how to do design. What we also need is some concrete & deliberate practice.
Designing a good aggregate with the right boundaries and clear responsibilities is not a trivial task. A lot of times when I discuss various design options with people, I learn that they rely on gut feeling or implicit heuristics to guide modelling decisions. In order to make this design process simpler I've decided to create an Aggregate Design Canvas.
Designing software systems that are aligned with business often leads to compromises and design tradeoffs. It's usually not feasible to model a system in a way that will in 100% reflect the real world.
Understanding business rules is the first step of getting a useful model, but that's not enough. Modelling them as software often leads to discoveries - we realise that it might not be practical, or even possible to enforce some of the rules.
The right thing to do in such a situation is to go back to domain experts and discuss the trade offs we are willing to make. That might mean that we will have to give up on implementing a strongly consistent Invariant and replace or support it with a Corrective Policy.
Projections are one of the core patterns used in Event Sourcing. What we understand by ES is persisting changes that are happening in the application as a sequence of events (also called an event stream). With this context in mind we can define a projection as an answer to a question: what is the current state derived from the event stream?
Domain repositories provide an alternative to monorepositories and multi-repositories for organizing code. This approach balances the benefits of both while mitigating their disadvantages. By isolating code by domain, domain repositories can improve collaboration, reduce cognitive load, and scale more effectively as the business grows. While there are potential downsides to consider, such as difficulties in splitting or merging domains, the benefits make domain repositories an attractive option for many software development projects.