On Sat, 05 Aug 2000, Bram Cohen wrote:
<> 
> I could be a little confused about the problem domain here, but it's my
> impression that freenet doesn't have to be anywhere near fully connected -
> with even a million nodes, it would function quite happily with each node
> only talking to a hundred or so 'neigbors' and using a hops to live of
> six or seven, so long as who any given node's neigbors were was reasonably
> 'random'.
> 
> Having that few neigbors reduces the problem size to one where even linear
> search would work fine.

I agree, and that is the current model. The node uses a hashtable for plain
lookups (which happens more often), but when searching for the closest reference
it uses a linear step through. By default we have 500 entries - we do not
believe that more is necessary.

It is more of an academic problem then one of any real urgency. If per hop
latency is a big issue (which it probably will be when/if people start using
Freenet for real stuff) there are much bigger corners to cut then the fraction
of a second the linear search takes.

> The circular comparison, by the way, is a special case, and I don't think
> the topology of the comparison space is likely to become any more
> complicated.

A binary tree based on normal lexicographic order could still be used with a
circular comparison, if you just allow it to step from the "last" entry in
to the first

> I did find the code for doing keys a bit confusing - If all that's being 
> used for keys are SHA1 hashes, why aren't they just byte arrays of length 
> 20? 

We try to limit ourselves as little as possible about such issues. It was only
a couple more lines to support arbitrary length, so it would be impossible to
defend a choice not to.

(Keys are actually 22 bytes, the last two dictate the type of key.)

> -Bram Cohen
> 
> 
> _______________________________________________
> Freenet-dev mailing list
> Freenet-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
-- 
\oskar

_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to