Lecture 8 Epidemic communication, Server implementation.

Slides:



Advertisements
Similar presentations
CS-495 Distributed Systems Fabián E. Bustamante, Winter 2004 Processes Threads & OS Threads in distributed systems Object servers Code migration Software.
Advertisements

Dr. Kalpakis CMSC 621, Advanced Operating Systems. Fall 2003 URL: Distributed System Architectures.
RPC Robert Grimm New York University Remote Procedure Calls.
Lecture 7 Data distribution Epidemic protocols. EECE 411: Design of Distributed Software Applications Epidemic algorithms: Basic Idea Idea Update operations.
Multiple Processor Systems
Cache Coherent Distributed Shared Memory. Motivations Small processor count –SMP machines –Single shared memory with multiple processors interconnected.
Distributed components
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
CS 290C: Formal Models for Web Software Lecture 10: Language Based Modeling and Analysis of Navigation Errors Instructor: Tevfik Bultan.
Based on last years lecture notes, used by Juha Takkinen.
Threads Clients Servers Code Migration Software Agents Summary
Fall 2007cs4251 Distributed Computing Umar Kalim Dept. of Communication Systems Engineering 31/10/2007.
OCT1 Principles From Chapter One of “Distributed Systems Concepts and Design”
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
EEC-681/781 Distributed Computing Systems Lecture 3 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Processes After today’s lecture, you are asked to know The basic concept of thread and process. What are the advantages of using multi-threaded client.
Multiple Processor Systems 8.1 Multiprocessors 8.2 Multicomputers 8.3 Distributed systems.
EEC-681/781 Distributed Computing Systems Lecture 8 Wenbing Zhao Cleveland State University.
EECE 411: Design of Distributed Software Applications What is a Distributed System? You know when you have one … … when the failure of a computer you’ve.
Processes After today’s lecture, you are asked to know The basic concept of thread and process. What are the advantages of using multi-threaded client.
16: Distributed Systems1 DISTRIBUTED SYSTEM STRUCTURES NETWORK OPERATING SYSTEMS The users are aware of the physical structure of the network. Each site.
Chapter 26 Client Server Interaction Communication across a computer network requires a pair of application programs to cooperate. One application on one.
What is Concurrent Programming? Maram Bani Younes.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Networked File System CS Introduction to Operating Systems.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Multiple Processor Systems. Multiprocessor Systems Continuous need for faster and powerful computers –shared memory model ( access nsec) –message passing.
CSE 486/586, Spring 2012 CSE 486/586 Distributed Systems Distributed Shared Memory Steve Ko Computer Sciences and Engineering University at Buffalo.
SOEN 6011 Software Engineering Processes Section SS Fall 2007 Dr Greg Butler
Scalable Web Server on Heterogeneous Cluster CHEN Ge.
Architectures of distributed systems Fundamental Models
Types of Operating Systems
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
OS2- Sem ; R. Jalili Introduction Chapter 1.
Kyung Hee University 1/41 Introduction Chapter 1.
DISTRIBUTED COMPUTING Introduction Dr. Yingwu Zhu.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Processes. Processes and threads Process forms a building block in distributed systems Processes granularity is not sufficient for distributed systems.
Distributed Systems Principles and Paradigms Chapter 03 Processes 00 – 1.
CORBA1 Distributed Software Systems Any software system can be physically distributed By distributed coupling we get the following:  Improved performance.
1 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
Types of Operating Systems 1 Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet Sayar Kocaeli University - Fall 2015.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Distributed Computing Systems CSCI 6900/4900. Review Distributed system –A collection of independent computers that appears to its users as a single coherent.
Distributed Computing Systems CSCI 4780/6780. Scalability ConceptExample Centralized servicesA single server for all users Centralized dataA single on-line.
Seminar on Service Oriented Architecture Distributed Systems Architectural Models From Coulouris, 5 th Ed. SOA Seminar Coulouris 5Ed.1.
Acknowledgement: These slides are adapted from slides provided in Thißen & Spaniol's course Distributed Systems and Middleware, RWTH Aachen Processes Distributed.
Cloud Computing Computer Science Innovations, LLC.
Manish Kumar,MSRITSoftware Architecture1 Remote procedure call Client/server architecture.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 2, 3: Communication 1/30/20161Distributed Systems - COMP 655.
R Some of these slides are from Prof Frank Lin SJSU. r Minor modifications are made. 1.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Lecture 5: RPC (exercises/questions). 26-Jun-16COMP28112 Lecture 52 First Six Steps of RPC TvS: Figure 4-7.
SERVERS. General Design Issues  Server Definition  Type of server organizing  Contacting to a server Iterative Concurrent Globally assign end points.
Last Class: Introduction
Distributed File Systems
#01 Client/Server Computing
Introduction to Operating Systems
Advanced Operating Systems
Multiple Processor Systems
Distributed Computing Systems
Architectures of distributed systems Fundamental Models
Prof. Leonardo Mostarda University of Camerino
Lecture 6: RPC (exercises/questions)
Lecture 6: RPC (exercises/questions)
Lecture 7: RPC (exercises/questions)
CS703 – Advanced Operating Systems
CS5123 Software Validation and Quality Assurance
#01 Client/Server Computing
Presentation transcript:

Lecture 8 Epidemic communication, Server implementation

EECE 411: Design of Distributed Software Applications Logistics / reminders Subscribe to the mailing list! Assignment1 marks You should receive them today Assignment2: due this Friday 11:59pm Quizzes: Q1: Thursday next week (10/14) Q2: 11/16

EECE 411: Design of Distributed Software Applications Roadmap A distributed system is: a collection of independent computers that appears to its users as a single coherent system Components need to: Communicate point-to-point communictaion Sockets, RPC, RMI point-to-multipoint [last time] Multicast Epidemic communication Cooperate [next]

EECE 411: Design of Distributed Software Applications Quiz question A distributed service operates on a large cluster. The service has one component running on each cluster node. Cluster nodes might be shut down for maintenance, they might simply fail, or they might come back online. To function correctly each service component needs an accurate list of all other nodes/service components that are active. TO DO: Design a mechanism that provides this list Describe the mechanism in natural language Provide the pseudocode.

EECE 411: Design of Distributed Software Applications Detour: processes and threads

EECE 411: Design of Distributed Software Applications Threads & distributed systems: Client side issues Essence: Client side often tailored to provide transparency access transparency: client-side stubs for RPCs location/migration transparency: let client-side software keep track of actual location replication transparency: multiple invocations handled by client stub: failure transparency: can often be placed only at client (we’re trying to mask server and communication failures).

EECE 411: Design of Distributed Software Applications Threads & distributed systems: Client side issues Goal: hiding network latency. Example I: Multi-threaded Web client: Web browser scans an incoming HTML page, and finds that more files need to be fetched. Each file is fetched by a separate thread, each doing a (blocking) HTTP request. As files come in, the browser displays them. Example II: Multiple request-response calls to other machines (RPC): A client does several calls at the same time, each one by a different thread. It then waits until all results have been returned. Q: Why exactly does multi-threaded processing help?

EECE 411: Design of Distributed Software Applications Server side issues: How to handle incoming requests? iteratively vs. concurrently Why multiple threads can be a good idea? Multithreaded File Server Example

EECE 411: Design of Distributed Software Applications How to handle incoming requests? Iterative vs. concurrent If concurrent one more choice: Blocking vs. non- blocking I/O Concurrent with blocking I/O: Choice: Processes vs. threads. Concurrent with non-blocking I/O Finite state machine based design Event driven programming

EECE 411: Design of Distributed Software Applications Threads & distributed systems: Server side issues Main issues are performance and structure. Improve performance: Having an iterative server prohibits scaling in a multiprocessor system. As with clients: concurrent servers reduce latency (by reacting to next request while previous one is being processed) and increase throughput Starting a thread to handle an incoming request is much cheaper than starting a new process. Better structure: Most servers have high I/O load. Using simple, well-understood blocking calls may simplify the overall structure. Multithreaded programs tend to be smaller and easier to understand due to simplified flow of control. Better isolation may sometimes be an argument for process based servers

EECE 411: Design of Distributed Software Applications Other issues in Server Design How do clients find server’s location? Stateless vs. stateful server design Server clusters

EECE 411: Design of Distributed Software Applications Servers: General organization Basic server model: A server is a process that waits for incoming requests at a specific transport address. In practice, there is a one-to-one mapping between a port and a service: superserver (inetd) vs. ‘normal’ server.

EECE 411: Design of Distributed Software Applications Servers and State: File system server example

EECE 411: Design of Distributed Software Applications Servers and State (I): Stateless servers Stateless servers: Never keep accurate information about the status of a client after having handled a request: Don’t record whether a file has been opened (simply close it again after access) Don’t promise to invalidate a client’s cache Don’t keep track of your clients Consequences: Clients and servers are completely independent State inconsistencies resulted from client or server crashes are reduced. Possible loss of performance because, e.g., a server cannot anticipate client behavior (think of prefetching file blocks)

EECE 411: Design of Distributed Software Applications Servers and State (II): Stateful servers Stateful servers: Keep track of client status: E.g., record that a file has been opened, so that prefetching can be done E.g., Knows which data a client has cached, and allows clients to keep local copies of shared data and my promise to invalidate them Observation: The performance of stateful servers can be extremely high, provided clients are allowed to keep local copies. [Depending on application] reliability may not a major problem.

EECE 411: Design of Distributed Software Applications Server clusters Observation: Many server clusters are organized along multiple tiers Important: The first tier is generally responsible for passing requests to an appropriate server.

EECE 411: Design of Distributed Software Applications Request Handoff Observation: Having the first tier handle all communication from/to the cluster may lead to a bottleneck. Solution: Various, but a popular one is TCP-handoff

EECE 411: Design of Distributed Software Applications Summary so far Client and server design: processes focus Sequential vs. concurrent, Processes vs. threads blocking vs. non-blocking Concurrent & non-blocking: Finite state machine design Design issues for clients and servers Cluster servers

EECE 411: Design of Distributed Software Applications Next A distributed system is: a collection of independent computers that appears to its users as a single coherent system Components need to: Communicate Cooperate => support needed Naming Synchronization

EECE 411: Design of Distributed Software Applications Naming systems Functionality Map: names  access points (addresses) Names are used to denote entities in a distributed system. To operate on an entity, we need to access it at an access point (address). Note: A location-independent name for an entity E, is independent from the addresses of the access points offered by E.

EECE 411: Design of Distributed Software Applications Names are valuable! NYT, August’00

EECE 411: Design of Distributed Software Applications Naming systems Functionality Map: names  access points (addresses) One challenge: scaling #of names, #clients geographical distribution, Management!