Friday, June 19, 2009

Peer Table

As part of the system that allows this peer to peer network to be persistent is peer table. I hope to use the peer table to store a list of peers with a name, ip address (/host name) and port.
Each line of the file will be formatted like so:
name:ip:port:connection_attempts:connection_successes
For exmaple
Adam:123.234.123.234:2305:4:3
This means that there is a peer called Adam who is located at 123.234.123.234 on port 2305. This peer has been attempted to be contacted 4 times but only 3 times were successful. The last two values give an indication of the reliability of the peer.
The peer table is built up over time from peers that have had there ip address and ports logged. This allows for a peer to have a long list of peers that can be connected to without the need to continually need to connect to a 'super-node'.
Some method to clean the peer table should be implemented to remove peers with low reliability. An extended peer table could log times of last connection for cleaning purposes.
This file would not have to be used as it could pose a problem legal / security that a list of peers that have been connected to is present.

No comments:

Post a Comment