CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 2011-09-22Nikita Borisov - UIUC1 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S.

Slides:



Advertisements
Similar presentations
COS 461 Fall 1997 Network Objects u first good implementation: DEC SRC Network Objects for Modula-3 u recent implementation: Java RMI (Remote Method Invocation)
Advertisements

CSE 486/586 Distributed Systems Remote Procedure Call
Remote Procedure Call (RPC)
Remote Procedure Call Design issues Implementation RPC programming
Distributed Objects and Remote Invocation
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
Lecture 8-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2012 Indranil Gupta (Indy) September 20, 2012 Lecture 8 RPCs and Distributed.
Distributed Object & Remote Invocation Vidya Satyanarayanan.
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
Remote Object Invocation
Distributed Computing
Copyright © George Coulouris, Jean Dollimore, Tim Kindberg This material is made available for private study and for direct.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
CS490T Advanced Tablet Platform Applications Network Programming Evolution.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Communication in Distributed Systems –Part 2
.NET Mobile Application Development Remote Procedure Call.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo.
CSE 486/586 CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
1 Distributed Systems Distributed Objects & Remote Invocation II (CORBA VS DCOM) Dr. Sunny Jeong. With Thanks to.
Information Management NTU Interprocess Communication and Middleware.
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.
Chapter 4: Interprocess Communication‏ Pages
Lecture 15-1 Computer Science 425 Distributed Systems CS 425 / CSE 424 / ECE 428 Fall 2010 Indranil Gupta (Indy) October 12, 2010 Lecture 15 RPCs and Distributed.
CS425 /CSE424/ECE428 – Distributed Systems – Fall 2011 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya.
1 Lecture 5 (part2) : “Interprocess communication” n reasons for process cooperation n types of message passing n direct and indirect message passing n.
Distributed Objects and Middleware. Sockets and Ports Source: G. Coulouris et al., Distributed Systems: Concepts and Design.
DISTRIBUTED OBJECTS AND REMOTE INVOCATION. Introduction This chapter is concerned with programming models for distributed applications... Familiar programming.
CSE 451: Operating Systems Winter 2015 Module 22 Remote Procedure Call (RPC) Mark Zbikowski Allen Center 476 © 2013 Gribble, Lazowska,
IS473 Distributed Systems CHAPTER 5 Distributed Objects & Remote Invocation.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
CS 425/ECE 428/CSE 424 Distributed Systems (Fall 2009) Lecture 18 Distributed Objects (II) Sections , Chapter
Distributed Objects & Remote Invocation
Eric Tryon Brian Clark Christopher McKeowen. System Architecture The architecture can be broken down to three different basic layers Stub/skeleton layer.
Distributed Objects and Remote Invocation Source: George Colouris, Jean Dollimore, Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts.
Remote Procedure Call RPC
Lecture 4 Mechanisms & Kernel for NOSs. Mechanisms for Network Operating Systems  Network operating systems provide three basic mechanisms that support.
Today: Distributed Objects and Components 1. Me Greg Paperin MSci Computer Science href= 2.
1 Distribuerede systemer og sikkerhed – 28. februar 2002 From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 3, © Addison-Wesley.
Lecture 8-1 Computer Science 425 Distributed Systems CS 425 / ECE 428 Fall 2013 Indranil Gupta (Indy) September 19, 2013 Lecture 8 RPCs and Distributed.
Distributed objects and remote invocation Pages
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Distributed Systems Lecture 8 RPC and marshalling 1.
Topic 5: CORBA RMI Dr. Ayman Srour
Distributed Computing & Embedded Systems Chapter 4: Remote Method Invocation Dr. Umair Ali Khan.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Topic 3: Remote Invocation Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Distributed Web Systems Distributed Objects and Remote Method Invocation Lecturer Department University.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
CSE 486/586 Distributed Systems Remote Procedure Call
Distributed Systems Course Topics in distributed objects
Programming Models for Distributed Application
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
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Remote method invocation (RMI)
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
Distribution Infrastructures
Remote invocation (call)
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
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Presentation transcript:

CS425 /CSE424/ECE428 – Distributed Systems – Fall Nikita Borisov - UIUC1 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S. Mitra, K. Nahrstedt, N. Vaidya

N80 0 Say m=7 N32 N45 File bad.mp3 with key K42 stored here At node n, send query for key k to largest successor/finger entry < k if none exist, return successor(n) to requestor All “arrows” are RPCs N112 N96 N16 Who has bad.mp3? (hashes to K42) What are “RPCs”? Nikita Borisov - UIUC2

 Bank Database: Think of two simultaneous deposits of $10,000 into your bank account, each from one ATM.  Both ATMs read initial amount of $1000 concurrently from the bank server  Both ATMs add $10,000 to this amount (locally at the ATM)  Both write the final amount to the server  What's wrong?  The ATMs need mutually exclusive access to your account entry at the server How are “transactions” executed between a client ATM and a bank server? Nikita Borisov - UIUC3

Applications Middleware layers= Provide support to the application\ Run at all level Request reply protocol External data representation Operating System RPCs and RMIs, e.g., CORBA RMI=Remote Method Invocation CORBA=Common Object Request Brokerage Architecture Nikita Borisov - UIUC4

 Within one process’s address space  Object  consists of a set of data and a set of methods.  E.g., C++/Java object  Object reference  an identifier via which objects can be accessed.  i.e., a pointer (C++)  Interface  Signatures of methods ▪ Types of arguments, return values, exceptions  No implementation  E.g., hash table: ▪ insert(key, value) ▪ value = get(key) ▪ remove(key) Nikita Borisov - UIUC5

 May cross multiple process’s address spaces  Remote method invocation  method invocations between objects in different processes (processes may be on the same or different host).  Remote Procedure Call (RPC): procedure call between functions on different processes in non-object-based system  Remote objects  objects that can receive remote invocations.  Remote object reference  an identifier that can be used globally throughout a distributed system to refer to a particular unique remote object.  Remote interface  Every remote object has a remote interface that specifies which of its methods can be invoked remotely. E.g., CORBA interface definition language (IDL) Nikita Borisov - UIUC6

interface remote m1 m2 m3 m4 m5 m6 Data implementation remoteobject { of methods Example Remote Object reference=(IP,port,objectnumber,signature,time) Nikita Borisov - UIUC7

invocation remote invocation remote local invocation A B C D E F Local invocation=between objects on same process. Has exactly once semantics Remote invocation=between objects on different processes. Ideally also want exactly once semantics for remote invocations But difficult (why?) Process Object Process Host A Host B Nikita Borisov - UIUC8

 Execute Reply correct function Execute, Crash Request Crash Request Execute Reply Execute Reply crash before reply crash before execution lost request Channel fails during reply Client machine fails before receiving reply (and if request is received more than once?) Nikita Borisov - UIUC9

Fault tolerance measures Invocation semantics Retransmit request message Duplicate filtering Re-execute procedure or retransmit reply No Yes Not applicable No Yes Not applicable Re-execute procedure Retransmit old replyAt-most-once At-least-once Maybe Whether or not to retransmit the request message until either a reply is received or the server is assumed to be failed when retransmissions are used, whether to filter out duplicate requests at the server. whether to keep a history of result messages to enable lost results to be retransmitted without re-executing the operations Java RMI, CORBA Sun RPC (ok for idempotent operations) Idempotent=same result if applied repeatedly, w/o side effects Nikita Borisov - UIUC10

object A object B skeleton Request proxy for B Reply Communication Remote Remote reference Communication module reference module module for B's class & dispatcher remote client server Process P1 Process P2 MIDDLEWARE Nikita Borisov - UIUC11

object A object B skeleton Request proxy for B Reply Communication Remote Remote reference Communication module reference module module for B's class & dispatcher remote client server Process P1 (“client”) Process P2 (“server”) Nikita Borisov - UIUC12

 Is responsible for making RMI transparent to clients by behaving like a local object to the invoker.  The proxy implements (Java term, not literally) the methods in the interface of the remote object that it represents. But,…  Instead of executing an invocation, the proxy forwards it to a remote object  Marshals a request message ▪ Target object reference ▪ Method ID ▪ Argument values  Sends request message  Unmarshals reply and returns to invoker Nikita Borisov - UIUC13

 External data representation: an agreed, platform- independent, standard for the representation of data structures and primitive values.  CORBA Common Data Representation (CDR)  Sun’s XDR  Google Protocol Buffers  Marshalling: the act of taking a collection of data items (platform dependent) and assembling them into the external data representation (platform independent).  Unmarshalling: the process of disassembling data that is in external data representation form, into a locally interpretable form Nikita Borisov - UIUC14

message Test1 { required int32 a = 1; } message Test2 { required string b = 2; } e 67 t e s t i n g Nikita Borisov - UIUC15

 Is responsible for translating between local and remote object references and for creating remote object references.  Has a remote object table  An entry for each remote object held by any process. E.g., B at P2.  An entry for each local proxy. E.g., proxy-B at P1.  When a new remote object is seen by the remote reference module, it creates a remote object reference and adds it to the table.  When a remote object reference arrives in a request or reply message, the remote reference module is asked for the corresponding local object reference, which may refer to either a proxy or to a remote object.  In case the remote object reference is not in the table, the RMI software creates a new proxy and asks the remote reference module to add it to the table Nikita Borisov - UIUC16

object A object B skeleton Request proxy for B Reply Communication Remote Remote reference Communication module reference module module for B's class & dispatcher remote client server Process P1 (“client”) Process P2 (“server”) Nikita Borisov - UIUC17

 Each process has one dispatcher, and a skeleton for each local object (actually, for the class).  The dispatcher receives all request messages from the communication module.  For the request message, it uses the method id to select the appropriate method in the appropriate skeleton, passing on the request message.  Skeleton “implements” the methods in the remote interface.  A skeleton method un-marshals the arguments in the request message and invokes the corresponding method in the remote object (the actual object).  It waits for the invocation to complete and marshals the result, together with any exceptions, into a reply message Nikita Borisov - UIUC18

 Object A Object B Comm. Module Skeleton for B's Class Server Process Client Process Proxy Object B Remote Reference Module Dispatcher Proxy object is a hollow container of Method names. Remote Reference Module translates between local and remote object references. Dispatcher sends the request to Skeleton Object Skeleton unmarshals parameters, sends it to the object, & marshals the results for return Remote Reference Module MIDDLEWARE Nikita Borisov - UIUC19

 Programmer only writes object implementations and interfaces  Proxies Dispatchers and Skeletons generated automatically from the specified interfaces  In CORBA, programmer specifies interfaces of remote objects in CORBA IDL; then, the interface compiler automatically generates code for proxies, dispatchers and skeletons.  In Java RMI  The programmer defines the set of methods offered by a remote object as a Java interface implemented in the remote object.  The Java RMI compiler generates the proxy, dispatcher and skeleton classes from the class of the remote object Nikita Borisov - UIUC20

 Binder: A separate service that maintains a table containing mappings from textual names to remote object references. (sort of like DNS, but for the specific middleware)  Used by servers to register their remote objects by name. Used by clients to look them up. E.g., Java RMI Registry, CORBA Naming Svc.  Activation of remote objects  A remote object is active when it is available for invocation within a running process.  A passive object consists of (i) implementation of its methods; and (ii) its state in the marshalled form (a form in which it is shippable).  Activation creates a new instance of the class of a passive object and initializes its instance variables. It is called on-demand.  An activator is responsible for ▪ Registering passive objects at the binder ▪ Starting named server processes and activating remote objects in them. ▪ Keeping track of the locations of the servers for remote objects it has already activated  E.g., Activator=Inetd, Passive Object/service=FTP (invoked on demand) Nikita Borisov - UIUC21

 Persistent Object = an object that survives between simultaneous invocation of a process. E.g., Persistent Java, PerDIS, Khazana.  If objects migrate, may not be a good idea to have remote object reference=(IP,port,…)  Location service= maps a remote object reference to its likely current location  Allows the object to migrate from host to host, without changing remote object reference  Example: Akamai is a location service for web objects. It “migrates” web objects using the DNS location service Nikita Borisov - UIUC22

 Local objects vs. Remote objects  RPCs and RMIs  RMI: invocation, proxies, skeletons, dispatchers  Binder, Activator, Persistent Object, Location Service Nikita Borisov - UIUC23