SlideShare a Scribd company logo
1 of 22
CS8603 Distributed Systems
UNIT 5
P2P & Distributed Shared Memory
csenotescorner.blogspot.com
B. Shanmuga Sundari, AP/CSE, PET
Engg College
PEER TO PEER COMPUTING
• P2P network: application-level organization of the network overlay for
flexibility sharing resources.
• All nodes (called peers) are equal; communication directly between peers
(no client-server)
• Allows to find location of arbitrary objects; no DNS servers required
• Sharing of Large combined storage, CPU power, other resources, without
scalability costs
• Dynamic insertion and deletion of nodes called churn, as well as of
resources, at low cost
• Overlay networks – Overlay networks refer to networks that are
constructed on the top of another network. (eg. IP)
• P2P Overlay network – Any Overlay network that is constructed by the
internet peers in the application layer on the top of the IP network.
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Desirable characteristics and performance
features of P2P systems.
Advantages:
Each computer in the peer to peer network manages itself.
The network is quite easy to set up and maintain
Scalability
Easy deployment and Organization
Disadvantages:
Difficult to back up the data
Difficult to provide overall security
B. Shanmuga Sundari, AP/CSE, PET Engg
College
B. Shanmuga Sundari, AP/CSE, PET Engg
College
• Structured Overlay use some rigid Organizational principles for the object
storage algorithms and Object search algorithms. (eg. Hypercubes, meshes,
butterfly networks)
• Unstructured Overlays use very loose guidelines for Object storage. (eg.
No particular graph structure is used)
Classification of P2P Overlay network
Structured Overlay Unstructured Overlay
Structure for the Placement of
file is highly deterministic,
File insertions and deletions
have some overhead
No structure for Overlay. No structure for
data /file placement.
Fast lookup Node join/ departures easy. Local overlay
simply adjusted
Range queries, keyword
queries, attributed queries
difficult to support
Complex, keyword, range attribute queries
supported
Examples: Chord, CAN,
Pastry
Examples: Freenet, Gnutella, KaZaA,
BitTorrent
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Napster
• Napster used a server-mediated , central index architecture organized around
clusters of servers that store direct indices of the files in the system.
• It was specifically designed for sharing digital music files(in the MP3 format)
across a web connected network.
• Central server maintains a table with the following information of each
registered client: (i) the client's address (IP) and port, and offered bandwidth,
and (ii) information about the files that the client can allow to share.
• A client connects to a meta-server that assigns a lightly-loaded server.
• The client connects to the assigned server and forwards its query and
identity.
• The server responds to the client with information about the users
connected to it and the files they are sharing.
• On receiving the response from the server, the client chooses one of the
users from whom to download a desired file. The address to enable the
P2P connection between the client and the selected user is provided by
the server to the client.
• Users are generally anonymous to each other. The directory serves to provide
the mapping from a particular host that contains the required content, to the IP
address needed to download from it.
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Data indexing
Data identified by indexing, which allows physical data independence from
apps.
• Centralized indexing: This indexing entails the use of one or few central
servers to store references or indexes to the data on many peers. e.g.,
versions of Napster, DNS
• Distributed indexing. Indexes to data scattered across peers. Access data
through mechanisms such as Distributed Hash Tables (DHT). These differ
in hash mapping, search algorithms, diameter for lookup, fault tolerance,
churn resilience.
• Local indexing. Each peer indexes only the local objects. Remote objects
need to be searched for. Typical DHT uses at key space. Used commonly in
unstructured overlays (E.g., Gnutella) along with flooding search or
random walk search.
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Another classication
• Semantic indexing - human readable, e.g., filename, keyword, database
key. Supports keyword searches, range searches, approximate searches.
• Semantic-free indexing. Not human readable. Corresponds to index
obtained by use of hash function.
Simple Distributed Hash Table scheme
Mappings from node
address space and object
space in a simple DHT.
• Highly deterministic
placement of files/data
allows fast lookup.
• But file
insertions/deletions
under churn incurs
some cost.
• Attribute search, range
search, keyword
search etc. not
possible.
B. Shanmuga Sundari, AP/CSE, PET Engg
College
CHORD
• Proposed by Stoica et al. , uses a flat key space to associate mapping
between network nodes and data objects/ files/values.
• The node address as well as object value is mapped to a logical identifier in
a common flat key space using a consistent hash function.
• When a node joins or leaves the network of n nodes, only O(1/n) keys have
to be moved from one location to another.
• Two steps involved.
 Map the object value to its key
 Map the key to the node in the native address space using lookup
• Common address space is a m-bit identier (2m addresses), and this space is
arranged on a logical ring mod(2m).
• A key k gets assigned to the first node such that the node identifier equals
or is greater than the key identifier k in the common identifier space. The
node is the successor of k, denoted by succ(k)
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Example
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Example
• Chord ring for m=7, it can
generates the key upto 0 -
127
• Nodes N5, N18, N23,N28,
N63, N73, N99, N104,
N115, and N119 are shown.
• Six keys, K8,K15, K28,
K53, K87, and K121, are
stored among these nodes as
follows:
Succ(8) = 18, succ(15) = 18,
succ(28) = 28, succ(53) = 63,
succ(87) = 99,
and succ(121) = 5.
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Simple Lookup
B. Shanmuga Sundari, AP/CSE, PET Engg
College
• Lookup(k8) : starts at node
N28
• It checks whether it lies
between N28 and N63
• It is not possible
• Then check N63 and N73.
Simply it goes on until reaches
N5. Checks between N5 and
N18
• It is available, since 8 is
greater than 5 and less than 18
• So it look up K8
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Scalable Lookup
B. Shanmuga Sundari, AP/CSE, PET Engg
College
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Example
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Managing Churn
B. Shanmuga Sundari, AP/CSE, PET Engg
College
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Chord: Integrating a Node in the Ring
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Node failures and departures
• When a node j fails abruptly, its successor i on the ring will discover the
failure when the successor i executes Check_Predecessor() periodically.
• Process i gets a chance to update its predecessor field when another node k
causes i to execute Notify(k). But that can happen only if k’s successor
variable is i.
• This requires the predecessor of the failed node to recognize that its
successor has failed, and get a new functioning successor.
• In fact, the successor pointers are required for object search; the
predecessor variables are required only to accommodate new joiners.
From Algorithm, that knowing that the successor is functional, and that the
nodes pointed to by the finger pointers are functional, is essential.
B. Shanmuga Sundari, AP/CSE, PET Engg
College
B. Shanmuga Sundari, AP/CSE, PET Engg
College
Topics seen
Thank you
B. Shanmuga Sundari, AP/CSE, PET Engg
College

More Related Content

Similar to CS8603 DS UNIT 5.pptx

Lecture 1_Introduction to Networking_1.ppt
Lecture 1_Introduction to Networking_1.pptLecture 1_Introduction to Networking_1.ppt
Lecture 1_Introduction to Networking_1.ppt
flyinimohamed
 

Similar to CS8603 DS UNIT 5.pptx (20)

Peer Sim & P2P
Peer Sim & P2PPeer Sim & P2P
Peer Sim & P2P
 
WSN Routing Protocols
WSN Routing ProtocolsWSN Routing Protocols
WSN Routing Protocols
 
Kademlia introduction
Kademlia introductionKademlia introduction
Kademlia introduction
 
Final peersimp pt
Final peersimp ptFinal peersimp pt
Final peersimp pt
 
Osi model
Osi modelOsi model
Osi model
 
Practical_4_cse307_ppt.ppt
Practical_4_cse307_ppt.pptPractical_4_cse307_ppt.ppt
Practical_4_cse307_ppt.ppt
 
UNIT III DIS.pptx
UNIT III DIS.pptxUNIT III DIS.pptx
UNIT III DIS.pptx
 
Osi week10(1) [autosaved] by Gulshan K Maheshwari(QAU)
Osi week10(1) [autosaved] by Gulshan  K Maheshwari(QAU)Osi week10(1) [autosaved] by Gulshan  K Maheshwari(QAU)
Osi week10(1) [autosaved] by Gulshan K Maheshwari(QAU)
 
IRJET- Estimating Various DHT Protocols
IRJET- Estimating Various DHT ProtocolsIRJET- Estimating Various DHT Protocols
IRJET- Estimating Various DHT Protocols
 
Module 1 Introduction to Computer Networks.pptx
Module 1 Introduction to Computer Networks.pptxModule 1 Introduction to Computer Networks.pptx
Module 1 Introduction to Computer Networks.pptx
 
Chapter_13_Energy-Efficient_WSN_Slides.ppt
Chapter_13_Energy-Efficient_WSN_Slides.pptChapter_13_Energy-Efficient_WSN_Slides.ppt
Chapter_13_Energy-Efficient_WSN_Slides.ppt
 
Implementing a Distributed Hash Table with Scala and Akka
Implementing a Distributed Hash Table with Scala and AkkaImplementing a Distributed Hash Table with Scala and Akka
Implementing a Distributed Hash Table with Scala and Akka
 
Introduction to data communications
Introduction to data communicationsIntroduction to data communications
Introduction to data communications
 
Lecture 1_Introduction to Networking_1.ppt
Lecture 1_Introduction to Networking_1.pptLecture 1_Introduction to Networking_1.ppt
Lecture 1_Introduction to Networking_1.ppt
 
Andrea Sini Thesis
Andrea Sini ThesisAndrea Sini Thesis
Andrea Sini Thesis
 
Introduction to cyber forensics
Introduction to cyber forensicsIntroduction to cyber forensics
Introduction to cyber forensics
 
Topic 1.1 basic concepts of computer network
Topic 1.1 basic concepts of computer networkTopic 1.1 basic concepts of computer network
Topic 1.1 basic concepts of computer network
 
Sonali Bank Network Design Project Report
Sonali Bank Network Design Project ReportSonali Bank Network Design Project Report
Sonali Bank Network Design Project Report
 
System models 2 in distributed system
System models 2 in distributed systemSystem models 2 in distributed system
System models 2 in distributed system
 
Dist sniffing & scanning project
Dist sniffing & scanning projectDist sniffing & scanning project
Dist sniffing & scanning project
 

Recently uploaded

Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
drjose256
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
benjamincojr
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
MaherOthman7
 

Recently uploaded (20)

Independent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging StationIndependent Solar-Powered Electric Vehicle Charging Station
Independent Solar-Powered Electric Vehicle Charging Station
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
Tembisa Central Terminating Pills +27838792658 PHOMOLONG Top Abortion Pills F...
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference Modal
 
engineering chemistry power point presentation
engineering chemistry  power point presentationengineering chemistry  power point presentation
engineering chemistry power point presentation
 
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptxSLIDESHARE PPT-DECISION MAKING METHODS.pptx
SLIDESHARE PPT-DECISION MAKING METHODS.pptx
 
21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university21scheme vtu syllabus of visveraya technological university
21scheme vtu syllabus of visveraya technological university
 
Artificial Intelligence in due diligence
Artificial Intelligence in due diligenceArtificial Intelligence in due diligence
Artificial Intelligence in due diligence
 
Diploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdfDiploma Engineering Drawing Qp-2024 Ece .pdf
Diploma Engineering Drawing Qp-2024 Ece .pdf
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Raashid final report on Embedded Systems
Raashid final report on Embedded SystemsRaashid final report on Embedded Systems
Raashid final report on Embedded Systems
 
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas SachpazisSeismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
Seismic Hazard Assessment Software in Python by Prof. Dr. Costas Sachpazis
 
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...8th International Conference on Soft Computing, Mathematics and Control (SMC ...
8th International Conference on Soft Computing, Mathematics and Control (SMC ...
 
Software Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdfSoftware Engineering Practical File Front Pages.pdf
Software Engineering Practical File Front Pages.pdf
 
Circuit Breakers for Engineering Students
Circuit Breakers for Engineering StudentsCircuit Breakers for Engineering Students
Circuit Breakers for Engineering Students
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
History of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & ModernizationHistory of Indian Railways - the story of Growth & Modernization
History of Indian Railways - the story of Growth & Modernization
 
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptxUNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
 
Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..Maher Othman Interior Design Portfolio..
Maher Othman Interior Design Portfolio..
 

CS8603 DS UNIT 5.pptx

  • 1. CS8603 Distributed Systems UNIT 5 P2P & Distributed Shared Memory csenotescorner.blogspot.com B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 2. PEER TO PEER COMPUTING • P2P network: application-level organization of the network overlay for flexibility sharing resources. • All nodes (called peers) are equal; communication directly between peers (no client-server) • Allows to find location of arbitrary objects; no DNS servers required • Sharing of Large combined storage, CPU power, other resources, without scalability costs • Dynamic insertion and deletion of nodes called churn, as well as of resources, at low cost • Overlay networks – Overlay networks refer to networks that are constructed on the top of another network. (eg. IP) • P2P Overlay network – Any Overlay network that is constructed by the internet peers in the application layer on the top of the IP network. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 3. Desirable characteristics and performance features of P2P systems. Advantages: Each computer in the peer to peer network manages itself. The network is quite easy to set up and maintain Scalability Easy deployment and Organization Disadvantages: Difficult to back up the data Difficult to provide overall security B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 4. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 5. • Structured Overlay use some rigid Organizational principles for the object storage algorithms and Object search algorithms. (eg. Hypercubes, meshes, butterfly networks) • Unstructured Overlays use very loose guidelines for Object storage. (eg. No particular graph structure is used) Classification of P2P Overlay network Structured Overlay Unstructured Overlay Structure for the Placement of file is highly deterministic, File insertions and deletions have some overhead No structure for Overlay. No structure for data /file placement. Fast lookup Node join/ departures easy. Local overlay simply adjusted Range queries, keyword queries, attributed queries difficult to support Complex, keyword, range attribute queries supported Examples: Chord, CAN, Pastry Examples: Freenet, Gnutella, KaZaA, BitTorrent B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 6. Napster • Napster used a server-mediated , central index architecture organized around clusters of servers that store direct indices of the files in the system. • It was specifically designed for sharing digital music files(in the MP3 format) across a web connected network. • Central server maintains a table with the following information of each registered client: (i) the client's address (IP) and port, and offered bandwidth, and (ii) information about the files that the client can allow to share. • A client connects to a meta-server that assigns a lightly-loaded server. • The client connects to the assigned server and forwards its query and identity. • The server responds to the client with information about the users connected to it and the files they are sharing. • On receiving the response from the server, the client chooses one of the users from whom to download a desired file. The address to enable the P2P connection between the client and the selected user is provided by the server to the client. • Users are generally anonymous to each other. The directory serves to provide the mapping from a particular host that contains the required content, to the IP address needed to download from it. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 7. Data indexing Data identified by indexing, which allows physical data independence from apps. • Centralized indexing: This indexing entails the use of one or few central servers to store references or indexes to the data on many peers. e.g., versions of Napster, DNS • Distributed indexing. Indexes to data scattered across peers. Access data through mechanisms such as Distributed Hash Tables (DHT). These differ in hash mapping, search algorithms, diameter for lookup, fault tolerance, churn resilience. • Local indexing. Each peer indexes only the local objects. Remote objects need to be searched for. Typical DHT uses at key space. Used commonly in unstructured overlays (E.g., Gnutella) along with flooding search or random walk search. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 8. Another classication • Semantic indexing - human readable, e.g., filename, keyword, database key. Supports keyword searches, range searches, approximate searches. • Semantic-free indexing. Not human readable. Corresponds to index obtained by use of hash function. Simple Distributed Hash Table scheme Mappings from node address space and object space in a simple DHT. • Highly deterministic placement of files/data allows fast lookup. • But file insertions/deletions under churn incurs some cost. • Attribute search, range search, keyword search etc. not possible. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 9. CHORD • Proposed by Stoica et al. , uses a flat key space to associate mapping between network nodes and data objects/ files/values. • The node address as well as object value is mapped to a logical identifier in a common flat key space using a consistent hash function. • When a node joins or leaves the network of n nodes, only O(1/n) keys have to be moved from one location to another. • Two steps involved.  Map the object value to its key  Map the key to the node in the native address space using lookup • Common address space is a m-bit identier (2m addresses), and this space is arranged on a logical ring mod(2m). • A key k gets assigned to the first node such that the node identifier equals or is greater than the key identifier k in the common identifier space. The node is the successor of k, denoted by succ(k) B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 10. Example B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 11. Example • Chord ring for m=7, it can generates the key upto 0 - 127 • Nodes N5, N18, N23,N28, N63, N73, N99, N104, N115, and N119 are shown. • Six keys, K8,K15, K28, K53, K87, and K121, are stored among these nodes as follows: Succ(8) = 18, succ(15) = 18, succ(28) = 28, succ(53) = 63, succ(87) = 99, and succ(121) = 5. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 12. Simple Lookup B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 13. • Lookup(k8) : starts at node N28 • It checks whether it lies between N28 and N63 • It is not possible • Then check N63 and N73. Simply it goes on until reaches N5. Checks between N5 and N18 • It is available, since 8 is greater than 5 and less than 18 • So it look up K8 B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 14. Scalable Lookup B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 15. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 16. Example B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 17. Managing Churn B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 18. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 19. Chord: Integrating a Node in the Ring B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 20. Node failures and departures • When a node j fails abruptly, its successor i on the ring will discover the failure when the successor i executes Check_Predecessor() periodically. • Process i gets a chance to update its predecessor field when another node k causes i to execute Notify(k). But that can happen only if k’s successor variable is i. • This requires the predecessor of the failed node to recognize that its successor has failed, and get a new functioning successor. • In fact, the successor pointers are required for object search; the predecessor variables are required only to accommodate new joiners. From Algorithm, that knowing that the successor is functional, and that the nodes pointed to by the finger pointers are functional, is essential. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 21. B. Shanmuga Sundari, AP/CSE, PET Engg College
  • 22. Topics seen Thank you B. Shanmuga Sundari, AP/CSE, PET Engg College