3 Replies Latest reply on Jan 22, 2011 7:00 PM by _sudo

    Distributed hash table?


      I have seen distributed hash tables spoken of in RTMFP videos and articles.  How can I implement such a thing for holding short-term data that a group needs to have access to?  Would such a thing get out of sync between peers easily?

        • 1. Re: Distributed hash table?
          Michael Thornburgh Adobe Employee

          distributed hash tables (DHTs) is a big subject.  there is a lot of literature available on the general subject; i recommend starting with the wikipedia article:




          RTMFP Groups provides a foundation for building a distributed hash table.  a group (NetGroup) is the "overlay network", and it automatically maintains a topology that is suitable for recursively routing a message through the group to a node responsible for a key.


          NetGroup.sendToNearest() and the corresponding NetStatusEvent code="NetGroup.SendTo.Notify" is the facility for routing a message through the overlay.  your group must have GroupSpecifier.routingEnabled=true set to use this facility.


          you must set the NetGroup.receiveMode to to NetGroupReceiveMode.NEAREST to be the "nearest" node for keys other than your own.

          NetGroup's localCoverageFrom and localCoverageTo tell you the region of the group address space for which you are nearest.


          group addresses are 256 bit values expressed as 64-digit hex strings.  i recommend using SHA256 as the consistent hashing function.


          to build a robust DHT with this facility, you'll need to build replication and migration, as well as the put and get functions, from this foundation.


          the current implementation of Cirrus uses a DHT built on top of an RTMFP Group and using directed routing to store and map the peerIDs of all connected end-users to their IP addresses/port numbers, to perform the P2P introduction function, and a sorta-DHT is used to provide the automatic group bootstrap function.

          • 2. Re: Distributed hash table?

            You rule Michel

            just wanted to thank you in the name of all who frequent this newsgroups...

            • 3. Re: Distributed hash table?
              _sudo Level 1

              Thank you for providing me with this info.