peer-to-peer networks joão guerreiro truong cong thanh department of information technology uppsala...

Post on 19-Dec-2015

214 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Peer-to-Peer Networks

João Guerreiro

Truong Cong Thanh

Department of Information Technology

Uppsala University

Overview

Motivation Centralized Networks Pure P2P Networks Hybrid Networks Distributed Hash Tables

Client/Server Model

Client/Server Model

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.

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 !

P2P Model

P2P Model

We will share :

The responsabilities.The costs.

Centralized P2P Networks

Centralized P2P Networks

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.

Napster

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

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.

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.

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.

Pure P2P Networks

Pure P2P Networks

No central server. To connect, we must connect to peers

already inside.

Gnutella 0.4

Gnu + Nutella = Gnutella. Share different types of files

(.jpg, .avi, .mp3, etc).

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.

Gnutella 0.4 : Finding a file

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

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.

Gnutella 0.4 : Time-to-Live (TTL)

Every message has a TTL. We decrease the TTL. TTL(0) = 7, considered enough.

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.

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.

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.

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.

Hybrid P2P Networks

Hybrid P2P Networks

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

Gnutella 0.6

Necessary update due to the crash. We keep the PING, PONG, QUERY and

QUERYHIT messages. New : Routing Tables.

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.

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.

Gnutella 0.6 : Conclusion

We decreased the traffic :Messages reach a wider number of peers,

efficiently. Superpeers « protect » their leafs from

PINGs.

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.

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.

THE END

top related