scraping off the cruft

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

scraping off the cruft

Matthew Wilson-2
Hi --

I'd like to get more involved, but the problem I have is that I don't
*really* understand how the Circle should work.  The papers I've read on
the chord just went right over my head.

Is there anyone generous enough to explain the algorithms in simple
english?

TIA

Matt


--
Tip #17 in how to write unmaintainable code: Choose variable names
that have no association with their use but which have strong inherent
meaning as words. For example:
    marypoppins = (superman + starship) / zero;



_______________________________________________
Circle-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/circle-discuss
Reply | Threaded
Open this post in threaded view
|

Re: scraping off the cruft

jiri (Bugzilla)
Hello,

Matthew Wilson:
> I'd like to get more involved, but the problem I have is that I don't
> *really* understand how the Circle should work.  

Well, the basic algorithm is implemented, so you can just treat it as a black
box that works more or less like python's "dictionary" type... the details of
the DHT are interesting, but not very important most of the time.

More important are the secondary issues that make circle not very live:

* The political statement it was intended to make is passé.

* It works poorly with NAT.

* It clashes with smart firewalls (it needs to receive packets from hosts it's
never talked to before).

* At a key time in its growth, the key developer had to take a leave of
absence.

At the height of its popularity, the circle had perhaps two dozen users, with
maybe half a dozen on-line at times. Currently, I'm not even sure there is a
(public) network out there.

> Is there anyone generous enough to explain the algorithms in simple
> english?

As I wrote above, from the programmer's point of view the DHT works more or
less like the dictionary type: it stores (key, value) pairs. The main
difference is that it can store several values with the same key.

The nodes and all the keys are arranged in a circle. The nodes pick their
positions at random, the keys in a fixed way so you can find them again. Each
node is responsible for all the keys to its right, up to the next node, and
stores the associated values.

To store a (key, value) pair, your node finds the position of the key on the
circle, and asks the nearest node to the left of that position to keep it.

To retrieve, your node finds the position of the key on the circle, and asks
the nearest node to the left of that position for the corresponding value(s).

To avoid everyone storing the complete (potentially large) list of nodes, each
node instead stores just a few, concentrating more on its immediate
neighbourhood on the circle. When looking for a node (based on its position
or on the position of a key), you contact the nearest node to that position
that you know of, and ask it for further directions; repeat as necessary.


Jiri
--
Jiri Baum <[hidden email]>                   http://www.baum.com.au/~jiri
  MAT LinuxPLC project --- http://mat.sf.net --- Machine Automation Tools


_______________________________________________
Circle-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/circle-discuss
Reply | Threaded
Open this post in threaded view
|

Re: scraping off the cruft

Faried Nawaz
On 1/21/06, Jiri Baum <[hidden email]> wrote:

> * It works poorly with NAT.

Many routers have UPnP support now, and I've found two free/open
python implementations of it (one in BitTorrent, and the other in
shtoom).  It might be worth trying to integrate the code into circle.

> At the height of its popularity, the circle had perhaps two dozen users, with
> maybe half a dozen on-line at times. Currently, I'm not even sure there is a
> (public) network out there.

My nodes are still up.  Generally, I'm the only user on during
weekdays, though.  Just two or three daemons and me.


_______________________________________________
Circle-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/circle-discuss
Reply | Threaded
Open this post in threaded view
|

Re: scraping off the cruft

Matthew Wilson-2
On Sat, Jan 21, 2006 at 03:13:10PM +0500, Faried Nawaz wrote:
> On 1/21/06, Jiri Baum <[hidden email]> wrote:
>
> > * It works poorly with NAT.
>
> Many routers have UPnP support now, and I've found two free/open
> python implementations of it (one in BitTorrent, and the other in
> shtoom).  It might be worth trying to integrate the code into circle.

An alternate solution might be to have some kind of central chat room
that all the nodes connect to, and set up p2p connections from there.

But that sort of goes against the purpose anyhow, right?


_______________________________________________
Circle-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/circle-discuss
Reply | Threaded
Open this post in threaded view
|

Re: scraping off the cruft

Faried Nawaz
Another option is adding relaying support, like what Mnet and others
have.  It works well, but it might not be easy to add to circle.


_______________________________________________
Circle-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/circle-discuss
Reply | Threaded
Open this post in threaded view
|

Re: scraping off the cruft

jiri (Bugzilla)
Faried Nawaz:
> Another option is adding relaying support, like what Mnet and others
> have.  It works well, but it might not be easy to add to circle.

Don't forget also that sometimes it's difficult to tell whether or not a node
needs it. If a node is behind a smart firewall, it might be able to receive
packets from anyone it's talked to (recently), but not from the rest of the
circle network. Autodetecting this would be possible, but non-trivial; you'd
probably end up having to test against all the smart firewalls out there...


Jiri
--
Jiri Baum <[hidden email]>                   http://www.baum.com.au/~jiri
  MAT LinuxPLC project --- http://mat.sf.net --- Machine Automation Tools


_______________________________________________
Circle-discuss mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/circle-discuss