livepeer / go-PPSPP

Go implementation of the Peer-to-Peer Streaming Peer Protocol (rfc7574)
MIT License
11 stars 4 forks source link

Tracking good/bad peers #14

Open sricketts opened 7 years ago

sricketts commented 7 years ago

A peer object needs to classify its peers as good/bad according to the RFC:

No error codes or responses are used in the protocol; absence of any response indicates an error. Invalid messages are discarded, and further communication with the peer SHOULD be stopped. The rationale is that it is sufficient to classify peers as either good or bad and only use the good ones. A good peer is a peer that responds with chunks; a peer that does not respond, or does not respond in time is classified as bad. The idea is that, in PPSPP, the content is available from multiple sources (unlike HTTP), so a peer should not invest too much effort in trying to obtain it from a particular source. This classification in good or bad allows a peer to deal with slow, crashed, and (silent) malicious peers.