Distributed Systems CS 15-440 Programming Models- Part I Lecture 13, Oct 13, 2014 Mohammad Hammoud 1.

Slides:



Advertisements
Similar presentations
CS 542: Topics in Distributed Systems Diganta Goswami.
Advertisements

CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
Distributed Systems CS Synchronization Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
Clayton Sullivan PEER-TO-PEER NETWORKS. INTRODUCTION What is a Peer-To-Peer Network A Peer Application Overlay Network Network Architecture and System.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
Common approach 1. Define space: assign random ID (160-bit) to each node and key 2. Define a metric topology in this space,  that is, the space of keys.
Rheeve: A Plug-n-Play Peer- to-Peer Computing Platform Wang-kee Poon and Jiannong Cao Department of Computing, The Hong Kong Polytechnic University ICDCSW.
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.
CS603 Advanced Topics in Distributed Systems MWF 13:30-14:30 RHPH 162 Professor Chris Clifton.
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
Distributed Systems CS Naming – Part II Lecture 6, Sep 26, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
Distributed Systems CS Synchronization – Part II Lecture 8, Sep 28, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
Distributed Systems CS Synchronization – Part III Lecture 9, Oct 3, 2011 Majd F. Sakr, Vinay Kolar, Mohammad Hammoud.
1 CS 603: Advanced Topics in Distributed Systems Spring 2002 Professor Chris Clifton.
Coordination in Distributed Systems Lecture # 8. Coordination Anecdotes  Decentralized, no coordination  Aloha ~ 18%  Some coordinating Master  Slotted.
Topics in Reliable Distributed Systems Fall Dr. Idit Keidar.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
1CS 6401 Peer-to-Peer Networks Outline Overview Gnutella Structured Overlays BitTorrent.
Election Algorithms and Distributed Processing Section 6.5.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Systems (15-440) Mohammad Hammoud December 4 th, 2013.
Tapestry GTK Devaroy (07CS1012) Kintali Bala Kishan (07CS1024) G Rahul (07CS3009)
Peer-to-Peer Overlay Networks. Outline Overview of P2P overlay networks Applications of overlay networks Classification of overlay networks – Structured.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 2 ARCHITECTURES.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 6 Synchronization.
Institute of Computer and Communication Network Engineering OFC/NFOEC, 6-10 March 2011, Los Angeles, CA Lessons Learned From Implementing a Path Computation.
Election AlgorithmsCS-4513, D-Term Synchronization (continued) CS-4513 D-Term 2007 (Slides include materials from Operating System Concepts, 7 th.
Introduction of P2P systems
5.1 Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Peer to Peer Research survey TingYang Chang. Intro. Of P2P Computers of the system was known as peers which sharing data files with each other. Build.
Distributed Systems CS Synchronization – Part III Lecture 12, Oct 1, 2014 Mohammad Hammoud.
Jonathan Walpole CSE515 - Distributed Computing Systems 1 Teaching Assistant for CSE515 Rahul Dubey.
Chord: A Scalable Peer-to-peer Lookup Protocol for Internet Applications Xiaozhou Li COS 461: Computer Networks (precept 04/06/12) Princeton University.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 2 ARCHITECTURES.
BitTorrent enabled Ad Hoc Group 1  Garvit Singh( )  Nitin Sharma( )  Aashna Goyal( )  Radhika Medury( )
Lecture 5: Sun: 1/5/ Distributed Algorithms - Distributed Databases Lecturer/ Kawther Abas CS- 492 : Distributed system &
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Naming Name distribution: use hierarchies DNS X.500 and LDAP.
DISTRIBUTED COMPUTING PARADIGMS. Paradigm? A MODEL 2for notes
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Page 1 Distributed Systems Election Algorithms* *referred to slides by Prof. Hugh C. Lauer at Worcester Polytechnic Institute.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Systems CS Synchronization – Part III Lecture 10, Sep 30, 2013 Mohammad Hammoud.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1. Outline  Introduction  Different Mechanisms Broadcasting Multicasting Forward Pointers Home-based approach Distributed Hash Tables Hierarchical approaches.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
6.5 Election Algorithms -Avinash Madineni.
Seminar on Service Oriented Architecture Distributed Systems Architectural Models From Coulouris, 5 th Ed. SOA Seminar Coulouris 5Ed.1.
Algorithms and Techniques in Structured Scalable Peer-to-Peer Networks
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed systems. distributed systems and protocols distributed systems: use components located at networked computers use message-passing to coordinate.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 6: Synchronyzation 3/5/20161 Distributed Systems - COMP 655.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
CHAPTER 3 Architectures for Distributed Systems
IS 651: Distributed Systems Midterm
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Distributed Systems CS
Distributed Systems (15-440)
Presentation transcript:

Distributed Systems CS Programming Models- Part I Lecture 13, Oct 13, 2014 Mohammad Hammoud 1

Today…  Part 1 of the Session:  Election Algorithms  Midterm Overview  Part 2 of the Session:  Programming Models – Part I  Announcements:  PS3 is due today by 11:59PM  Midterm exam will be on Wednesday, Oct 15 th (during the class time)- Open book, open notes  P2 is due on Oct 23, 2014 by midnight  PS2 grades are out 2

Election in Distributed Systems Many distributed algorithms require one process to act as a coordinator Typically, it does not matter which process is elected as the coordinator 3 Client 1 Server Resource P1 Coordinator C1 A Centralized Mutual Exclusion Algorithm Time server Berkeley Clock Synchronization Algorithm Home Node Selection in Naming Root node selection in Multicasting

Election Process Any process P i in the DS can initiate the election algorithm that elects a new coordinator At the termination of the election algorithm, the elected coordinator process should be unique Every process may know the process ID of every other processes, but it does not know which processes have crashed Generally, we require that the coordinator is the process with the largest process ID The idea can be extended to elect best coordinator Example: Election of a coordinator with least computational load If the computational load of process P i denoted by load i, then coordinator is the process with highest 1/load i. Ties are broken by sorting process ID. 4

Election Algorithms We will study two election algorithms 1.Bully Algorithm 2.Ring Algorithm 5

1. Bully Algorithm A process initiates election algorithm when it notices that the existing coordinator is not responding Process P i calls for an election as follows: P i sends an “Election” message to all processes with higher process IDs 2.When process P j with j>i receives the message, it responds with a “Take-over” message. P i no more contests in the election i.Process P j re-initiates another call for election. Steps 1 and 2 continue 3.If no one responds, P i wins the election. P i sends “Coordinator” message to every process Election Take-Over Take-over Election Take-Over Coordinator

Ring Algorithm This algorithm is generally used in a ring topology When a process P i detects that the coordinator has crashed, it initiates an election algorithm 7 1.P i builds an “Election” message ( E), and sends it to its next node. It inserts its ID into the Election message 2.When process P j receives the message, it appends its ID and forwards the message i.If the next node has crashed, P j finds the next alive node 3.When the message gets back to the process that started the election: i.it elects process with highest ID as coordinator, and ii.changes the message type to “Coordination” message ( C ) and circulates it in the ring E: 5 E: 5,6 E: 5,6,0E: 5,6,0,1 E: 5,6,0,1,2 E: 5,6,0,1,2,3 E: 5,6,0,1,2,3,4 C: 6

Comparison of Election Algorithms Assume that: n = Number of processes in the distributed system 8 Algorithm Number of Messages for Electing a Coordinator Problems Bully Algorithm Ring Algorithm O(n 2 ) Large message overhead 2n An overlay ring topology is necessary

Summary of Election Algorithms Election algorithms are used for choosing a unique process that will coordinate certain activities At the end of the election algorithm, all nodes should uniquely identify the coordinator We studied two algorithms for election Bully algorithm Processes communicate in a distributed manner to elect a coordinator Ring algorithm Processes in a ring topology circulate election messages to choose a coordinator 9

Election in Large-Scale Networks Bully Algorithm and Ring Algorithm scale poorly with the size of the network Bully Algorithm needs O(n 2 ) messages Ring Algorithm requires maintaining a ring topology and requires 2n messages to elect a leader In large networks, these approaches do not scale well We discuss a scalable election algorithm for large-scale peer- to-peer networks 10

Election in Large-Scale Peer-to-Peer Networks Many P2P networks have a hierarchical architecture for balancing the advantages between centralized and distributed networks Typically, P2P networks are neither completely unstructured nor completely centralized Centralized networks are efficient and, they easily facilitate locating entities and data Flat unstructured peer-to-peer networks are robust, autonomous and balances load between all peers 11

Super-peers In large unstructured Peer-to-Peer Networks, the network is organized into peers and super-peers A super-peer is an entity that does not only participate as a peer, but also carries on an additional role of acting as a leader for a set of peers Super-peer acts as a server for a set of client peers All communication from and to a regular peer proceeds through a super-peer It is expected that super-peers are long-lived nodes with high- availability 12 Regular Peer Super Peer Super-Peer Network

Super-Peers – Election Requirements In a hierarchical P2P network, several nodes have to be selected as super-peers Traditionally, only one node is selected as a coordinator Requirements for a node being elected as a super-peer Super-peers should be evenly distributed across the overlay network There should be a predefined proportion of super-peers relative to the number of regular peers Each super-peer should not need to serve more than a fixed number of regular peers 13

Election of Super-peers in a DHT-based system 14 k m Recall: In a DHT-based system each node receives a random, uniformly assigned m-bit identifier We reserve first k-bits to identify super-peers E.g., let m = 8 and k = 3 Route key p to p AND Proportion of super-peers If we need N super-peers, then k = log 2 (N) bits

Midterm A Quick Overview 15

Course Objectives The course aims at providing an in- depth and hands-on understanding on Principles on which distributed systems are based Principles on which distributed systems are optimized Distributed system programming models and analytics engines How modern distributed systems meet the demands of contemporary distributed applications

List of Topics.1. Architectures and Communications.2. Naming.3. Synchronization.4. Programming Models.5. Consistency and Replication.6. Fault Tolerance.7. Distributed File Systems.8. Virtualization Considered: a reasonably critical and comprehensive understanding. Thoughtful: Fluent, flexible and efficient understanding. Masterful: a powerful and illuminating understanding. Included in the Midterm

Course Content  Course Overview and Introduction (2 Lectures): Why distributed systems? Defining distributed systems Course overview and intended learning outcomes Trends in distributed systems High performance platforms Mobile and ubiquities computing Cloud computing Etc., Challenges in designing distributed systems Heterogeneity, openness, security, scalability, reliability, concurrency, transparency and quality of service

Course Content  Architectural Models (1 Lecture): Client-server, peer-to-peer, tiered and layered architectures  Networking (1 Lecture): Types of networks Networking principles: Network classification Network Layers (Physical, data-link, network and transport layers) Congestion control

Course Content  Communication Paradigms (1 Lecture): Socket communication TCP and UDP sockets Remote invocation RPC and RMI Indirect communication Message-queuing, publish-subscribe, and group communication systems

Course Content  Naming (2 Lectures): Flat naming Broadcasting, forwarding pointers, home- based naming, and distributed hash tables Structured naming Hierarchical name spaces, name resolution, linking and mounting Attribute-based naming LDAP and RDF

Course Content  Synchronization (3 Lectures): Time synchronization Physical clocks (UTC, Cristian & Berkeley Algorithms and Network Time Protocol) Logical clocks (Lamport and vector clocks) Distributed Mutual Exclusion Permission-based Token-based Election Algorithms Bully and Ring algorithms