﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Ayende Rahien commented on Patterns for using distributed hash tables: Groups</title><description>Yes, the update implementation should be thread safe.
</description><link>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment6</link><guid>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment6</guid><pubDate>Sun, 20 Jul 2008 19:37:15 GMT</pubDate></item><item><title>firefly commented on Patterns for using distributed hash tables: Groups</title><description>I was talking about the case of two Update running concurrently. If there isn't a readonly bit that say don't update it. Since we both update at roughly the same time. So you check the version it's still 2.1 and same goes for me. So the update will goes through and the last person will override the first. And we still on version 3 where it should be on 4.
</description><link>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment5</link><guid>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment5</guid><pubDate>Sun, 20 Jul 2008 19:24:02 GMT</pubDate></item><item><title>Ayende Rahien commented on Patterns for using distributed hash tables: Groups</title><description>UPDATE will fail unless the version is matched.
  
  
So, you get version 2, do your thing, and try to update it.
  
In the meantime, someone else updated it to version 3.
  
Now, you update will fail, you get the version 3, update it, and then try again.
  
Now you are successful of updating from version 3 to 4
</description><link>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment4</link><guid>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment4</guid><pubDate>Sun, 20 Jul 2008 19:00:43 GMT</pubDate></item><item><title>firefly commented on Patterns for using distributed hash tables: Groups</title><description>Oren,
  
What I mean is inside the UPDATE method
  
Let say we both update at the same time. You checked out version 2.1 and so do I. Now you update first the most recent version is now 2.2. As far as I am concern we are still 2.1 and I override your Unless we set a mark on the item say hey this item is about to be update don't touch it until I am done.
</description><link>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment3</link><guid>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment3</guid><pubDate>Sun, 20 Jul 2008 18:55:44 GMT</pubDate></item><item><title>Ayende Rahien commented on Patterns for using distributed hash tables: Groups</title><description>firefly,
  
You are getting a copy of the item, not the actual item itself.
  
This is your own private copy, no need for locking
</description><link>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment2</link><guid>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment2</guid><pubDate>Sun, 20 Jul 2008 18:43:50 GMT</pubDate></item><item><title>firefly commented on Patterns for using distributed hash tables: Groups</title><description>Is it safe to assume that there is a lock inside the that ensure nobody can update the item while mostRecentItemsVersion is being checked out?
</description><link>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment1</link><guid>http://ayende.com/3423/patterns-for-using-distributed-hash-tables-groups#comment1</guid><pubDate>Sun, 20 Jul 2008 18:37:57 GMT</pubDate></item></channel></rss>