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
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;
> 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
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
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.
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?
> 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...