Scalability of Wolkenkit services

Viewed 138

Having used another CQRS/ES framework I did take a look at Wolkenkit, too. It looks like a nice framework, with might lack some advanced features, but does model CQRS/ES using simple but smart APIs.

Background: I did read the documentation but did not yet took a look at it in practise.

One point the documentation did not answer though, but is IMHO important is the question how by its architecture Wolkenkit implements horizontal scaling, meaning adding additional services instances (especially by different number for write and read side). It sounds like it should be possible, but it is (IMHO) not explained how and why.

CQRS/ES has a few potential synchronisation/serialization points, in cases where the order of commands (possible handled by optimistic locking) or even more important the order of events for a single aggregate instance has to be guaranteed (for example read side can not be build correctly if events have the wrong order).

I do not see this answered in the documentation and I would assume that the usage of RabbitMQ alone does not solve this problem.

Has it has been solved explicitly (by a custom infrastructure element?) or are there some (unmentioned) constrains, that (do not) solve this implicitly? Simple link to documentation is fine if I missed something

1 Answers

When talking about scaling, there are two things you primarily want to scale: The broker (which is responsible for the read model), and the core (which is responsible for the write model).

Regarding the core, we right now handle multiple commands in parallel, as long as they target different aggregates. Multiple commands that target the same aggregate are serialized, using marble-run. If there are multiple cores running, we currently do not have a mechanism to reliably scale, but this is on our roadmap. Please note that there is also an issue for this, and help and / or sponsoring is highly welcome for this topic (nevertheless we will address it sooner or later anyway).

Regarding the broker they are independent of each other, so they can be scaled without further ado, as they don't have any dependencies between them.

Right now, the CLI does not support scaling the core or the broker, you need to do this manually, but this again will change once the aforementioned issue gets resolved.

Disclaimer: I'm one of the core developers of wolkenkit, so please take my answer with a grain of salt.

Related