Re: Clustering a DDD/CQRS/ES app
Rickard Öberg <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <[email protected]> |
On 4/8/13 16:04 , Greg Young wrote: > Hmm how do you handle commit protocol? > > Ex I talk to server 1 and say write aggregate a event 12 > > You at same time are talking to server 3 and say same thing one of us > will get to server 2 (makes quorum) first. When the events get into the Hazelcast atomic broadcast, which provides global ordering for consumers (i.e. the event stores on the instances in the cluster), they check if the new version of the aggregate already exists in the local eventstore. If yes we know there was a concurrent update, and the event is dropped. The originating server is notified, and the aggregate is dropped from the inmemory repository and re-read on next command. It's teh awesome. :-) Or am I missing something? /Rickard ------------------------------------