CS 425/ECE 428/CSE 424 Distributed Systems (Fall 2009) Lecture 18 Distributed Objects (II) Sections 4.3-4.4, Chapter 5.1-5.4.

Slides:



Advertisements
Similar presentations
DISTRIBUTED COMPUTING PARADIGMS
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.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
Sockets  Defined as an “endpoint for communication.”  Concatenation of IP address + port.  Used for server-client communication.  Server waits for.
Remote Procedure Call Chin-Chih Chang. Remote Procedure Call Remote Procedure Call (RPC) is a protocol that allows programs to call procedures located.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Notes from “Distributed Systems Concepts and Design” by Coulouris
Communication in Distributed Systems –Part 2
.NET Mobile Application Development Remote Procedure Call.
Slides for Chapter 5: Communication between distributed objects
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
CSE 486/586, Spring 2013 CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
CSE 486/586 CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo.
CS425 /CSE424/ECE428 – Distributed Systems – Fall Nikita Borisov - UIUC1 Material derived from slides by I. Gupta, M. Harandi, J. Hou, S.
Distributed Computing Class: BIT5 Instructor: Aatif Kamal Chapter 05: Distributed Objects and Remote Invocation Dated: Nov 2006.
Communication between distributed objects Remote procedure call
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.
Introduction to Distributed Systems Slides for CSCI 3171 Lectures E. W. Grundke.
Sun RPC also called ONC (Open Network Computing) RPC originally designed for client-server communication for Sun Network File System (NFS) provides an.
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.
Client Call Back Client Call Back is useful for multiple clients to keep up to date about changes on the server Example: One auction server and several.
Silberschatz, Galvin, and Gagne  1999 Applied Operating System Concepts Chapter 15: Distributed Communication Sockets Remote Procedure Calls (RPCs) Remote.
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.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
Chapter 5: Distributed objects and remote invocation Introduction Remote procedure call Events and notifications.
Distributed Objects & Remote Invocation
Distributed Objects and Remote Invocation Source: George Colouris, Jean Dollimore, Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts.
Computer Science Lecture 3, page 1 CS677: Distributed OS Last Class: Communication in Distributed Systems Structured or unstructured? Addressing? Blocking/non-blocking?
Slides for Chapter 5: Distributed objects and remote invocation From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition.
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.
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
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.
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.
03 – Remote invoaction Request-reply RPC RMI Coulouris 5
Communication between distributed objects Remote procedure call
CSE 486/586 Distributed Systems Remote Procedure Call
Communication between distributed objects Remote procedure call
Edition 5, © Addison-Wesley 2012
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
Slides for Chapter 5: Distributed objects and remote invocation
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
Distribution Infrastructures
Remote invocation (call)
CSE 451: Operating Systems Winter 2003 Lecture 16 RPC
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
Presentation transcript:

CS 425/ECE 428/CSE 424 Distributed Systems (Fall 2009) Lecture 18 Distributed Objects (II) Sections , Chapter

Acknowledgement The slides during this semester are based on ideas and material from the following sources: –Slides prepared by Professors M. Harandi, J. Hou, I. Gupta, N. Vaidya, Y-Ch. Hu, S. Mitra. –Slides from Professor S. Gosh’s course at University o Iowa.

Administrative MP2 posted October 5, 2009, on the course website, –Deadline November 6 (Friday) –Demonstrations, 4-6pm, 11/6/2009 –You will need to lease one Android/Google Developers Phone per person from the CS department (see lease instructions on the web site)!! –Tutorial for MP2 planned for October 28 evening if students send questions to TA by October 25. Send requests what you would like to hear in the tutorial. –During October 15-25, Thadpong Pongthawornkamol will held office hours and respond to MP2 questions for Ying Huang (Ying is going to the IEEE MASS 2009 conference in

Administrative MP3 proposal instructions –You will need to submit a proposal for MP3 on top of your MP2 before you start MP3 on November 9, 2009 –Deadline for MP3 proposal: October 25, 2009, proposal to TA –At least one representative of each group meets with instructor or TA during October during their office hours ) watch for extended office hours during these days.

Administrative Homework 3 posted on Thursday, October 15 –Deadline: Thursday, October 29, 2009 at the beginning of class

Plan for Today Remote Method Invocation Remote procedure call (RPC) Publish/Subscribe Paradigm Distributed Event–based Systems

Proxy and Skeleton in Remote Method Invocation 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 Architecture attempts to ensure transparency when possible

Remote Method Invocation (RMI) 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

Generation of Proxies, Dispatchers and Skeletons 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.

Main components of CORBA architecture client server proxy or dynamic invocation implementation repository object adapter ORB skeleton or dynamic skeleton client program interface repository Request Reply core for A Servant A

Binder and Activator 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 (recording the names of the servers against the names of the passive objects) »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)

Etc. 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

Remote Procedure Call (RPC)  Uniform, reusable, user-friendly, and action based.  Provide a familiar interface for the application developer  Implements the request-reply primitive  Format of the message is standard  Supports code reuse  Client process calls for invocation of a procedure at the server process.  Semantics are similar to RMIs – at least once, at most once, maybe  Standard interface, independent of applications  A library of reusable procedures, distributed over all sites.

Client and Server Stub Procedures in RPC client procedure Request Reply Communication module dispatcher service client stub server stub procedure client processserver process procedure

Stubs  Stubs are generated automatically from interface specifications.  Stubs hide details of (un)marshalling from application programmer & library code developer.  Client Stubs perform marshalling into request messages and unmarshalling from reply messages  Server Stubs perform unmarshalling from request messages and marshalling into reply messages  Stubs also take care of communication & invocation

The Stub Generation Process Interface Specification Stub Generator Server Stub Common Header Client Stub Client Source RPC LIBRARY Server Source Compiler / Linker RPC LIBRARY Client Program Server Program Compiler / Linker e.g., SUN XDR e.g., rpcgen gcc.o,.exe.c.h gcc

Files Interface in Sun XDR const MAX = 1000; typedef int FileIdentifier; typedef int FilePointer; typedef int Length; struct Data { int length; char buffer[MAX]; }; struct writeargs { FileIdentifier f; FilePointer position; Data data; }; struct readargs { FileIdentifier f; FilePointer position; Length length; }; program FILEREADWRITE { version VERSION { void WRITE(writeargs)=1;1 Data READ(readargs)=2;2 }=2; } = 9999; Program number Version number Only one argument allowed Can specify as struct Available with most Sun systems, and NFS

SUN RPC Client Side /* File : C.c - Simple client of the FileReadWrite service. */ #include #include "FileReadWrite.h" main(int argc, char ** argv) { CLIENT *clientHandle; char *serverName = "coffee"; readargs a; Data *data; clientHandle= clnt_create(serverName, FILEREADWRITE, VERSION, "udp"); /* creates socket and a client handle*/ if (clientHandle==NULL){ clnt_pcreateerror(serverName); /* unable to contact server */ exit(1); } a.f = 10; a.position = 100; a.length = 1000; data = read_2(&a, clientHandle);/* call to remote read procedure */ clnt_destroy(clientHandle); /* closes socket */ }

SUN RPC Server Side /* File S.c - server procedures for the FileReadWrite service */ #include #include"FileReadWrite.h" void * write_2(writeargs *a) { /* do the writing to the file */ } Data * read_2(readargs * a) { static Data result; /* must be static */ result.buffer =... /* do the reading from the file */ result.length =... /* amount read from the file */ return &result; }

Finding RPCs Client Program Server procedure Server Stub Client Stub Comm. Module Dispatcher SERVER CLIENT Finding An RPC: RPCs live on specific hosts at specific ports. Port mapper on the host maps from RPC name to port# When a server process is initialized, it registers its RPCs (handle) with the port mapper A client first connects to port mapper (daemon on standard port) to get this handle The call to RPC is then made by connecting to the corresponding port

Publish/Subscribe Paradigm Publisher –Object that declares that it will generate notifications of particular types of event Subscriber –Object that has subscribed to some type of events in another object. It receives notifications about such events Event –occurs at an object of interest as the result of the completion of a method execution Notification –Object that contains information about an event; –Typically it contains the type of event and its attributes which generally include identity of the object of interest, method invoked and time of occurrence or sequence number

Distributed Event-based Systems Based on publish/subscribe paradigm Two characteristics: –Heterogeneous: »Distributed event-based system allows to connect heterogeneous components in the Internet »It means, event-generating objects publish types of events they offer and other objects subscribe to events and provide interface for receiving notifications –Asynchronous: »Notifications are sent asynchronously by event-generating objects to all objects that have subscribed to them to prevent publishers needing to synchronize with subscribers. »Publishers and subscribers are decoupled.

Dealing Room System At each dealer: One object per named stock [Publish-Subscribe System] e.g, stock market

Architecture for Distributed Event Notification (1) subscriberobserverobject of interest Event service object of interest observer subscriber notification

Distributed Event Notification (2) Observer (also sometimes called Broker) –Main purpose of an observer is to decouple an object of interest from its subscribers Publisher or Observer may be an object of interest –can have many subscribers Delivery semantics –Variety of delivery guarantees for notifications – application dependent –Examples: »Reliable multicast delivery to dealers of stock market »Ordered delivery of notifications »Real-time delivery of notification in hospital patient monitoring

Distributed Event Notification (3) Roles of Observers –Forwarding: »observer carries out all the work of sending notifications to subscribers on behalf of one or more objects of interest –Filtering of notifications: »filters are applied by observer to reduce the number of notifications received according to some predicate on the contents of each notification –Patterns of events: »when an object subscribes to events at an object of interest, they can specify patterns of events that they are interest in Pattern specifies relationship between several events Example: correlate events at a variety of objects of interest, e.g., notifying subscriber only when a certain number of them have generated events. –Notification mailboxes: »if notifications need to be delay until potential subscriber is ready to receive them (e.g., if subscriber experiences faulty connection), they are stored at the observer in notification mailbox

Summary Important Distributed Object Concepts –Remote method invocation –Remote procedure call –Publish/subscribe systems –Distributed event systems Next lecture – Distributed File Systems Reading for next lecture: Distributed File Systems