CS 620 Advanced Operating Systems Lecture 4 – Distributed System Architectures Professor Timothy Arndt BU 331.

Slides:



Advertisements
Similar presentations
CAN 1.Distributed Hash Tables a)DHT recap b)Uses c)Example – CAN.
Advertisements

Peer to Peer and Distributed Hash Tables
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Definition of a Distributed System (1) A distributed system is: A collection of independent computers that appears to its users as a single coherent system.
Distributed Processing, Client/Server, and Clusters
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.
Based on last years lecture notes, used by Juha Takkinen.
Fall 2007cs4251 Distributed Computing Umar Kalim Dept. of Communication Systems Engineering 31/10/2007.
A Scalable Content-Addressable Network Authors: S. Ratnasamy, P. Francis, M. Handley, R. Karp, S. Shenker University of California, Berkeley Presenter:
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
The Client-Server Model –In this model, the system is structured as a collection of users (clients) and providers (servers) of services. –This provides.
Topics in Reliable Distributed Systems Fall Dr. Idit Keidar.
P2P Course, Structured systems 1 Introduction (26/10/05)
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
Chapter 4.1 Interprocess Communication And Coordination By Shruti Poundarik.
Architectures for Distributed Systems
Introduction to client/server architecture
1CS 6401 Peer-to-Peer Networks Outline Overview Gnutella Structured Overlays BitTorrent.
Roger ZimmermannCOMPSAC 2004, September 30 Spatial Data Query Support in Peer-to-Peer Systems Roger Zimmermann, Wei-Shinn Ku, and Haojun Wang Computer.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 2 ARCHITECTURES.
1 Distributed Systems Architectures Chapter 2. 2 Course/Slides Credits Note: all course presentations are based on those developed by Andrew S. Tanenbaum.
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.
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.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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 Chapter 2 ARCHITECTURES.
CS1Q Computer Systems Lecture 17 Simon Gay. Lecture 17CS1Q Computer Systems - Simon Gay2 The Layered Model of Networks It is useful to think of networks.
Content Addressable Network CAN. The CAN is essentially a distributed Internet-scale hash table that maps file names to their location in the network.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Kyung Hee University 1/41 Introduction Chapter 1.
DISTRIBUTED COMPUTING Introduction Dr. Yingwu Zhu.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
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.
Databases Illuminated
1 Peer-to-Peer Technologies Seminar by: Kunal Goswami (05IT6006) School of Information Technology Guided by: Prof. C.R.Mandal, School of Information Technology.
Architectures for Distributed Systems Chapter 2. Definitions Software Architectures – describe the organization and interaction of software components.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Lecture 12 Distributed Hash Tables CPE 401/601 Computer Network Systems slides are modified from Jennifer Rexford.
Distributed (Operating) Systems -Architectures- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University.
Definition of a Distributed System (1) A distributed system is: A collection of independent computers that appears to its users as a single coherent system.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
ICS362 – Distributed Systems Dr. Ken Cosh Week 2.
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Data Communications and Networks Chapter 9 – Distributed Systems ICT-BVF8.1- Data Communications and Network Trainer: Dr. Abbes Sebihi.
Algorithms and Techniques in Structured Scalable Peer-to-Peer Networks
第 1 讲 分布式系统概述 §1.1 分布式系统的定义 §1.2 分布式系统分类 §1.3 分布式系统体系结构.
INTERNET TECHNOLOGIES Week 10 Peer to Peer Paradigm 1.
P2P Search COP P2P Search Techniques Centralized P2P systems  e.g. Napster, Decentralized & unstructured P2P systems  e.g. Gnutella.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Architectural.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Communication in Distributed Systems. . The single most important difference between a distributed system and a uniprocessor system is the interprocess.
A Survey of Peer-to-Peer Content Distribution Technologies Stephanos Androutsellis-Theotokis and Diomidis Spinellis ACM Computing Surveys, December 2004.
Last Class: Introduction
Definition of Distributed System
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
CHAPTER 3 Architectures for Distributed Systems
Introduction to client/server architecture
Prof. Leonardo Mostarda University of Camerino
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Presentation transcript:

CS 620 Advanced Operating Systems Lecture 4 – Distributed System Architectures Professor Timothy Arndt BU 331

Architectures We distinguish between software architectures (how are software module/components structured) and system architectures in which how the placement of the modules/components on several (distributed) machines is the main issue. In the rest of this lecture we will examine several different system architectures.

The Client-Server Model –In this model, the system is structured as a collection of users (clients) and providers (servers) of services. –This is an example of a centralized architecture

Clients and Servers General interaction between a client and a server.

Clients and Servers Example C source code for a simple file server structured as a client-server application is given in the following three slides.

An Example Client and Server (1) The header.h file for a trivial file server.

An Example Client and Server (2) A sample server - typically with infinite loop.

An Example Client and Server (3) A client using the server to copy a file b

Multitiered Architectures The decision of how to divide up the workload between the client and the server is essentially arbitrary – many different choices can be made –Running only a bare minimum of the application on the client leads to the thin client approach –For more powerful clients, to avoid overloading the server, we may adopt a fat client approach

Client-Server Architectures Alternative client-server organizations (a) – (e). 1-29

Multitiered Architectures The concept of client-server can be extended by having the server machine act as a client for another server (e.g. first server is the web server, second is the database server). –This gives us a three-tiered architecture. –The complete generalization of client-server is a multitiered architecture.

Three-tiered Architecture An example of a server acting as a client. 1-30

Client-Server Clusters A single server can easily become overloaded. One solution is to replicate the server and use a single machine as a front end to redirect client requests. This can lead to the front end becoming a bottleneck.

Web Server Cluster An example of horizontal distribution of a Web service. 1-31

Client-Server Design Issues –Addressing the server. Need to specify the machine that the server is on and the "process" number. Actually it is more common to use the port number. Server tells kernel that it wants to listen on this port. –Can we avoid giving the machine name (location transparency)? We could have each server pick a random number from a large space (so the probability of duplicates is low).

Client-Server Design Issues –When a client wants a service S it broadcasts an I need S and the server supplying S responds with its location. So now the client knows the address. –This first broadcast and reply can be used to eliminate duplicate servers (if desired) and different services accidentally using the same number. Another method is to use a name server that has a mapping from service names to locations (and ports).

Client-Server Design Issues At startup servers tell the name server their location. Is the name server a bottleneck? –We can replicate it and keep it consistent (horizontal distribution). –Blocking vs. non-blocking. Synchronous vs. asynchronous. Send and receive synchronous is often called rendezvous. Asynchronous send: Do not wait for the message to be received, return control immediately. –How can you re-use the message variable?

Client-Server Design Issues Have the kernel copy the message and then return. This costs performance. Don't copy but send an interrupt when message sent. This makes programming harder. Offer a system call to tell when the message has been sent. –Similar to above but "easier" to program. –However it is difficult to guess how often to ask if the message has been sent. –Asynchronous Receive: Return control before kernel has filled in message variable with received messages.

Client-Server Design Issues –How can this be useful? Wait system call (until message available). Test system call (has message arrived). Conditional receive (receive or announce no message yet). Interrupt. None of these is perfect. –Timeouts If we have blocking primitives, send or receive could wait forever. Some systems/languages offer timeouts.

Client-Server Design Issues Buffered vs. unbuffered. –If unbuffered, the receiver tells where to put the message. This doesn't work if an asynchronous send is done before the receive (where does the kernel put the message?). –For buffered, the kernel keeps the message (in a mailbox) until the receiver asks for it. This raises buffer management questions.

Client-Server Design Issues Reliable vs. Unreliable Primitives –We can define the send primitive to be unreliable. Error checking is done at a higher level. –Kernel can acknowledge every message. Senders and repliers keep message until they receive an ack. –Kernel can use reply to ack every request but explicitly ack replies.

Client-Server Design Issues –Kernel can use reply as ack to every request but not ack replies. Client will resend request if the reply doesn’t reply in time. Not always good (e.g. if server had to work hard to calculate reply). –Kernel at client end can deliver request and send ack if reply not forthcoming soon enough. Again it can either ack the reply or not.

The Client-Server Model

Decentralized Architectures Multitiered client-server architectures can be described as using vertical distribution –Analogy to vertical fragmentation in distributed database systems If we distribute the processing in a uniform manner among the hosts, we are using horizontal distribution (analogy to horizontal fragmentation in ddbms) This describes peer-to-peer systems

Peer-to-Peer Architectures In the peer-to-peer approach, each system participating in the architecture has a similar role. –Each system acts as both client and server. –Key issues in P2P include Development of an abstract overlay network for communication among peers Partitioning the (tasks, workload, data items) among the peers –Should do this in such a way as to achieve load balancing, ease of joining/leaving network, ease of locating resources, etc.

Structured Peer-to-Peer Architectures P2P networks can be either structured or unstructured. In a structured P2P network, the overlay network is constructed using a deterministic procedure. –A popular approach is to use an approach called distributed hash table (DHT) Nodes and data items are randomly assigned keys from a large keyspace The keyspace is then partitioned so that each node is associated with a unique set of keys

Structured Peer-to-Peer Architectures A function f(k 1, k 2 ) defines the distance in the keyspace between two keys k 1 and k 2 –Each node is assigned a key which is used as an ID. –A node with an ID i x owns all of the keys k y for which the distance f(i x, k y ) is minimum. –The Chord DHT treats the keys as points on a circle and f(k 1, k 2 ) is the distance travelling clockwise around the circle from k 1 to k 2 The overlay network is a logical ring

Structured Peer-to-Peer Architectures

A competitor to Chord is Content Addressable Network (CAN) –CAN uses a d-dimensional Cartesian coordinate keyspace The space is partitioned for each node in the system Entering nodes cause a further partition of a region Leaving nodes cause merging of two adjacent regions Overlay network is defined by the adjacency of regions in the d-dimensional space

Structured Peer-to-Peer Architectures The mapping of data items onto nodes in CAN.

Structured Peer-to-Peer Architectures Splitting a region when a node joins.

Unstructured Peer-to-Peer Architectures Unstructured peer-to-peer systems used randomized algorithms for constructing an overlay network –Each node maintains a list of c neighbors Each of the neighbors represents a randomly chosen live node from the current set of nodes This is called a partial view Nodes may regularly exchange entries from their partial views with neighbors in order to update the list (this is how we handle newly arriving nodes and departing nodes)

The steps taken by the active thread.

The steps take by the passive thread

Combining Structured and Unstructured We can also have a two-layered approach which combines features of both structured and unstructured. By exchanging and selecting entries from partial views it is possible to construct and maintain specific topologies of overlay networks –The topology is built up over time as more and more randomly selected nodes are passed up from lower to higher layer

Topology Management of Overlay Networks A two-layered approach for constructing and maintaining specific overlay topologies using techniques from unstructured peer-to-peer systems.

Topology Management of Overlay Networks (2) Generating a specific overlay network using a two- layered unstructured peer-to-peer system.

Superpeers We may differentiate between the functionality of the peers leading to a hierarchical arrangement with superpeers –The superpeers are connected in P2P manner –“Normal” peers are associated with a particular superpeer (hierarchical organization) –Can ne used, for example, in a collaborative content delivery network (CDN)

Superpeers A hierarchical organization of nodes into a superpeer network.

Hybrid Architectures Similar to the superpeer variant of P2P, we can combine client-server and P2P in a hybrid architecture Example: edge-server systems –Edge server acts as a server to end users clients and as a peer with other edge servers.

Edge-Server Systems Viewing the Internet as consisting of a collection of edge servers.