COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 2, 3: Communication 1/30/20161Distributed Systems - COMP 655.

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.
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 Method Invocation Chin-Chih Chang. Java Remote Object Invocation In Java, the object is serialized before being passed as a parameter to an RMI.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Review For Midterm.
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
1. Introducing Java Computing  What is Java Computing?  Why Java Computing?  Enterprise Java Computing  Java and Internet Web Server.
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)
Systems Architecture, Fourth Edition1 Internet and Distributed Application Services Chapter 13.
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
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
1 Remote Procedure Calls (RPC) and Distributed Objects G53ACC Chris Greenhalgh.
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.
Communication Tran, Van Hoai Department of Systems & Networking Faculty of Computer Science & Engineering HCMC University of Technology.
Remote Procedure Call Andrew Whitaker CSE451. Remote Procedure Call RPC exposes a programming interface across machines: interface PriceService { Price.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Lecture 15 Introduction to Web Services Web Service Applications.
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.
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 =
Silberschatz, Galvin, and Gagne  1999 Applied Operating System Concepts Chapter 15: Distributed Communication Sockets Remote Procedure Calls (RPCs) Remote.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
3.1 Silberschatz, Galvin and Gagne ©2009Operating System Concepts with Java – 8 th Edition Chapter 3: Processes.
 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.
IT 344: Operating Systems Winter 2008 Module 19 Networking & Remote Procedure Call (RPC) Chia-Chi Teng CTB 265.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
ECEN “Internet Protocols and Modeling”, Spring 2012 Course Materials: Papers, Reference Texts: Bertsekas/Gallager, Stuber, Stallings, etc Class.
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.
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.
Seminar on Service Oriented Architecture Distributed Systems Architectural Models From Coulouris, 5 th Ed. SOA Seminar Coulouris 5Ed.1.
Remote Method Invocation by James Hunt, Joel Dominic, and Adam Mcculloch.
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.
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.
Middleware Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi Fujinoki Middleware/001.
OS2-Sharif University of Technology - Sem ; R. Jalili Communication Chapter 2.
Distributed Web Systems Distributed Objects and Remote Method Invocation Lecturer Department University.
Prof. Leonardo Mostarda University of Camerino
MCA – 405 Elective –I (A) Java Programming & Technology
Remote Procedure Call present by :Enas Alkhoshi
Communication Chapter 2.
Communication essentials
DISTRIBUTED COMPUTING
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Creating a Distributed System with Remote Procedure Calls and Web Services Ch.5 B.Ramamurthy 2/17/2019 B.Ramamurthy.
Lecture 6: RPC (exercises/questions)
Middleware and ORB CS 314 Operating Systems
Lecture 6: RPC (exercises/questions)
Lecture 7: RPC (exercises/questions)
Middleware and ORB CS 314 Operating Systems
Last Class: Communication in Distributed Systems
Communication.
Presentation transcript:

COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 2, 3: Communication 1/30/20161Distributed Systems - COMP 655

Agenda 6:00 - 6:30, system summary presentation 6:30 - 8:00, Lab 1 8:00 - 8:15, Break 8:15 – 9:30, Communication Wrap up 1/30/2016Distributed Systems - COMP 6552

1/30/2016Distributed Systems - COMP 6553 Communication essentials Communication patterns Communication structure: OSI reference model and TCP/IP coverage Major middleware communication services –RPC –RMI –http –I hate to wait … –Message passing –(skip) Streams

1/30/2016Distributed Systems - COMP 6554 Communication patterns ProducerConsumer query response

1/30/2016Distributed Systems - COMP 6555 Communication patterns with broker Producer 2 query response Producer 1 Consumer 2 Consumer 1 Consumer 3 Subscription service Client 2 Client 1 Server 2 Server 1 Server 3 Request broker query response

1/30/2016Distributed Systems - COMP 6556 Communication patterns - other variations Blocking or non-blocking Connection-based or connectionless Transient or persistent Examples: blocking transient query-response == RPC non-blocking persistent producer/consumer == message queuing

1/30/2016Distributed Systems - COMP 6557 A note about blocking Blocking communication blocks the thread that makes the call Other work may continue in other threads in the same process More about threads and processes next week

1/30/2016Distributed Systems - COMP 6558 Communication essentials Communication patterns Communication structure: OSI reference model and TCP/IP coverage Major middleware communication services –RPC –RMI –http –I hate to wait … –Message passing

1/30/2016Distributed Systems - COMP 6559 OSI Reference Model 2-1 TCP/IP sending bits e.g. Ethernet connectionless IP TCP, UDP not used HTTP, FTP, …

Layered Protocols A typical message as it appears on the network.

1/30/2016Distributed Systems - COMP Middleware Protocols 2-5 RPC RMI

1/30/2016Distributed Systems - COMP Where does http fit? Originally, it looked like an application- level protocol, where the application was fetching and viewing HTML pages As the Web has matured, it has been used increasingly as middleware. It’s the foundation for –Web applications –Web services

1/30/2016Distributed Systems - COMP Communication essentials Communication patterns Communication structure: OSI reference model and TCP/IP coverage Major middleware communication services – RPC –RMI –http –I hate to wait … –Message passing

1/30/2016Distributed Systems - COMP RPC is all about Allowing a client to make a procedure call that is processed on a remote machine Without the client’s having to care (much)

1/30/2016Distributed Systems - COMP Ordinary procedure call process caller callee (callee is atanh)

Conventional Procedure Call Parameter passing in a local procedure call: the stack before the call to read. (b) The stack while the called procedure is active.

1/30/2016Distributed Systems - COMP RPC: call the procedure across a network client process server process network callercallee client stub server stub 0.98 Atanh, 0.98 message 0.98

1/30/2016Distributed Systems - COMP RPC: call the procedure across a network client process server process network callercallee client stub server stub 2.3 OK, 2.3 message 2.3

1/30/2016Distributed Systems - COMP RPC Summary client process server process network caller client stub callee server stub client stub pretends to be the callee server stub pretends to be the caller caller and callee are written as if they were on the same machine location transparency!! (almost)

1/30/2016Distributed Systems - COMP Warning: passing parameters and results can be tricky

Question 1/30/2016Distributed Systems - COMP Parameter passing mechanisms By value By reference By value-results …

1/30/2016Distributed Systems - COMP Passing Value Parameters (1)

1/30/2016Distributed Systems - COMP Passing Value Parameters (2) a)Original message (JILL, 5) on the Pentium (little endian) b)The message after receipt on the SPARC (big endian) c)The message after being inverted. The little numbers in boxes indicate the address of each byte Number is backwardsString is backwards

1/30/2016Distributed Systems - COMP 65524

1/30/2016Distributed Systems - COMP Conclusion from the byte order problem You have to explicitly define your interfaces. This problem is one of the fundamental motivators for the use of Interface Definition Languages (IDL) –WSDL, OMG IDL, … Passing value parameters is a key component of access transparency.

1/30/2016Distributed Systems - COMP Interface definition Interface definitions are critical factors in Openness Flexibility Access transparency Enabling proxy construction in middleware

1/30/2016Distributed Systems - COMP Activity – what can go wrong? (with an RPC) Brainstorm things that can go wrong when a program on machine A tries to make an RPC to a server on machine B AB Network

1/30/2016Distributed Systems - COMP Pick the top three The instructor will pick some of the failures you brainstormed Multi-vote on the ones in whose solutions you are most interested You will use the top three vote-getters in the next activity

1/30/2016Distributed Systems - COMP Activity – what could you do about it? Brainstorm approaches to dealing with the top three failure modes AB Network

1/30/2016Distributed Systems - COMP Communication patterns - reminder Parameters: Query-response or producer-consumer Blocking or non-blocking Connection-based or connection-less Persistent or transient Examples: blocking transient query-response == RPC non-blocking persistent producer/consumer == message queuing

1/30/2016Distributed Systems - COMP Finding the server or peer In all cases, the process that initiates a communication has to find the process it wants to communicate with The address could be in –Source code (simplest, least flexible) –Configuration file –A network directory service (requires client to know a name for a server) ( e.g. DNS) –A series of directories ( e.g. LDAP, then RMI Registry) Interaction with the directory is usually blocking request/response

1/30/2016Distributed Systems - COMP Communication essentials Communication patterns Communication structure: OSI reference model and TCP/IP coverage Major middleware communication services –RPC – RMI –http –I hate to wait … –Message passing

1/30/2016Distributed Systems - COMP Focus on Remote Objects Here, object == state + methods + interface Usually, only the interface is distributed “Remote objects” refers to approaches in which, for each object there is some server where all of it state resides

1/30/2016Distributed Systems - COMP Distributed Objects Common organization of a remote object with client-side proxy. 2-16

1/30/2016Distributed Systems - COMP Basic Java RMI rmiregistry** Server Client 1.Server registers its name and remote object 2.Client gets reference (a stub) to remote object from rmiregistry 3.Client calls server Interface.class _Stub.class * Interface.class _Skel.class * * = not needed if Client and Server are both Java 1.5 or newer ** = RMI Registry can be a separate process or an object inside the Server process. If separate, must be on same machine.

1/30/2016Distributed Systems - COMP Passing objects around … In RMI, parameters and return values can be object references –If the parameter refers to a local object, do you copy the object or pass only a reference? –If the parameter refers to a remote object, what do you pass?

1/30/2016Distributed Systems - COMP Local, remote objects in Java RMI Local objects are passed by value Remote objects by reference Passing a remote object by reference means passing a proxy by value

1/30/2016Distributed Systems - COMP Parameter Passing in RMI