© Chinese University, CSE Dept. Distributed Systems / 4 - 1 Distributed Systems Topic 4: RPCs vs. CORBA Dr. Michael R. Lyu Computer Science & Engineering.

Slides:



Advertisements
Similar presentations
DISTRIBUTED OBJECTS AND REMOTE INVOCATION
Advertisements

CSE 486/586 Distributed Systems Remote Procedure Call
RPC Robert Grimm New York University Remote Procedure Calls.
Remote Procedure Call (RPC)
Remote Procedure Call Design issues Implementation RPC programming
Tam Vu Remote Procedure Call CISC 879 – Spring 03 Tam Vu March 06, 03.
II. Middleware for Distributed Systems
Presentation 4: Principles of Object-Oriented Middleware.
CS6223: Distributed Systems Remote Procedure Call (RPC)
Common Object Request Broker Architecture (CORBA) By: Sunil Gopinath David Watkins.
CORBA Architecture Nitin Prabhu. Outline CORBA Object Model CORBA Architecture Static Invocation Dynamic Invocation CORBA Communication Model.
CORBA - Common Object Request Broker Architecture.
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 2: Distributed Software Engineering Using CORBA Dr. Michael R. Lyu.
Netprog CORBA Intro1 CORBA Common Object Request Broker Architecture Based partially on Notes by D. Hollinger and Java Network Programming and Distributed.
Advanced Comm. between Distributed Objects 1 Advanced Communication Among Distributed Objects  Outline  Request synchronization  Request multiplicity.
Tutorials 2 A programmer can use two approaches when designing a distributed application. Describe what are they? Communication-Oriented Design Begin with.
A brief look at CORBA. What is CORBA Common Object Request Broker Architecture developed by OMG Combine benefits of OO and distributed computing Distributed.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
Middleware Technologies compiled by: Thomas M. Cosley.
II. Middleware for Distributed Systems
Practical Issues of RPCCS-4513, D-Term Remote Procedure Call Practical Issues CS-4513 Distributed Computing Systems (Slides include materials from.
Communication in Distributed Systems –Part 2
1DT066 D ISTRIBUTED I NFORMATION S YSTEM Middleware 1.
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Other Topics RPC & Middleware.
CSE 486/586 CSE 486/586 Distributed Systems Remote Procedure Call Steve Ko Computer Sciences and Engineering University at Buffalo.
Cli/Serv.: rmiCORBA/131 Client/Server Distributed Systems v Objectives –introduce rmi and CORBA , Semester 1, RMI and CORBA.
Presentation 4: Principles of Object-Oriented Middleware.
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.
SEMINOR. INTRODUCTION 1. Middleware is connectivity software that provides a mechanism for processes to interact with other processes running on multiple.
1DT066 D ISTRIBUTED I NFORMATION S YSTEM Middleware 1.
 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.
Distributed Object Frameworks DCE and CORBA. Distributed Computing Environment (DCE) Architecture proposed by OSF Goal: to standardize an open UNIX envt.
Common Object Request Broker Architecture (CORBA) The Common Object Request Broker Architecture (CORBA) is a specification of a standard architecture for.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
1 Developing Application in Distributed Computing Environment (DCE)
1DT057 D ISTRIBUTED I NFORMATION S YSTEM Middleware: RPC and CORBA 1.
Shuman Guo CSc 8320 Advanced Operating Systems
© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 3: Communication Dr. Michael R. Lyu Computer Science & Engineering.
Remote Procedure CallCS-502 Fall Remote Procedure Call (continued) CS-502, Operating Systems Fall 2007 (Slides include materials from Operating System.
DISTRIBUTED OBJECTS AND REMOTE INVOCATION 1. 2 Topics  Middleware  Remote Method Invocation  Remote Procedure Call.
1 Distributed Programming low level: sending data among distributed computations higher level: supporting invocations among distributed computations network.
Presentation: Special Repetition Recap on Distributed Principles.
(C) 2003 University of ManchesterCS31010 Lecture 14: CORBA.
© Oxford University Press 2011 DISTRIBUTED COMPUTING Sunita Mahajan Sunita Mahajan, Principal, Institute of Computer Science, MET League of Colleges, Mumbai.
Topic 5: CORBA RMI Dr. Ayman Srour
Computer Science Lecture 4, page 1 CS677: Distributed OS Last Class: RPCs RPCs make distributed computations look like local computations Issues: –Parameter.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Object Interaction: RMI and RPC 1. Overview 2 Distributed applications programming - distributed objects model - RMI, invocation semantics - RPC Products.
CORBA Antonio Vasquez, John Shelton, Nidia, Ruben.
1 Distributed Systems Architectures Distributed object architectures Reference: ©Ian Sommerville 2000 Software Engineering, 6th edition.
Prof. Leonardo Mostarda University of Camerino
CSE 486/586 Distributed Systems Remote Procedure Call
CORBA Alegria Baquero.
What is RMI? Remote Method Invocation
Inventory of Distributed Computing Concepts and Web services
DISTRIBUTED COMPUTING
CORBA Alegria Baquero.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Inventory of Distributed Computing Concepts
1DT057 Distributed Information System
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
CS551 Object Oriented Middleware (I) (Chap. 3 of EDO)
Lecture 6: RPC (exercises/questions)
Lecture 6: RPC (exercises/questions)
Copyright 1999 B.Ramamurthy
Presentation transcript:

© Chinese University, CSE Dept. Distributed Systems / Distributed Systems Topic 4: RPCs vs. CORBA Dr. Michael R. Lyu Computer Science & Engineering Department The Chinese University of Hong Kong

© Chinese University, CSE Dept. Distributed Systems / Outline 1. Conceptual Framework 2. RPCs 3. CORBA 4. Comparison 5. Summary

© Chinese University, CSE Dept. Distributed Systems / Conceptual Framework u Architecture. u Accessing components from programming languages. u Interfaces to lower layers. u Component identification (to achieve location transparency). u Service invocation styles. u Handling of failures.

© Chinese University, CSE Dept. Distributed Systems / Remote Procedure Calls u Overview of RPC architecture. u Generation of client/server stubs. u RPC interface. u Binding. u Handling of remote procedures. u Failures of RPCs.

© Chinese University, CSE Dept. Distributed Systems / RPC Architecture ClientServer Network Local Call Client Stub RPC Interface RPC Interface Server Stub Remote Procedure sendreceivesendreceive

© Chinese University, CSE Dept. Distributed Systems / The RPC Language u Definition of types (similar to C).  Component is described as a PROGRAM.  PROGRAM has an identification and a version number.  PROGRAM exports procedures –Procedures have a result type and a parameter list, –Procedure can be called from remote components, –Call can be defined statically or dynamically.

© Chinese University, CSE Dept. Distributed Systems / The RPC Language (Example) /* person.x */ const NL=64; enum sex_type { FEMALE = 1,MALE = 2 }; struct Person { string first_name ; string last_name ; sex_type sex; string city ; }; program PERSONPROG { version PERSONVERS { void PRINT(Person)=0; int STORE(Person)=1; Person LOAD(int)=2; } = 0; } = ;

© Chinese University, CSE Dept. Distributed Systems / Generation of Stubs rpcgen person.x client.c server.c C Compiler, Linker person.h person_clnt.c person_svc.c person_xdr.c ClientServer includes generates reads librpc.a

© Chinese University, CSE Dept. Distributed Systems / Implementation of Server /* server.c */ void * print_0(Person *argp, struct svc_req * rqstp) { static char * result; printf("%s %s\n%s\n\n", argp->first_name, argp->last_name, argp->city); return((void *) &result); }

© Chinese University, CSE Dept. Distributed Systems / /* client.c */ print_person(char * host, Person * pers) {... if (print_0(pers, clnt)==NULL) /* call failed /*... } 2.2 Use of Stubs

© Chinese University, CSE Dept. Distributed Systems / RPC Interface u Used by client or server directly: –Locating servers. –Choosing a transport protocol. –Authentication and security. –Invoking RPCs dynamically. u Used by stubs for: –Generating unique message IDs. –Sending messages. –Maintaining message history.

© Chinese University, CSE Dept. Distributed Systems / print_person(char * host, Person * pers) { CLIENT *clnt; clnt = clnt_create(host, PERSONPROG, PERSONVERS, "udp"); if (clnt == (CLIENT *) NULL) { exit(1); } if (print_0(pers, clnt)==NULL) clnt_perror(clnt, "call failed"); clnt_destroy(clnt); } 2.3 RPC Interface

© Chinese University, CSE Dept. Distributed Systems / Binding u How to locate an RPC server that can execute a given procedure in a network? u Can be done –statically (i.e. at compile-time) or –dynamically (i.e. at run-time). u Dynamic binding is supported by portmap daemons.

© Chinese University, CSE Dept. Distributed Systems / Handling of Remote Procedures u Call handled synchronously by server. u Concurrent RPCs: –serial or –concurrently. u Server availability: –continuous or –on-demand.

© Chinese University, CSE Dept. Distributed Systems / Failures of RPCs u Machines or networks can fail at any time. u At most once semantics. u RPC return value indicates success. u Up to the client to avoid maybe semantics!

© Chinese University, CSE Dept. Distributed Systems / CORBA u Object management architecture. u Accessing remote objects. u ORB interface. u Object identification u Activation strategies. u Request vs. notification. u Handling of failures.

© Chinese University, CSE Dept. Distributed Systems / Object Management Architecture Application Objects CORBA facilities CORBA services Object Request Broker

© Chinese University, CSE Dept. Distributed Systems / Accessing Remote Objects DynamicInvocationClientStubsORBInterfaceServerSkeletonObjectAdapter ORB Core Client Object Implementation

© Chinese University, CSE Dept. Distributed Systems / Stub/Skeleton Generation (for C++) IDL-Compiler Person.idl Client.cc Server.cc C++ Compiler, Linker Personcl.hh Personcl.cc Personsv.cc Personsv.hh ClientServer includes generates reads

© Chinese University, CSE Dept. Distributed Systems / Static vs. Dynamic Invocation u Static invocation: IDL operations must have been defined before client can be developed. u Does not suit every application. u Dynamic invocation interface enables clients to define operation invocations at run-time. u Interface repository can be used to ensure that calls are type safe.

© Chinese University, CSE Dept. Distributed Systems / ORB Interface  Object type Object. u Initialization of object request broker. u Initialization of client / server applications. u Programming interface to interface repository.

© Chinese University, CSE Dept. Distributed Systems / Object Identification u Objects are uniquely identified by object identifiers. u Object identifiers are persistent. u Identifiers can be externalized and internalized. u Identifiers can be obtained –from naming service or trading service, –by reading attributes, –from an operation result or –by internalizing an externalized reference.

© Chinese University, CSE Dept. Distributed Systems / Activation Strategies C Basic Object Adapter Process Object A B D AShared Server BUnshared Server CServer per method DPersistent server Registration Activation

© Chinese University, CSE Dept. Distributed Systems / Request vs. Notification u IDL operations are handled synchronously. u For notifications, it may not be necessary to await server, if operation does not –have a return value, –have out or inout parameters and –raise specific exceptions.  Notification can be implemented as oneway operations in IDL. u Client continues after notification is delivered.

© Chinese University, CSE Dept. Distributed Systems / Notification (Example) /* person.idl */ enum sex_type { FEMALE, MALE }; struct Person { string first_name; string last_name; sex_type sex; string city; }; interface PersonManager { oneway void print(in Person); long store(in Person pers); Person load(in long pers_id); };

© Chinese University, CSE Dept. Distributed Systems / Failures u CORBA operation invocations may fail for the same reasons as RPCs. u Failures are treated differently. u Exceptions give detailed account why an operation has failed. u System vs. application specific exceptions.

© Chinese University, CSE Dept. Distributed Systems / Comparison u RPC architecture lacks interface repository. u IDL is more expressive than RPCL: –inheritance, –attributes and –exceptions. u IDL has multiple standardized language bindings.

© Chinese University, CSE Dept. Distributed Systems / Comparison (cont´d) u Component identification is reflexive in IDL. u Basic object adapter provides more flexible activation strategies. u Oneway operations can be used for asynchronous notifications. u Handling of failures with exceptions is more expressive than returning a NULL pointer.

© Chinese University, CSE Dept. Distributed Systems / Comparison (cont´d) u RPCs may be more efficient than CORBA operation invocations. u RPCs come with the UNIX OS whilst you would have to buy a CORBA product. u CORBA is more widely available on non-UNIX platforms. u RPCs are lightweight.

© Chinese University, CSE Dept. Distributed Systems / Summary u What are the basic conceptual framework in procedure call in distributed systems? u What is RPC? How does it work? u How does CORBA handle remote procedures? u What are the similarities between RPC and CORBA? How do they differ? u Read Textbook Chapter 5.