# Ruby dht libs

**URL:** <https://www.ruby-forum.com/t/ruby-dht-libs/124546>\
**Category:** Ruby\
**Created:** [December 30, 2007, 2:40am UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546 "2007-12-30T02:40:46Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [December 30, 2007, 2:40am UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546/1 "2007-12-30T02:40:46Z")

</div>

Anybody know of some DHT (distributed hash table) implementations  
written in ruby?  
Thanks!  
-Roger

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [January 1, 2008, 10:56am UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546/2 "2008-01-01T10:56:07Z")

</div>

On Dec 29, 2007 7:40 PM, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Anybody know of some DHT (distributed hash table) implementations  
> written in ruby?  
> Thanks!  
> -Roger

GConf does something very much like this. I’ve actually been planning  
to write a pure Ruby clone with a couple different database backends,  
so GConf doesn’t have to be a dependency. I’ll get to it in the next  
couple weeks if no one else does it first. And I’ll probably make an  
alternate version that accepts more data types than GConf.

[http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gconf](http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gconf)

Daniel Brumbaugh K.

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [January 1, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546/3 "2008-01-01T17:49:31Z")

</div>

Daniel Brumbaugh K. wrote:

> On Dec 29, 2007 7:40 PM, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Anybody know of some DHT (distributed hash table) implementations  
> > written in ruby?  
> > Thanks!  
> > -Roger
> 
> GConf does something very much like this. I’ve actually been planning  
> to write a pure Ruby clone with a couple different database backends,  
> so GConf doesn’t have to be a dependency. I’ll get to it in the next  
> couple weeks if no one else does it first. And I’ll probably make an  
> alternate version that accepts more data types than GConf.
> 
> [http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gconf](http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gconf)
> 
> Daniel Brumbaugh K.

link seems to not work?

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [January 1, 2008, 7:09pm UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546/4 "2008-01-01T19:09:30Z")

</div>

Hi,

On Dec 30, 2007 7:10 AM, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Anybody know of some DHT (distributed hash table) implementations  
> written in ruby?

Why not use Memcache? ( As Ford Prefect would have said, “My mouth  
will shut itself, If i don’t speak the obvious” )

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [January 1, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546/5 "2008-01-01T23:33:10Z")

</div>

Hemant K. wrote:

> Why not use Memcache? ( As Ford Prefect would have said, “My mouth  
> will shut itself, If i don’t speak the obvious” )

That’s a very good idea. I guess the only reason is that theoretically  
they should scale better if you get say 1 million clients. Downloading  
the list of clients would be problematic, whereas DHT’s don’t need  
knowledge of the entire system at the get go.  
But I’m with you memcache would be easier 🙂  
-Roger

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [January 2, 2008, 12:28am UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546/6 "2008-01-02T00:28:45Z")

</div>

I’ve got an old Chord implementation in java knocking around somewhere  
that’s reference based on the paper (well, with the obvious bug fixed  
anyway), I’ve been talking about porting it to ruby for some time…

Would Chord do?

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [January 2, 2008, 12:33am UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546/7 "2008-01-02T00:33:42Z")

</div>

I suppose it’d be as good as any. I don’t need it ASAP (opendht might  
work well enough for now), but just seeing if one exists.  
I might write it to use EventMachine once I do find one 🙂  
Take care.  
-Roger

James T. wrote:

> I’ve got an old Chord implementation in java knocking around somewhere  
> that’s reference based on the paper (well, with the obvious bug fixed  
> anyway), I’ve been talking about porting it to ruby for some time…
> 
> Would Chord do?

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [January 2, 2008, 9:22pm UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546/8 "2008-01-02T21:22:02Z")

</div>

On Jan 1, 2008 10:49 AM, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > [http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gconf](http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gconf)
> > 
> > Daniel Brumbaugh K.
> 
> link seems to not work?

The link works is accurate, you may want to make sure you’re getting  
the full link, everything between \<\>, not including them. If you  
prefer, like this

[http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gconf](http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gconf)

Daniel Brumbaugh K.

---

<div class="post-metadata">

**Author:** ![rogerdpack](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/45deac/32.png) [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Post date:** [January 3, 2008, 5:45am UTC](https://www.ruby-forum.com/t/ruby-dht-libs/124546/9 "2008-01-03T05:45:35Z")

</div>

On Dec 30, 2007 9:40 AM, Roger P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Anybody know of some DHT (distributed hash table) implementations  
> written in ruby?

I wrote one once:

[http://rubyforge.org/projects/harmonium](http://rubyforge.org/projects/harmonium)

It’s a Chord implementation using DRb. Have a look at the code in the  
Subversion repository. It’s sorta workable, but your mileage may vary.
