03_P2P_Lecture
03_P2P_Lecture
Networks
Distributed Systems
Ahmed Ali-Eldin
One of the best places to read about systems
http://highscalability.com/
What is P2P?
● It is (used to be) every ISP's nightmare
– In 2007, estimations between 50% to 70% of
Internet traffic is P2P [1,2,3].
– Look at the nice picture from 2002 [4].
What is P2P again?
●“A distributed network architecture may be called
a Peer-to-Peer (P-to-P, P2P) network, if the
participants share a part of their own hardware
resources (processing power, storage
capacity,network link capacity, printers).”
●“These shared resources are necessary to
provide the Service and content offered by the
network (e.g. file sharing or shared workspaces
for collaboration).
“They are accessible by other peers directly,
●
● Unstructured Overlays
– Napster
– Gnutella
– BitTorrent
● Structured Overlays
Unstructured overlays
History: Napster
10
Column 1
6
Column 2
Column 3
0
Row 1 Row 2 Row 3 Row 4
Where is A?
A
History: Gnutella
a peer periodically PINGs its neighbors to
●
others
●The early downloaders will, with high probability,
eat up the upload bandwidth of the file source
since they establish the connection ahead
– Andeach uploader/downloader can set the
maximum number of simultaneous
connections
Bittorent in action
Choked=false Choked=false
Interested=true Interested=true
A B
Choked=false Choked=false
Interested=false Interested=true
A B
bittorrent-youd-be-surprised/
Structured Overlays
Premise
12 3 7 0
predecessor to nil
●0 will help 9 to find its
successor
●0 will tell 9 that its
successor should be 12
Chord Join
12
10
Column 1
6
Column 2
Column 3
0
Row 1 Row 2 Row 3 Row 4
– No?
Can their be collisions in the peer
names?
●Can the hash function produce two peers having
the same hash ID?
– No, if you use a good function
● Called Provably secure hash functions
– MD5 and SHA-I are not Provably secure hash
functions
– Still
we use non provably secure hash
functions and seldom use the provably secure
ones
● Can you think why?
Can their be collisions in the peer
names?
●Can the hash function produce two peers having
the same hash ID?
– No, if you use a good function
● Called Provably secure hash functions
– MD5 and SHA-I are not Provably secure hash
functions
– Still
we use non provably secure hash
functions and seldom use the provably secure
ones
● Can you think why?
Routing: Fingers table
Keep a routing table of
●
efficiency
● P2P adds a new dimension to security
– With newer attacks and newer challenges
● Example:
– Sybil attacks
– File Poisoning
– Rational Attacks
Dynamo
●It is a system that integrates a wide range of
concepts you will learn in the distributed systems
course
– Consistent hashing
– Versioning
– Vector clocks
– Quorum
Cloud Computing
Some extra extra extra readings :)
[1] http://spin2013.cs.sunysb.edu/~phillipa/CSE390/choffnes08.pdf
●
[2]https://www.net.t-labs.tu-berlin.de/papers/AFS-CIP2PCIP-07.pdf
●
[3] https://www.usenix.org/legacy/event/imc05/tech/full_papers/karagiannis/karagiannis.pdf
●
[4] http://research.cs.washington.edu/networking/websys/pubs/osdi_2002/osdi.pdf
●
[5] http://www.computer.org/csdl/proceedings/p2p/2001/1503/00/15030101.pdf
●
[6] http://www.cs.rice.edu/Conferences/IPTPS02/101.pdf
●
[7] Li, Baochun, Yuan Feng, and Bo Li. "Rise and fall of the peer-to-peer empire." Tsinghua Science
●
[8] https://www.allthingsdistributed.com/2007/10/amazons_dynamo.html
●