Presentation is loading. Please wait.

Presentation is loading. Please wait.

Peer-to-Peer Networks João Guerreiro Truong Cong Thanh Department of Information Technology Uppsala University.

Similar presentations


Presentation on theme: "Peer-to-Peer Networks João Guerreiro Truong Cong Thanh Department of Information Technology Uppsala University."— Presentation transcript:

1 Peer-to-Peer Networks João Guerreiro Truong Cong Thanh Department of Information Technology Uppsala University

2 Overview Motivation Centralized Networks Pure P2P Networks Hybrid Networks Distributed Hash Tables

3 Client/Server Model

4 The server must send a copy of the file to every client. Excessive use of the server’s bandwidth. The more clients there will be, the more the time it will take for all the clients to get the file.

5 P2P Model Every client (peer), can send a part of the file that he received to other peers. Peers help the server distributing the file. Scalable !

6 P2P Model

7 We will share :  The responsabilities.  The costs.

8 Centralized P2P Networks

9 Presence of a central server. The server knows :  Which files are available.  Who has which files. To find a file it’s necessary to check the server. The server puts the peers in touch.

10 Napster Application for sharing musical files(.mp3). Closed in 2001 for legal reasons. Re opened and became a paying service.

11 Napster : Login Peer sends a message to the server, containing its nick and password. Server check the peer’s identity. Server sends an ACK to the peer. Peer sends to server the list of files he is willing to share.

12 Napster : Getting a file Peer sends a « SEARCH » message to the server. Server checks its database. Server sends to peer, one or several « RESPONSE » messages. Peer talks directly with the peer(s) who have the file.

13 Napster : Conclusion We find a file really quickly. If server crashes, the whole system is down. The more peers, the more « powerful » the server must be.

14 Pure P2P Networks

15 No central server. To connect, we must connect to peers already inside.

16 Gnutella 0.4 Gnu + Nutella = Gnutella. Share different types of files (.jpg,.avi,.mp3, etc).

17 Gnutella 0.4 : Login If first time, the peer contacts a « startup server ». Otherwise peer tries to connect to peers he knows from the past. We connect to a few peers.

18 Gnutella 0.4 : Finding a file There is no central server. Q : How to know where is the file ? A : We will use flooding.

19 Gnutella 0.4 : Flooding We flood the network with messages. We send a message to every neighbor. Neighbors will ask their neighbors. Q : When to stop ? A : TTL = 0.

20 Gnutella 0.4 : Time-to-Live (TTL) Every message has a TTL. We decrease the TTL. TTL(0) = 7, considered enough.

21 Gnutella 0.4 : Descriptor ID Descriptor ID identifies the message. We keep for a while the received Decriptor ID’s. Q : What to do if we know the Descriptor ID of a new received message ? A : We don’t forward it. Goal : Avoid cycles.

22 Gnutella 0.4 : PING & PONG PING :  Useful to explore the network.  Lets us know who is alive. PONG : Answer to a PING  Provides IP address + port number.  Provides the number of shared files.  Provides size of shared files. Remark : PONG follows the reverse path of PING.

23 Gnutella 0.4 : QUERY & QUERYHIT QUERY : Used to find a file. QUERYHIT : Answer to QUERY.  Can contain several results. Remark: As with PING & PONG, QUERYHIT follows the reverse path of QUERY.

24 Gnutella 0.4 : Conclusion No central server so no crashes. Cannot be closed down. A lot of generated traffic. We are not sure to find a file.

25 Hybrid P2P Networks

26 No central server. Hierarchical network. There will be Superpeers. Superpeers are the most powerful.

27 Gnutella 0.6 Necessary update due to the crash. We keep the PING, PONG, QUERY and QUERYHIT messages. New : Routing Tables.

28 Gnutella 0.6 : Routing Tables Each peer has one. When we connect to a Superpeer we send a ROUTE TABLE UPDATE message. With this message, the peer informs the Superpeer, which files he shares.

29 Gnutella 0.6 : Network of Layers Superpeers will be connected to other Superpeers. Superpeers send frequently PINGs to other Superpeers. When a « leaf » of a Superpeer sends a PING, the Superpeer answers with PONGs received previously.

30 Gnutella 0.6 : Conclusion We decreased the traffic :  Messages reach a wider number of peers, efficiently.  Superpeers « protect » their leafs from PINGs.

31 Is this all ? New type of system :  Distributed Hash Tables (DHT) Every peer is equal. Decentralized. Distributed indexing. Every node has an id. We find a file with an unique key. We find files faster. If a file exists, we alway find it.

32 Want to know more ? Andy Oram (Ed). Peer-to-Peer : Harnessing the Benefits of a Disruptive Technology. O’Reilly, 2001. Ralf Steinmetz, Klaus Wehrle (Eds). Lecture Notes in Computer Science - Peer-to-Peer Systems and Applications. Springer, 2005.

33 THE END


Download ppt "Peer-to-Peer Networks João Guerreiro Truong Cong Thanh Department of Information Technology Uppsala University."

Similar presentations


Ads by Google