Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.

Slides:



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

RPC Robert Grimm New York University Remote Procedure Calls.
Remote Procedure Call (RPC)
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Remote Object Invocation Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Centralized Architectures
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
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.
EECS122 - UCB 1 CS 194: Distributed Systems Communication Protocols, RPC Computer Science Division Department of Electrical Engineering and Computer Sciences.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Communication. 4.1 Fundamentals 4.2 Remote Procedure Call 4.3 Message-oriented Communication 4.4 Stream-oriented Communication 4.5 Multicast Communication.
Remote Procedure CallCS-502 Fall Remote Procedure Call CS-502, Operating Systems Fall 2007 (Slides include materials from Operating System Concepts,
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W
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.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
11 September 2008CIS 340 # 1 Topics To examine the variety of approaches to handle the middle- interaction (continued) 1.RPC-based systems 2.TP monitors.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Distributed (Operating) Systems -Communication in Distributed Systems- Fall 2011 Kocaeli University Computer Engineering Department.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
(a) Parameter passing in a local procedure call: the stack before the call (b) The stack while the called procedure is active. count =
Politecnico di Milano © 2001 William Fornaciari Operating Systems R P C Remote Procedure Call Lecturer: William Fornaciari Politecnico di Milano
 Remote Procedure Call (RPC) is a high-level model for client-sever communication.  It provides the programmers with a familiar mechanism for building.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved RPC Tanenbaum.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
Page 1 Remote Procedure Calls Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
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.
 Communication Distributed Systems IT332. Outline  Fundamentals  Layered network communication protocols  Types of communication  Remote Procedure.
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.
Remote Procedure Call RPC
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
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.
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 2, 3: Communication 1/30/20161Distributed Systems - COMP 655.
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.
OS2-Sharif University of Technology - Sem ; R. Jalili Communication Chapter 2.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Prof. Leonardo Mostarda University of Camerino
Remote Procedure Call present by :Enas Alkhoshi
Distributed Systems CS
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
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
CSE 451: Operating Systems Autumn 2003 Lecture 16 RPC
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Remote Procedure Call (RPC) RPC – RMI - Web Services.
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Spring 2012 Module 22 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CS-502, Operating Systems Fall 2009 (EMC)
Distributed Systems CS
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
Last Class: Communication in Distributed Systems
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Communication.
Distributed Systems CS
Presentation transcript:

Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology

Outline Communication organized in layers Communication models – Remote Procedure Call – Remote Method Invocation – Message Oriented Middleware – Streams

Communication is critical  “A system in which hardware or software located at networked computers communicate and coordinate their actions only by message passing”. [Coulouris]

OSI model application presentation session transport network data link physical application protocol presentation protocol session protocol transport protocol network protocol data link protocol physical protocol Network Practically implemented in Internet

Message in layered communication data link layer trailer data link layer header network layer header transport layer header session layer header presentation layer header application layer header Message

Application Protocols Session/Presentation Protocols – Rarely used in practice Application Protocols – No clear distinction (in application layer) between Application (ftp program) Application-specific protocol (Internet File Transfer Protocol) General-purpose protocol – HTTP used for Web – HTTP used for JAVA General-purpose protocols (in application layer) can be considered as transport protocols, but are classified as MIDDLEWARE PROTOCOLS

Middleware protocols What is it ? – more specific application – support a variety of middleware services Examples – Authentication protocol – Authorization protocol – Multimedia broadcasting protocol They are independent to applications, but can be used in many middleware services

Adapted OSI model application transport network data link physical application protocol transport protocol network protocol data link protocol physical protocol 7 presentation session 6 5 presentation protocol session protocol Network middleware 5 middleware protocol 6 Middleware communication services provide message-passing services

Remote Procedure Call (RPC) Suggested by Birrell & Nelson (1984) Quite simple – Calling procedures on different machines like conventional procedure calls Procedure A() calls a procedure B() A() transfers parameters, execution of A() suspended B() performed until finish Execution returns to A()

How conventional call implemented? read( fd, buf, nbytes ) Main program’s local variables nbytes buf fd return address read’s local variables stack pointer Stack beforeStack after Parameters  Call-by-value  Call-by-reference

Principle of RPC Client procedure calls client stub in normal way Client stub builds message and calls local OS Client OS sends message to remote OS Remote OS gives message to server stub Server stub unpack parameters and calls server Server works and returns result to server stub Server stub packs message and calls local OS Server OS sends message to client OS Client OS gives message to client stub Client stub unpacks results and returns to client client server call remote procedure return from call wait for result call local procedure and return results requestreply time

RPC example on computation k=add(I,j) proc: “add” int: val(i) int: val(j) Client OS Client process k=add(I,j) proc: “add” int: val(i) int: val(j) ServerOS Server process Client stub Server stub Implementation of add() Client machineServer machine proc: “add” int: val(i) int: val(j) Network

Heterogenous architectures Large distributed systems consist of multiple machine types, difference in –data type representation IBM mainframe: EBCDIC character code Personal computer: ASCII character code Intel: little endian Sparc: big endian

Passing reference parameters Solutions – Forbid call-by-reference – Call-by-copy/restore – Eliminate copying if not necessary Not easy to make transparent for complex data structures – graph – linked list Let applications do

Parameter specification & Stub generation Client & server must agree on representation of simple data structures – float in IEEE standard #754 – charaters in 16-bit unicode – stored in little endian Client & server uses connection-oriented protocol Interface is define by Interface Description Language (IDL), to support stub generation

Extended models of RPC Doors: as IPC main() { … fd=open(door_name, …); door_call( fd, … ); … } OS Client process server_door() { … door_return(); } main() { … fd = door_create(…); fattach( fd, door_name, …); … } Server process Invoke registered door at other process register door computer return to calling process

Asynchronous RPC (1) client server call remote procedure return from call wait for result call local procedure and return results requestreply time client server call remote procedure return from call wait for acceptance call local procedure requestaccept request time

Asynchronous RPC (2) Deferred synchronous RPC: combining 2 asynchronous RPC client server call remote procedure return from call wait for acceptance call local procedure requestaccept request time interrupt client return results acknowledge call client with asynchronous RPC