<story><title>Is Redlock Safe? Reply to Redlock Analysis</title><url>http://antirez.com/news/101</url></story><parent_chain><item><author>carllerche</author><text>This response is incorrect at a very fundamental level.&lt;p&gt;First, Antirez claims that requiring the &amp;quot;materialization&amp;quot; store to be able to tie break with a monotonically increasing token requires linearization? This is completely false. The monotonically increasing token allows for eventual consistency. That&amp;#x27;s the entire point of it. It&amp;#x27;s monotonically increasing.&lt;p&gt;For anyone who claims that once you have coordination (locking) in your system you already lost is completely ignoring the research coming out of BOOM (Berkeley Orders of Magnitude). You can design your system to push the coordination out to the edge and way from your &amp;quot;choke points&amp;quot; and use these monotonically increasing tokens to keep your bottlenecks coordination free.&lt;p&gt;Secondly, Antirez&amp;#x27;s argument that you can use a compare &amp;amp; swap in a transactional storage layer is also wrong. This is not possible to write safely.&lt;p&gt;I&amp;#x27;m not even going to touch his argument that using system clocks in a distributed locking algorithm is safe...</text></item></parent_chain><comment><author>antirez</author><text>From Martin post: &amp;quot;However, the storage server remembers that it has already processed a write with a higher token number (34), and so it rejects the request with token 33.&amp;quot;&lt;p&gt;This is not eventual consistency, this is refusing any new write with ID &amp;lt; past_ID, which requires linearizability.&lt;p&gt;Second, about eventual consistency, the Token ID even when increasing may not be casually related with the work performed while the lock is hold. if you need just a &lt;i&gt;random&lt;/i&gt; order when there are concurrent accesses, you can lexically order the random token IDs, for what is worth.&lt;p&gt;Compare &amp;amp; Swap: could you argument that? If you want to avoid races in a read-modify-write scenario, you can set the  token, do your work, and only write if the token is still the same, so that if your write succeed is because the state of the shared resource is still the same to when you started operating on it.</text></comment>
<story><title>Is Redlock Safe? Reply to Redlock Analysis</title><url>http://antirez.com/news/101</url></story><parent_chain><item><author>carllerche</author><text>This response is incorrect at a very fundamental level.&lt;p&gt;First, Antirez claims that requiring the &amp;quot;materialization&amp;quot; store to be able to tie break with a monotonically increasing token requires linearization? This is completely false. The monotonically increasing token allows for eventual consistency. That&amp;#x27;s the entire point of it. It&amp;#x27;s monotonically increasing.&lt;p&gt;For anyone who claims that once you have coordination (locking) in your system you already lost is completely ignoring the research coming out of BOOM (Berkeley Orders of Magnitude). You can design your system to push the coordination out to the edge and way from your &amp;quot;choke points&amp;quot; and use these monotonically increasing tokens to keep your bottlenecks coordination free.&lt;p&gt;Secondly, Antirez&amp;#x27;s argument that you can use a compare &amp;amp; swap in a transactional storage layer is also wrong. This is not possible to write safely.&lt;p&gt;I&amp;#x27;m not even going to touch his argument that using system clocks in a distributed locking algorithm is safe...</text></item></parent_chain><comment><author>dvirsky</author><text>&amp;gt; I&amp;#x27;m not even going to touch his argument that using system clocks in a distributed locking algorithm is safe...&lt;p&gt;Please do</text></comment>