1 Telematica di Base Applicazioni P2P. 2 The Peer-to-Peer System Architecture  peer-to-peer is a network architecture where computer resources and services.

Slides:



Advertisements
Similar presentations
P2P data retrieval DHT (Distributed Hash Tables) Partially based on Hellerstein’s presentation at VLDB2004.
Advertisements

2/66 GET /index.html HTTP/1.0 HTTP/ OK... Clients Server.
INF 123 SW ARCH, DIST SYS & INTEROP LECTURE 12 Prof. Crista Lopes.
Peer to Peer and Distributed Hash Tables
Peer-to-Peer Systems Chapter 25. What is Peer-to-Peer (P2P)? Napster? Gnutella? Most people think of P2P as music sharing.
Peer-to-Peer (P2P) Distributed Storage 1Dennis Kafura – CS5204 – Operating Systems.
Clayton Sullivan PEER-TO-PEER NETWORKS. INTRODUCTION What is a Peer-To-Peer Network A Peer Application Overlay Network Network Architecture and System.
Peer-to-Peer Distributed Search. Peer-to-Peer Networks A pure peer-to-peer network is a collection of nodes or peers that: 1.Are autonomous: participants.
Denial-of-Service Resilience in Peer-to-Peer Systems D. Dumitriu, E. Knightly, A. Kuzmanovic, I. Stoica and W. Zwaenepoel Presenter: Yan Gao.
Peer to Peer File Sharing Huseyin Ozgur TAN. What is Peer-to-Peer?  Every node is designed to(but may not by user choice) provide some service that helps.
Cis e-commerce -- lecture #6: Content Distribution Networks and P2P (based on notes from Dr Peter McBurney © )
Topics in Reliable Distributed Systems Lecture 2, Fall Dr. Idit Keidar.
Introduction to Peer-to-Peer (P2P) Systems Gabi Kliot - Computer Science Department, Technion Concurrent and Distributed Computing Course 28/06/2006 The.
Chord-over-Chord Overlay Sudhindra Rao Ph.D Qualifier Exam Department of ECECS.
Topics in Reliable Distributed Systems Fall Dr. Idit Keidar.
Peer To Peer Distributed Systems Pete Keleher. Why Distributed Systems? l Aggregate resources! –memory –disk –CPU cycles l Proximity to physical stuff.
Wide-area cooperative storage with CFS
Peer-to-peer file-sharing over mobile ad hoc networks Gang Ding and Bharat Bhargava Department of Computer Sciences Purdue University Pervasive Computing.
Middleware for P2P architecture Jikai Yin, Shuai Zhang, Ziwen Zhang.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Application Layer Functionality and Protocols Network Fundamentals – Chapter.
SIMULATING A MOBILE PEER-TO-PEER NETWORK Simo Sibakov Department of Communications and Networking (Comnet) Helsinki University of Technology Supervisor:
Introduction to Peer-to-Peer Networks. What is a P2P network Uses the vast resource of the machines at the edge of the Internet to build a network that.
P2P File Sharing Systems
1 Napster & Gnutella An Overview. 2 About Napster Distributed application allowing users to search and exchange MP3 files. Written by Shawn Fanning in.
Network Layer (3). Node lookup in p2p networks Section in the textbook. In a p2p network, each node may provide some kind of service for other.
Peer-to-Peer Overlay Networks. Outline Overview of P2P overlay networks Applications of overlay networks Classification of overlay networks – Structured.
1 Telematica di Base Applicazioni P2P. 2 The Peer-to-Peer System Architecture  peer-to-peer is a network architecture where computer resources and services.
1 P2P Computing. 2 What is P2P? Server-Client model.
Introduction to Peer-to-Peer Networks. What is a P2P network A P2P network is a large distributed system. It uses the vast resource of PCs distributed.
Introduction of P2P systems
Peer-to-Peer Networks University of Jordan. Server/Client Model What?
Chapter 2: Application layer
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail  SMTP,
Jonathan Walpole CSE515 - Distributed Computing Systems 1 Teaching Assistant for CSE515 Rahul Dubey.
2: Application Layer1 Chapter 2 outline r 2.1 Principles of app layer protocols r 2.2 Web and HTTP r 2.3 FTP r 2.4 Electronic Mail r 2.5 DNS r 2.6 Socket.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
Network Computing Laboratory Scalable File Sharing System Using Distributed Hash Table Idea Proposal April 14, 2005 Presentation by Jaesun Han.
1 Peer-to-Peer Systems r Application-layer architectures r Case study: BitTorrent r P2P Search and Distributed Hash Table (DHT)
2: Application Layer1 Chapter 2: Application layer r 2.1 Principles of network applications  app architectures  app requirements r 2.2 Web and HTTP r.
Presentation 1 By: Hitesh Chheda 2/2/2010. Ion Stoica, Robert Morris, David Karger, M. Frans Kaashoek, Hari Balakrishnan MIT Laboratory for Computer Science.
An IP Address Based Caching Scheme for Peer-to-Peer Networks Ronaldo Alves Ferreira Joint work with Ananth Grama and Suresh Jagannathan Department of Computer.
Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications.
Peer-to-Peer Network Tzu-Wei Kuo. Outline What is Peer-to-Peer(P2P)? P2P Architecture Applications Advantages and Weaknesses Security Controversy.
1 Peer-to-Peer Technologies Seminar by: Kunal Goswami (05IT6006) School of Information Technology Guided by: Prof. C.R.Mandal, School of Information Technology.
Scalable Content- Addressable Networks Prepared by Kuhan Paramsothy March 5, 2007.
Peer to Peer A Survey and comparison of peer-to-peer overlay network schemes And so on… Chulhyun Park
1 University of California, Irvine Done By : Ala Khalifeh (Note : Not Presented)
1 Secure Peer-to-Peer File Sharing Frans Kaashoek, David Karger, Robert Morris, Ion Stoica, Hari Balakrishnan MIT Laboratory.
1. Outline  Introduction  Different Mechanisms Broadcasting Multicasting Forward Pointers Home-based approach Distributed Hash Tables Hierarchical approaches.
ITGS Network Architecture. ITGS Network architecture –The way computers are logically organized on a network, and the role each takes. Client/server network.
ADVANCED COMPUTER NETWORKS Peer-Peer (P2P) Networks 1.
Peer to Peer Network Design Discovery and Routing algorithms
Algorithms and Techniques in Structured Scalable Peer-to-Peer Networks
Peer-to-Peer Systems: An Overview Hongyu Li. Outline  Introduction  Characteristics of P2P  Algorithms  P2P Applications  Conclusion.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 37 – Introduction to P2P (Part 1) Klara Nahrstedt.
Two Peer-to-Peer Networking Approaches Ken Calvert Net Seminar, 23 October 2001 Note: Many slides “borrowed” from S. Ratnasamy’s Qualifying Exam talk.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
CS 347Notes081 CS 347: Parallel and Distributed Data Management Notes 08: P2P Systems.
P2P Search COP6731 Advanced Database Systems. P2P Computing  Powerful personal computer Share computing resources P2P Computing  Advantages: Shared.
P2P Search COP P2P Search Techniques Centralized P2P systems  e.g. Napster, Decentralized & unstructured P2P systems  e.g. Gnutella.
Malugo – a scalable peer-to-peer storage system..
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
CS Spring 2010 CS 414 – Multimedia Systems Design Lecture 24 – Introduction to Peer-to-Peer (P2P) Systems Klara Nahrstedt (presented by Long Vu)
A Survey of Peer-to-Peer Content Distribution Technologies Stephanos Androutsellis-Theotokis and Diomidis Spinellis ACM Computing Surveys, December 2004.
An example of peer-to-peer application
Peer-to-Peer Data Management
CHAPTER 3 Architectures for Distributed Systems
Telematica di Base Applicazioni P2P.
#02 Peer to Peer Networking
Presentation transcript:

1 Telematica di Base Applicazioni P2P

2 The Peer-to-Peer System Architecture  peer-to-peer is a network architecture where computer resources and services are direct exchanged between computer systems.  In such an architecture, computers that have traditionally been used solely as clients communicate directly among themselves and can act as both clients and servers, assuming whatever role is most efficient for the network.   peer-to-peer is a network architecture where computer resources and services are direct exchanged between computer systems.  In such an architecture, computers that have traditionally been used solely as clients communicate directly among themselves and can act as both clients and servers, assuming whatever role is most efficient for the network. 

 Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or work loads between peers. Peers are equally privileged, equipotent participants in the application. They are said to form a peer-to-peer network of nodes.  Peers make a portion of their resources, such as processing power, disk storage or network bandwidth, directly available to other network participants, without the need for central coordination by servers or stable hosts.  Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or work loads between peers. Peers are equally privileged, equipotent participants in the application. They are said to form a peer-to-peer network of nodes.  Peers make a portion of their resources, such as processing power, disk storage or network bandwidth, directly available to other network participants, without the need for central coordination by servers or stable hosts. 3

4 Definition of P2P “P2P is a way of structuring distributed applications such that the individual nodes have symmetric roles. Rather than being divided into clients and servers each with quite distinct roles, in P2P applications a node may act as both a client and a server.” Excerpt from the Charter of Peer-to-Peer research Group, IETF/IRTF, June 24, 2003 “P2P is a way of structuring distributed applications such that the individual nodes have symmetric roles. Rather than being divided into clients and servers each with quite distinct roles, in P2P applications a node may act as both a client and a server.” Excerpt from the Charter of Peer-to-Peer research Group, IETF/IRTF, June 24, 2003

5 P2P  In the peer-to-peer paradigm, the participating processes play equal roles, with equivalent capabilities and responsibilities (hence the term “ peer ” ).  Each participant may issue a request to another participant and receive a response.  In the peer-to-peer paradigm, the participating processes play equal roles, with equivalent capabilities and responsibilities (hence the term “ peer ” ).  Each participant may issue a request to another participant and receive a response.

6 P2P The peer-to-peer paradigm is appropriate for applications such as instant messaging, peer-to-peer file transfers, video conferencing, and collaborative work.

7

8 The nodes in the overlay network form a subset of the nodes in the physical network. Data is still exchanged directly over the underlying TCP/IP network, but at the application layer peers are able to communicate with each other directly, via the logical overlay links (each of which corresponds to a path through the underlying physical network). The choice of which nodes belong to the overly network depends from the particular method used for store and lookup resources. Overlays make the P2P system independent from the physical network topology.

Peer- to -peer basics operations  BOOT: input into the peer to peer infrastructure  LOOKUP: resource localization  FILE SHARING  BOOT: input into the peer to peer infrastructure  LOOKUP: resource localization  FILE SHARING 9

Peer to Peer classification (lookup techniques) Peer to Peer infrastructure centralized approach decentralized approach Peer to Peer infrastructure centralized approach decentralized approach 10

Centralized approach 11 Napster Sharing of MP3 music files In 1993 record companies prosecute Napster (copy right) In 2002 Napster ceased operations. («Napster was here») In 2011 it becames on online paid music store

12 NAPSTER 1)The peers establishe a connection to a centralized server - IP address - Shared information 2) Alice produces a query to find “Hey Jude” 3) Alice downloads the file from Bob NAPSTER 1)The peers establishe a connection to a centralized server - IP address - Shared information 2) Alice produces a query to find “Hey Jude” 3) Alice downloads the file from Bob centralized directory server peers Alice Bob P2P:Centralized Directory

Napster behaviour  When a node enters the infrastructure, using a Napster client, its identity and a list of files stored in its disk memory are loaded in the central server.  When a node looks for a particular file it sends a query to the central server.  Depending on the obtained results the node connects to another node to download the require file  When a node enters the infrastructure, using a Napster client, its identity and a list of files stored in its disk memory are loaded in the central server.  When a node looks for a particular file it sends a query to the central server.  Depending on the obtained results the node connects to another node to download the require file 13

14 Discussion  Single failure point  limited performance  Copyright ….  Single failure point  limited performance  Copyright …. Two aspects a)distributed file transfer b) centralized information

15 Decentralized approach No structured Structured

16 Unstructured networks Unstructured peer-to-peer networks do not impose a particular structure on the overlay network by design, but rather are formed by nodes that randomly form connections to each other. (Gnutella, Kazaa) Because there is no structure globally imposed upon them, unstructured networks are easy to build. Also, because the role of all peers in the network is the same, unstructured networks are highly robust ( large numbers of peers can frequently joining and leaving the network).

17 When a peer wants to find a piece of data in the network, the search query must be flooded through the network to find as many peers as possible that share the data. Flooding causes a very high amount of signaling traffic in the network, uses more CPU/memory (by requiring every peer to process all search queries), and does not ensure that search queries will always be resolved. Furthermore, since there is no correlation between a peer and the content managed by it, there is no guarantee that flooding will find a peer that has the desired data.

Gnutella 18 The first decentralized peer-to-peer network (2000). The name is a portmanteau of GNU and Nutella. Supposedly, Frankel and Pepper ate a lot of Nutella working on the original project, and intended to license their finished program under the GNU General Public License

Gnutella 19 It is one of the first systems wich does not depend from a centralized directory. Each node which implements Gnutella protocol knows a set of different nodes which implement the same protocol. Query message. Sent by a node to a close node with the specification of the request object. Query response. If one of the close nodes owns the object replays giving IP and port number.

20 If the node that received the request is not able to satisfy it, send the Query message to each of the own close nodes belonging to the overlay network and the process repeats.. QID (query identifier). Each Query message contains QID, but does not contain the identity of the node of the original message. Each node manages a directory of the Query messages recently received, storing the QID of the close node which sent the message. Every time that a node receives a Query Response from a close node, send the response to the close node that sent the request.In this way the response flows to the source node without none of the intermediate nods knows the source node.

21 Gnutella Query QueryHit Query QueryHit Query QueryHit File transfer: HTTP GET r

22 Gnutella:innovative features overlay network  Peers are nodes  Connections among peers  Virtual network bootstrap node  a connecting peer (peer join) must find a peer in the overlay network overlay network  Peers are nodes  Connections among peers  Virtual network bootstrap node  a connecting peer (peer join) must find a peer in the overlay network vantages  There is’nt a centralized directory  The localization service is distributed among the peers disavantages  Query flooding  Restriction of the area of the query

23 KaZaA  peer structure  Peer = group leader o it is associated to a group leader.  TCP with Peer -- Group leader  TCP cons among pairs of group leader.  Group leaders: is a particular type of centralized directory for the peers associated to the group  peer structure  Peer = group leader o it is associated to a group leader.  TCP with Peer -- Group leader  TCP cons among pairs of group leader.  Group leaders: is a particular type of centralized directory for the peers associated to the group

24

25

26 These systems differed in how they located the data offered by their peers. Napster, required a central index server: each node, upon joining, would send a list of locally held files to the server, which would perform searches and refer the querier to the nodes that held the results. This central component left the system vulnerable to attacks and lawsuits. Gnutella and similar networks moved to a flooding query model – in essence, each search would result in a message being broadcast to every other machine in the network. While avoiding a single point of failure, this method was significantly less efficient than Napster.

27 Structured networks In structured peer-to-peer networks the overlay is organized into a specific topology, and the protocol ensures that any node can efficiently search the network for a file/resource, even if the resource is extremely rare. Distributed hash tables (DHT) use a more structured key- based routing in order to attain both the decentralization of Gnutella, and the efficiency and guaranteed results of Napster. Nodes and keys are assigned a m-bit identifier using consistent hashing. Both keys and nodes are uniformely distributed in the identifier space with a negligible possibility of collision.

Hash Functions  A hash value is generated by a function H of the form h=H(M) where M is a variable-length message and H(M) is the fixed-length hash value.  The purpose of a hash function is to produce a “ digest” of a file, message or other block of data.  A hash value is generated by a function H of the form h=H(M) where M is a variable-length message and H(M) is the fixed-length hash value.  The purpose of a hash function is to produce a “ digest” of a file, message or other block of data.

Requirements for a hash function : - H can be applied to a block of data of any size. -H produces a fixed -length output. -H(x) is relatively easy to compute for any given x, making both hardware and software implementations practical. -For any given code h, it is computationally infeasible to find x such that H(x)=h (one- way property) -

30 It is computationally infeasible to find any pair (x,y) such that H(x)= H(Y). This is sometimes referred to as strong collision resistance The H(x) values are uniformely distributed in the identifier space with a negligible possibility of collision. (consistent hashing)

Chord Algorithm Nodes and keys are assigned a m-bit identifier using consistent hashing. Nodes and keys are arranged in a identifier circle that has at most 2 m nodes, ranging from 0 to 2 m - 1 (m should be large enough to avoid collision). Each node has a successor and a predecessor. The successor to a node is the next node in the identifier circle in a clockwise direction. The predecessor is counter- clockwise. If there is a node for each possible ID (node identifier), the successor of node 0 is 1 and the predecessor of node 0 is 2 m - However, normally there are holes in the sequence. Nodes and keys are assigned a m-bit identifier using consistent hashing. Nodes and keys are arranged in a identifier circle that has at most 2 m nodes, ranging from 0 to 2 m - 1 (m should be large enough to avoid collision). Each node has a successor and a predecessor. The successor to a node is the next node in the identifier circle in a clockwise direction. The predecessor is counter- clockwise. If there is a node for each possible ID (node identifier), the successor of node 0 is 1 and the predecessor of node 0 is 2 m - However, normally there are holes in the sequence. 31

32 Ex: the successor of node 153 may be node 167 (nodes from 154 to 166 do not exist). The predessor of node 167 will be node 153. The concept of successor can be used for keys as well. The successor node of a key k is the first node whose ID equals to k or follows k in the identifier circle, denoted by successor (k). If i 1 and i 2 are two adjacent IDs, the node with ID i 2 is the owner of all the keys included between i 1 and i 2. The requested key requested or to be stored is sent node by node in the overlay network. In each node is contained the successor of the node. Every key is assigned (stored at) to its successor node, so looking up a key k is to query successor (k).

33 P2P Communications: IM  Istant Messaging  central server with the buddy list  User connects the server  chatting among peers  centralized server  Solution like Napster  Istant Messaging  central server with the buddy list  User connects the server  chatting among peers  centralized server  Solution like Napster

34 P2P Communications  Skype: Internet Telephony Software  It allows to use internet for telephone calls.  telephonic networks reached via internet  Architecture analogous to KaZaA  Skype: Internet Telephony Software  It allows to use internet for telephone calls.  telephonic networks reached via internet  Architecture analogous to KaZaA

35 Skype  Proprietary application: technical description is not available  Some informations:  Central server for “billing”  GroupLeader as KaZaA  Similar features  directory service for the on-line users  Proprietary application: technical description is not available  Some informations:  Central server for “billing”  GroupLeader as KaZaA  Similar features  directory service for the on-line users

36 Three components:  user agent  mail server  simple mail transfer protocol: smtp User Agent  features: reading, writing and sending mail  Eudora, Outlook, Pine, MacMail  Messages are stored in the server Three components:  user agent  mail server  simple mail transfer protocol: smtp User Agent  features: reading, writing and sending mail  Eudora, Outlook, Pine, MacMail  Messages are stored in the server user mailbox outgoing message queue mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP

37 mail server Mail Server  mailbox contains messages not i msg non still read by the users  Smtp: communication protocol among the mail servers Mail Server  mailbox contains messages not i msg non still read by the users  Smtp: communication protocol among the mail servers mail server user agent user agent user agent mail server user agent user agent mail server user agent SMTP

38 Alice e Bob 1) Alice sends a to 2) The message is inserted in the queue of the mail server 3) SMTP (client side) defines a connection TCP with the Bob mail server 1) Alice sends a to 2) The message is inserted in the queue of the mail server 3) SMTP (client side) defines a connection TCP with the Bob mail server 4) SMTP (client side) sends the Alice message on the TCP connection 5)The mailserver of Bob stores the message in the mailbox of Bob 6) Bob read the message using its user agent (POP3 o IMAP) user agent mail server mail server user agent