title: Redis and Optimistic concurrency control: is it possible?
body: <p>Working in an application that stores entities in redis as a serialized binary blob. I have multiple clients working on the same data set and I wish to use optimistic concurrency.</p>
  
  <p>My requirements are these:</p>
  
  <ol>
  <li>Read the serialized entity for a specific key in one roundtrip</li>
  <li>Write the modifiend entity back to redis. If any other client modified the entity between the read and the write the operation will fail</li>
  </ol>
  
  <p>Is this possible to do in redis? And if so: what redis commands should be executed to do this?</p>