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

Slides:



Advertisements
Similar presentations
Computer Networks TCP/IP Protocol Suite.
Advertisements

Communicating over the Network
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 The OSI Model and the TCP/IP.
31242/32549 Advanced Internet Programming Advanced Java Programming
Processes Management.
25 seconds left…...
We will resume in: 25 Minutes.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2001 Chapter 16 Integrated Services Digital Network (ISDN)
TCP/IP Protocol Suite 1 Chapter 18 Upon completion you will be able to: Remote Login: Telnet Understand how TELNET works Understand the role of NVT in.
RPC Robert Grimm New York University Remote Procedure Calls.
Remote Procedure Call (RPC)
Remote Procedure Call Design issues Implementation RPC programming
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.
International Standards Organization Open Systems Interconnect (OSI) Reference Model Advanced Computer Networks.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 17 Introduction to the Application.
Middleware Technologies compiled by: Thomas M. Cosley.
Centralized Architectures
Networks: OSI Reference Model 1 International Standards Organization Open Systems Interconnect (OSI) Reference Model.
Outcomes What is RPC? The difference between conventional procedure call and RPC? Understand the function of client and server stubs How many steps could.
Networks: OSI Reference Model1 International Standards Organization Open Systems Interconnect (OSI) Reference Model.
Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies The user clicks on a link to indicate which document is to be retrieved.
Communication in Distributed Systems –Part 2
Client-Server Communication Sockets Remote Procedure Calls Remote Method Invocation (Java)
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
Remote Procedure Calls. 2 Client/Server Paradigm Common model for structuring distributed computations A server is a program (or collection of programs)
.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.
Networks: OSI Model1 International Standards Organization Open Systems Interconnect (OSI) Reference Model.
An adapted reference model for networked communication.
Protocols and the TCP/IP Suite Chapter 4. Multilayer communication. A series of layers, each built upon the one below it. The purpose of each layer is.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Layer Architecture of Network Protocols
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.
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.
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 =
SEMINOR. INTRODUCTION 1. Middleware is connectivity software that provides a mechanism for processes to interact with other processes running on multiple.
 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.
Page 1 Remote Procedure Calls Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
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.
Remote Procedure Call RPC
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
Web Services An Introduction Copyright © Curt Hill.
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.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Lecture 5: RPC (exercises/questions). 26-Jun-16COMP28112 Lecture 52 First Six Steps of RPC TvS: Figure 4-7.
OS2-Sharif University of Technology - Sem ; R. Jalili Communication Chapter 2.
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
CMSC621: Advanced Operating Systems Advanced Operating Systems
Communication Chapter 2.
Networks: OSI Reference Model
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Networks: OSI Reference Model
Lecture 7: RPC (exercises/questions)
Last Class: Communication in Distributed Systems
Communication.
Presentation transcript:

1 Communication in Distributed Systems REKs adaptation of Tanenbaums Distributed Systems Chapter 2

Distributed Computing Systems 2 Communication Paradigms Using the Network Protocol Stack Remote Procedure Call - RPC Remote Object Invocation - Java Remote Method Invocation Message Queuing Services - Sockets Stream-oriented Services

Distributed Computing Systems 3 Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Network Layer Electrical and/or Optical Signals Application A Application B Data Link Layer Physical Layer Network Layer Data Link Layer Physical Layer Communication Network Figure 2.6Leon-Garcia & Widjaja: Communication Networks Copyright ©2000 The McGraw Hill Companies Network Stack - OSI Reference Model

Distributed Computing Systems 4 Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Application Layer Presentation Layer Session Layer Transport Layer Network Layer Data Link Layer Physical Layer Application AApplication B data ah ph sh th nh dh bits dt Copyright ©2000 The McGraw Hill Companies Leon-Garcia & Widjaja: Communication Networks OSI Reference Model

Distributed Computing Systems 5 Normal operation of TCP Transactional TCP TCP Connection Overhead

6 Remote Procedure Calls RPC

Distributed Computing Systems 7 Conventional Procedure Call a) Parameter passing in a local procedure call: the stack before the call to read. b) The stack while the called procedure is active. Count = read(fd, buf,bytes) Note – call-by-value and call-by-reference parameters on the stack.

Distributed Computing Systems 8 Remote Procedure Call RPC concept :: to make a remote procedure call appear like a local procedure call. The goal is to hide the details of the network communication (namely, the sending and receiving of messages). The calling procedure should not be aware that the called procedure is executing on a different machine.

Distributed Computing Systems 9 Remote Procedure Call When making a RPC: The calling environment is suspended. Procedure parameters are transferred across the network to the environment where the procedure is to execute. The procedure is executed there. When the procedure finishes, the results are transferred back to the calling environment. Execution resumes as if returning from a regular procedure call.

Distributed Computing Systems 10 RPC differs from OSI User does not open connection, read, write, then close connection – client may not even know they are using the network. RPC may omit protocol layers for efficiency. (e.g. diskless Sun workstations will use RPC for every file access.) RPC is well-suited for client-server interaction where the flow of control alternates.

Distributed Computing Systems 11 RPC between Client and Server

Distributed Computing Systems 12 RPC Steps 1. The client procedure calls a client stub passing parameters in the normal way. 2. The client stub marshals the parameters, builds the message, and calls the local OS. 3. The client's OS sends the message (using the transport layer) to the remote OS. 4. The server remote OS gives transport layer message to a server stub. 5. The server stub demarshals the parameters and calls the desired server routine.

Distributed Computing Systems The server routine does work and returns result to the server stub via normal procedures. 7. The server stub marshals the return values into the message and calls local OS. 8. The server OS (using the transport layer) sends the message to the client's OS. 9. The client's OS gives the message to the client stub 10. The client stub demarshals the result, and execution returns to the client. RPC Steps

Distributed Computing Systems 14 RPC Steps

Distributed Computing Systems 15 Passing Value Parameters a) Original message on the Pentium b) The message after receipt on the SPARC c) The message after being inverted. The little numbers in boxes indicate the address of each byte

Distributed Computing Systems 16 Marshaling Parameters Parameters must be marshaled into a standard representation. Parameters consist of simple types (e.g. integers) and compound types (e.g., C structures). The type of each parameter must be known to the modules doing the conversion into standard representation.

Distributed Computing Systems 17 Marshaling Parameters Call-by-reference is not possible in parameter passing. It can be simulated by copy-restore. A copy of the referenced data structure is sent to the server, and upon return to the client stub the clients copy of the structure is replaced with the structure modified by the server.

Distributed Computing Systems 18 Marshaling Parameters However, in general marshaling cannot handle the case of a pointer to an arbitrary data structure such as a complex graph.

Distributed Computing Systems 19 Parameter Specification and Stub Generation A procedure The corresponding message The caller and the callee must agree on the format of the message they exchange, and they must follow the same steps when it comes to passing complex data structures.

Distributed Computing Systems 20 RPC Details An Interface Definition Language (IDL) is used to specific the interface that can be called by a client and implemented by the server. All RPC-based middleware systems offer an IDL to support application development.

Distributed Computing Systems 21 Doors The principle of using doors as IPC mechanism.

Distributed Computing Systems 22 Doors A Door is a generic name for a procedure in the address space of a server process that can be called by processes colocated with the server. Doors require local OS support.

Distributed Computing Systems 23 Asynchronous RPC a) The interconnection between client and server in a traditional RPC b) The interaction using asynchronous RPC 2-12

Distributed Computing Systems 24 Asynchronous RPCs A client and server interacting through two asynchronous RPCs