Re: Clustering a DDD/CQRS/ES app
Greg Young <[email protected]>
| Newsgroups | gmane.comp.programming.domain-driven-design |
|---|---|
| Message-ID | <CAC9RQtiw+dicS872EoWC_jMY16pNOfC0_TsQDsStThTApbXwpg@mail.gmail.com> |
Can I get a dirty read in the middle? On Monday, April 8, 2013, Rickard Öberg wrote: > 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 > > -- Le doute n'est pas une condition agréable, mais la certitude est absurde.