tag:blogger.com,1999:blog-8898949683610477251.post8023602409631923584..comments2008-01-03T20:37:58.284ZComments on Tom White: Consistent HashingTom Whitehttp://www.blogger.com/profile/02418758537880869494noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8898949683610477251.post-67117913407935485322008-01-03T20:37:00.000Z2008-01-03T20:37:00.000ZHi. Do you have any clue of how to create an algor...Hi. Do you have any clue of how to create an algorithm which tracks the history of joins/leves of members and delivers the same node for the same key if it previously looked it up. Perhaps I'm explaining this in bad terms but something like a (in memory or persistent) database in cojunction with a consistent hash.<BR/><BR/>perhaps:<BR/>public Address getAddress(key)<BR/>{<BR/>if(lookedUpMap.containsKey(key))<BR/>{<BR/> return (Address)lookedUpMap.get(key)<BR/>}<BR/>else<BR/>{<BR/> Address a = get(key);<BR/> lookedUpMap.put(key, a);<BR/> return a;<BR/>}<BR/>}<BR/><BR/>Then it is up to the client to check if the previously stored node is reachable at this very moment.<BR/><BR/>An extension to this cache would be to return a Set which size is equal to the nr of replicas of each key/value.<BR/><BR/>If a value is stored on two or more nodes then the possibilty for that at least one of the servers is up increases a lot. I'm building a distributed storage solution and the data cannnot be lost just because the cache "recalculates" the hash :)<BR/><BR/>Ahhh enough already I will implement something like this :)marcusherouhttp://www.blogger.com/profile/04583770009623026697noreply@blogger.comtag:blogger.com,1999:blog-8898949683610477251.post-33032798411494915122007-12-25T09:37:00.000Z2007-12-25T09:37:00.000ZCool! I'm as we speak creating a distributed cachi...Cool! I'm as we speak creating a distributed caching and searching system which uses JGroups for membership. The biggest problem I faced was this exact thing. What to do on the member-joined/leaved events and for the system to be able to know at all times to which node to send what command :)<BR/><BR/>The caching system is strictly following the Map (and SortedMap) interface and a bunch of implementations have been implemented. LFU, LRU, MRU, Diskbased B+Tree (jdbm), ehcache wrapper, memcached java client wrapper, hibernate support... <BR/>I like the Map interface since it is quite clean..<BR/><BR/>The impl I'm working on now is a cache/persister which uses HDFS as persistance layer. See how that turns out. The line between a cache and a persistence engine is fine.<BR/><BR/>And of course all caches must be searchable = My own indexer/searcher + Lucene free text index/search, ohh and all must be able to work in a distributed environment.. fuck it is a big task.Marcushttp://www.blogger.com/profile/04583770009623026697noreply@blogger.comtag:blogger.com,1999:blog-8898949683610477251.post-84672551668916351772007-12-02T22:26:00.000Z2007-12-02T22:26:00.000Zmorrita - Glad you enjoyed the post and thanks for...morrita - Glad you enjoyed the post and thanks for the translation! TomTom Whitehttp://www.blogger.com/profile/02418758537880869494noreply@blogger.comtag:blogger.com,1999:blog-8898949683610477251.post-10697866419431176572007-12-01T06:06:00.000Z2007-12-01T06:06:00.000Zgood article!i've made Japanese translation for yo...good article!<BR/>i've made Japanese translation for your article. which is available at <BR/>http://www.hyuki.com/yukiwiki/wiki.cgi?ConsistentHashing .<BR/>if you have any trouble, please let me know.<BR/>thank you for your work.morritahttp://www.blogger.com/profile/02243547846090828073noreply@blogger.com