[p2p-hackers] infinite loops
Stefan Behnel
behnel_ml at gkec.informatik.tu-darmstadt.de
Fri Jun 24 12:09:20 UTC 2005
Davide Carboni wrote:
>>>I notice that most of p2p protocols use TTL to prevent infinite loops.
>>>I was wondering why they do not use the following technique:
>>>
>>>- each node stores a cache of all message IDs received from neighbors
>>>-if an incoming message has an ID not in the cache, then the ID is
>>>added and the message is relayed
>>>-else if the incoming message has an ID alraedy in the cache it is
>>>simply ignored.
>>
>>Ok, hum, for how long exactly would you store such a cached ID
>
> assuming an ID of 8 bytes, you can store 10^7 ID with 80MB of RAM. If
> the average message rate on the node is 100 m/s you can keep the ID
> for 10^5 seconds which is not so little time
Ok, I assume that is the best thing to do with 80MB of RAM.
No, seriously. Why waste a big part of memory for an error prone cache if you
can waste one byte in a message that assures handling of all possible errors?
Including broken messages, topology restructuring, etc.
>>and how would
>>you handle the case where a message actually has to pass through you twice
>>because some other node incidentally changed its position in the topology?
>
> ...then I ignore the message, that's all. I've already relayed it to
> the other neighbors
Then why do you think it came back? Do you think it has reached its destination?
Stefan
More information about the P2p-hackers
mailing list