43
Peer-to-Peer Networks University of Jordan

Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Embed Size (px)

Citation preview

Page 1: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer Networks

University of Jordan

Page 2: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Server/Client Model

What?

Page 3: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Server/Client ModelWhat?

Centralised Server => sole information provider Clients => dumb terminals Clients are so dumb actually I can describe them in 3 letters:

RRR => Request, Receive, and Relay

Page 4: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Server/Client Model

Why?

Page 5: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Server/Client ModelWhy?

Greater ease of maintenance

Data storage is centralised

Updates to that data are far easier to administer

Many mature client-server technologies are already available

It functions with multiple different clients of different capabilities through a formalized, agreed-upon interface.

Page 6: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Server/Client ModelWhy not?

• Bottleneck/overload issues

• Single point of failure (since it’s centralised)

Page 7: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer Model

What?

Page 8: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelWhat?

• Distributed (decentralised)

• No notion of a 'client' or a 'server‘; nodes are known as peers

• Peers provide resources as well as request them

• P2P networks are ‘ad-hoc’

Page 9: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelMore about Peers

For a node to become effectively a peer in a P2P network, it has to share and allow direct access to its resources. The resources a peer might share can range from processing power, disk storage, data, to network bandwidth and whatnot.

The network is known to be 'ad-hoc', as in, the addition or removal of a node in the network does not necessarily affect other nodes.

Page 10: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer Model

P2P systems and their architecture

Page 11: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelArchitecture of P2P Systems

1. Structured

2. Unstructured

1. Pure P2P Systems

2. Hybrid P2P Systems

3. Centralised P2P Systems

Page 12: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelStructured Systems

In structured peer-to-peer networks, connections in the overlay are fixed. They typically use distributed hash table-based (DHT) indexing.

Structured P2P networks employ a globally consistent protocol to ensure that any node can efficiently route a search to some peer that has the desired file, even if the file is extremely rare. Such a guarantee necessitates a more structured pattern of overlay links.

By far the most common type of structured P2P network is the DHT, in which a variant of consistent hashing is used to assign ownership of each file to a particular peer.

Remember Hash tables?[ key => value ] and in this case[ peer => shared files ]

Page 13: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelUnstructured Systems

An unstructured peer-to-peer network is formed when the overlay links are established arbitrarily. Such networks can be easily constructed as a new peer that wants to join the network can copy existing links of another node and then form its own links over time.

Page 14: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelUnstructured Systems

They…• Do not provide any algorithm for organization or

optimization of network connections.• Use flooding for finding all the peers that share the

queried data.• Their search queries may not always be resolved • Have very poor search efficiency

Many of the popular P2P networks are unstructured!

Page 15: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelUnstructured Systems

Pure P2P Systems

Page 16: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelPure P2P Systems

In pure peer-to-peer systems the entire network consists solely of equipotent peers. There is only one routing layer, as there are no preferred nodes with any special infrastructure function.

Page 17: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelUnstructured Systems

Hybrid P2P Systems

Page 18: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelHybrid P2P Systems

Hybrid peer-to-peer systems allow such infrastructure nodes to exist, often called supernodes. Such systems distribute their clients into two groups: client nodes and overlay nodes.

Typically, each client is able to act according to the momentary need of the network and can become part of the respective overlay network used to coordinate the P2P structure.

This division between ‘normal’ and ‘better’ nodes is done in order to address the scaling problems on early pure P2P networks.

Example: Gnutella (after v0.4).

Page 19: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelUnstructured Systems

Centralised P2P Systems (wtf?)

Page 20: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelCentralised P2P Systems

In centralized peer-to-peer systems, a central server is used for indexing functions and to bootstrap the entire system.

Example: eDonkey

Page 21: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer Model

Indexing and resource discovery

How do you find files, even know they’re there?

Page 22: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelIndexing and resource discovery

Older peer-to-peer networks duplicate resources across each node in the network configured to carry that type of information. This allows local searching, but requires much traffic.

Modern networks use central coordinating servers and directed search requests. Central servers are typically used for listing potential peers, coordinating their activities, and searching.

Decentralised searching was first done by flooding search requests out across peers. More efficient directed search strategies, including supernodes and distributed hash tables (DHT), are now used.

Page 23: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer Model

Why?

Page 24: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelWhy?

In P2P networks, all clients provide resources, which may include bandwidth, storage space, and computing power.

Scaleability: As nodes arrive and demand on the system increases, the total capacity of the system also increases. In contrast, in a typical client-server architecture, clients share only their demands with the system, but not their resources. In this case, as more clients join the system, less resources are available to serve each client.

Robustness: The distributed nature of P2P networks also increases robustness, and in pure p2p systems by enabling peers to find the data without relying on a centralized index server. In the latter case, there is no single point of failure in the system.

Page 25: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer Model

Why not?

Page 26: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Peer-to-Peer ModelWhy not?

As with most network systems, insecure and unsigned codes may allow remote access to files on a victim's computer or even compromise the entire network.

In the past this has happened for example to the FastTrack network when anti P2P companies managed to introduce faked chunks into downloads and downloaded files (mostly MP3 files) were unusable afterwards or even contained malicious code. Consequently, the P2P networks of today have seen an enormous increase of their security and file verification mechanisms. Modern hashing, chunk verification and different encryption methods have made most networks resistant to almost any type of attack, even when major parts of the respective network have been replaced by faked or nonfunctional hosts.

Internet service providers (ISPs) have been known to throttle P2P file-sharing traffic due to the high-bandwidth usage. Compared to Web browsing, e-mail or many other uses of the internet, where data is only transferred in short intervals and relative small quantities, P2P file-sharing often consists of relatively heavy bandwidth usage due to ongoing file transfers and swarm/network coordination packets.

A possible solution to this is called P2P caching, where an ISP stores the part of files most accessed by P2P clients in order to save access to the Internet.

Page 27: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

P2P software applications

Page 28: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

P2P software applications include these six key characteristics:

•the user interface runs outsides of a Web browser

•computers in the system can act as both clients and servers

•the software is easy to use and well-integrated

Page 29: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

P2P software applications include these six key characteristics:

•the user interface runs outsides of a Web browser

•computers in the system can act as both clients and servers

•the software is easy to use and well-integrated

Page 30: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

• the application includes tools to support users wanting to create content or add functionality

• the application makes connections with other users

• the application does something new or exciting

Page 32: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Popular P2P Systems

Napster

Gnutella

Kazaa

Page 33: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Napster

A way to share music files with others

Users upload their list of files to Napster server

You send queries to Napster server for files of interest .o Keyword search (artist, song, album, bitrate, etc.)

Napster server replies with IP address of users with matching files

You connect directly to user A to download file

Page 34: Peer-to-Peer Networks University of Jordan. Server/Client Model What?
Page 35: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Central Napster server

Can ensure correct results

Bottleneck for scalability

Single point of failure

Susceptible to denial of serviceoMalicious users

o Lawsuits, legislation

Page 36: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Gnutella

Share any type of files (not just music)

Decentralized search unlike Napster

You ask your neighbours for files of interest

Neighbours ask their neighbours, and so ono TTL field quenches messages after a number of

hops

Users with matching files reply to you

Page 37: Peer-to-Peer Networks University of Jordan. Server/Client Model What?
Page 38: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

DecentralizedoNo single point of failure

oNot as susceptible to denial of service

oCannot ensure correct results

Flooding queries

Search is now distributed but still not scalable

Page 39: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Kazaa (Fasttrack network)

Hybrid of centralized Napster and decentralized Gnutellao Super-peers act as local search hubso Each super-peer is similar to a Napster server for a

small portion of the network

Super-peers are automatically chosen by the system based on their capacities (storage, bandwidth, etc.) and availability (connection time)

Page 40: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Users upload their list of files to a super-peer

Super-peers periodically exchange file lists

You send queries to a super-peer for files of interest

Page 41: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Legal and Copyright Issues of P2P File Sharing

Page 42: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Copyright

Identity theft

Sharing illegal files

Page 43: Peer-to-Peer Networks University of Jordan. Server/Client Model What?

Question

Is P2P (filesharing) legal?

Answer

Yes--but not with copyrighted material...