1 Chapter 2. Communication. STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered Protocol But some other protocols.

Slides:



Advertisements
Similar presentations
1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2.
Advertisements

Remote Procedure Call (RPC)
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Implementing Remote Procedure Calls Andrew Birrell and Bruce Nelson Presented by Kai Cong.
Remote Object Invocation Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Remote Object Invocation
L-7 RPC 1. Last Lecture Important Lessons - Naming Naming is a powerful tool in system design  A layer of indirection can solve many problems Name+context.
EECS122 - UCB 1 CS 194: Distributed Systems Remote Object Invocation, Message- Oriented Communications (Based on textbook slides) Computer Science Division.
Distributed Systems Lecture #3: Remote Communication.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
Persistent and Transient Objects Persistent objects continue to exist even if they aren’t in the address space of a server process Transient objects existence.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Computer Science Lecture 2, page 1 CS677: Distributed OS Last Class: Introduction Distributed Systems – A collection of independent computers that appears.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
Communication in Distributed Systems –Part 2
Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)
Univ. of TehranDistributed Operating Systems1 Advanced Operating Systems University of Tehran Dept. of EE and Computer Engineering By: Dr. Nasser Yazdani.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
EEC-681/781 Distributed Computing Systems Lecture 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
.NET Mobile Application Development Remote Procedure Call.
Distributed Systems Lecture # 3. Administrivia Projects –Design and Implement a distributed file system Paper Discussions –Discuss papers as case studies.
An adapted reference model for networked communication.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W
Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Real-Time & MultiMedia Lab Communication Chapter 2.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Communication Chapter 2.
Politecnico di Milano © 2001 William Fornaciari Operating Systems R P C Remote Procedure Call Lecturer: William Fornaciari Politecnico di Milano
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved RPC Tanenbaum.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Remote Procedure Call Andy Wang Operating Systems COP 4610 / CGS 5765.
1 Conventional Procedure Call read(fd,buf,nbytes) a)Parameter passing in a local procedure call: the stack before the call to read b)The stack while the.
Distributed (Operating) Systems -Communication in Distributed Systems- Computer Engineering Department Distributed Systems Course Assoc. Prof. Dr. Ahmet.
Mark Stanovich Operating Systems COP Primitives to Build Distributed Applications send and receive Used to synchronize cooperating processes running.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Communication Chapter 2.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
OS2-SUT– Sem ; R. Jalili Communication Chapter 2.
Distributed objects and remote invocation Pages
RPC Model, Stubs and Skeletons Divya Nampalli
1 Chapter 2. Communication. STEMPusan National University STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Communication Chapter 2. Layered Protocols (1) Layers, interfaces, and protocols in the OSI model. 2-1.
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
OS2-Sharif University of Technology - Sem ; R. Jalili Communication Chapter 2.
Remote Procedure Call and Remote Object Invocation TANENBAUM-Chapter 2.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Last Class: Introduction
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Prof. Leonardo Mostarda University of Camerino
CMSC621: Advanced Operating Systems Advanced Operating Systems
Communication Chapter 2.
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
DISTRIBUTED COMPUTING
Outline Communication Primitives - continued Theoretical Foundations
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Sarah Diesburg Operating Systems COP 4610
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Interprocess Communication
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Communication.
Presentation transcript:

1 Chapter 2. Communication

STEM-PNU 2 Layered Protocol TCP/IP : de facto standard Our Major Concern Not always 7-layered Protocol But some other protocols if necessary

STEM-PNU 3 Client-Server Model TCP/IP Client-Server Model

STEM-PNU 4 Basic Operations of Client-Server Model (Send and Receive Protocol) Client … txmsg.opcode=opcode; txmsg.source=me; txmsg.param=param; sendMessage(serverID,&txmsg); waitMessage(serverID,&rxmsg); checkAndProcess(rxmsg); Client Server While(1) { waitMessage(FromAny,&rxmsg); source=rxmsg.source; opcode=rxmsg.opcode; param=rxmsg.params; result=functions[opcode](param); txmsg.result=result; txmsg.source=me; sendMessage(source,&txmsg); }

STEM-PNU 5 Steps of RPC 1. Client procedure calls client stub in normal way 2. Client stub builds message, calls local OS 3. Client's OS sends message to remote OS 4. Remote OS gives message to server stub 5. Server stub unpacks parameters, calls server 6. Server does work, returns result to the stub 7. Server stub packs it in message, calls local OS 8. Server's OS sends message to client's OS 9. Client's OS gives message to client stub 10. Stub unpacks result, returns to client

STEM-PNU 6 RPC : Remote Procedure Call Client … txmsg.opcode=opcode; txmsg.source=me; txmsg.param=param; sendMessage(serverID,&txmsg); waitMessage(serverID,&rxmsg); checkAndProcess(rxmsg); Server result=funcA(param); txmsg.opcode=opcode; txmsg.source=me; txmsg.param=param; sendMessage(serverID,&txmsg); waitMessage(FromAny,&rxmsg); source=rxmsg.source; opcode=rxmsg.opcode; param=rxmsg.params; result=functions[opcode](param); funcA STUB

STEM-PNU 7 Binding a Client to a Server Binding in DCE (Distributed Computing Environment)

STEM-PNU 8 Middleware Client Stub for Client Server Stub for Server Binding (Dynamic) Middleware

STEM-PNU 9 Middleware Protocol

STEM-PNU 10 OS Some Issues : Reliable vs. Non-Reliable ClientServer Process OS 1. Request 2. Reply If reply message is lost? 1. Blocking 2. Acknowledge 3. Idempotent

STEM-PNU 11 Some Issues : Blocking vs. Non-Blocking Blocking (No Buffer, Synchronous) Client Server Send Kernel Trap Server Processing Send Receive Blocked

STEM-PNU 12 Some Issues : Blocking vs. Non-Blocking Non-Blocking (No Buffer, Asynchronous) Client Server Send Copy to system buffer Process other task Server Processing Send Receive Blocked

STEM-PNU 13 Asynchronous RPC If client does not receive return value, No reason to be blocked. Asynchronous RPC

STEM-PNU 14 Asynchronous RPC Even though client does receive return value, Two asynchronous RPC

STEM-PNU 15 Some Issues : Parameter Passing

STEM-PNU 16 Parameter Passing for Objects Two types of Object Parameter Passing Object Copy vs. Reference Copy Should it be transparent ?

STEM-PNU 17 Remote Object Invocation Generalization of RPC to Object Invocation Implementation of object interface like client stub in RPC

STEM-PNU 18 Marshalling System A Object in Main Memory System B Object Object in Main Memory MarshallingDemarshalling When objects in memory are to be passed across a network to another host or persisted to storage, their in-memory representation must be converted to a suitable out-of-memory format. This process is called marshalling, and converting back to an in memory representation is called demarshalling

STEM-PNU 19 Extended RPC : Door for Single Machine Client and Server are located in a single machine RPC for processes on the same machine 1 2 3

STEM-PNU 20 RMI : Object Binding Implicit Binding Distr_object* obj_ref;//Declare a system-wide object reference obj_ref = …;// Initialize the reference to a distributed object obj_ref-> do_something();// Implicitly bind and invoke a method Explicit Binding Distr_object objPref; //Declare a system-wide object reference Local_object* obj_ptr; //Declare a pointer to local objects obj_ref = …; //Initialize the reference to a distributed object obj_ptr = bind(obj_ref); //Explicitly bind and obtain a pointer to the local proxy obj_ptr -> do_something();//Invoke a method on the local proxy

STEM-PNU 21 Stream-Oriented Communication In distributed environment Continuous Media : e.g. video Discrete Media : e.g. Simple File Transfer Temporal Aspects of Data Stream Asynchronous Transmission Synchronous Transmission Isochronous Transmission Composition of Stream Simple Stream Complex Stream : composed of simple or complex streams Synchronization is very important

STEM-PNU 22 Data Streaming

STEM-PNU 23 QoS : Quality of Service Timeline, Volume and Reliability

STEM-PNU 24 Group Communication Send to a group Send to a machine Send to multiple receivers

STEM-PNU 25 Group Communication : Design Issues Closed or Open Peer or Hierarchical Addressing Multi-Casting or Broadcasting Uni-casting Predicate Addressing Open to outside Closed to outside

STEM-PNU 26 Group Communication : Design Issues Group Membership Send/Receive Protocol How to distinguish it from single receive Atomicity Message ordering Scalability