Application Layer Protocol Flashcards
How does peer-to-peer architecture work?
No always on server
Peers intermittently connected
Why do we use hash tables?
Convenient to store and search
How do we get a hashed key?
Hash(original key)
How does a distributed hash table work?
Assign each peer identifier
Any number stored in n bits
Define hash function
Make hash available to every peer
What is a circular hash?
Each peer only aware of immediate successor/predecessor
What is peer churn?
Peers may come and go
Each peer periodically pings successors
What is a torrent file?
Calculates hash code
What is a magnet link?
Use distributed hash table
What is a tracker in a BitTorrent?
Tracks peers participating in torrent
What is a torrent in a BitTorrent?
Group of peers exchanging chunks of file
How does the tit-for-tat approach for a BitTorrent work?
Peers join network and register with tracker
Tracker sends list of IPs of S out of N peers
Peer establishes concurrent TCP connections with each node in S
Peer periodically requests neighbours send chunk lists
Rarest chunk is 1st
Peers track neighbourhood that transmit fastest (unchoked = send 1st)
Neighbours are choked
Once peer has file, selfish leave or altruistically remain