On Idempotency, Optimistic Concurrency and Command de-duplication


I think it would be enlightning for all if “you” (the Event Store team) shed some light on the subject of idempotency(*), (optimistic) concurrency (detection), command de-duplication (when used in message-flavored cqrs+es), and what behavior client code can expect in the realm of these subjects. A blog post or documentation seems more appropriate than a response in a forum.

Kudos for pulling this off. Your codebase is a feast for my brain.



(*) yes, I’ve seen this one in the docs.

I have put a card on my wall for a blog post. We have some small
changes that need to go in first but will do just after.

Greg, did you ever write this post? -Josh

I will try to get to it this week. We have slides etc for it but need to put it into a blog format.

this will help you in terms of getting deterministic guids for idempotency (will make your commands idempotent as well) https://gist.github.com/jen20/33d28a6ed7415f1aaa58

It may have come from here: http://code.logos.com/blog/2011/04/generating_a_deterministic_guid.html

One thing you have to be careful of here is what you include in the hash producing the guid - including things like DateTime.Now will likely not lead to the results you expect if using for idempotent commands!