CS603 Distributed Object Systems March 27, 2002. Distributed Object Systems What are they? –CORBA –DCOM –Java/RMI But what does it mean? –RPC for the.

Slides:



Advertisements
Similar presentations
COM vs. CORBA.
Advertisements

II. Middleware for Distributed Systems
Remote Procedure CallCS-4513, D-Term Remote Procedure Call CS-4513 Distributed Computing Systems (Slides include materials from Operating System.
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.
Seminarium on Component-based Software Engineering Jan Willem Klinkenberg CORBA.
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.
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.
Distributed Systems Architectures
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 Framework Eelements 1 CORBA Framework Elements  Object Request Broker (ORB)  This is the object manager in CORBA  Mechanisms for specifying interfaces.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 11: CORBA.
CORBA Case Study By Jeffrey Oliver March March 17, 2003CORBA Case Study by J. T. Oliver2 History The CORBA (Common Object Request Broker Architecture)
CS 501: Software Engineering Fall 2000 Lecture 16 System Architecture III Distributed Objects.
Distributed Service Architectures Yitao Duan 03/19/2002.
OCT 1 Master of Information System Management Organizational Communications and Distributed Object Technologies Lecture 5: Distributed Objects.
II. Middleware for Distributed Systems
Communication in Distributed Systems –Part 2
Object Based Operating Systems1 Learning Objectives Object Orientation and its benefits Controversy over object based operating systems Object based operating.
CORBA Chapter 17 Coulouris text. Today’s Topics CORBA History and goals CORBA RMI CORBA services The Distributed Whiteboard Revisited.
Common Object Request Broker Architecture (CORBA) CS-328.
Copyright © 2003 ProsoftTraining. All rights reserved. Distributed Object Computing Using Java and CORBA.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
CORBA Celsina Bignoli Enterprise Computing Corporation have similar computing environments: –mixed set of HW platforms –a mixed set.
COM vs. CORBA Computer Science at Azusa Pacific University September 19, 2015 Azusa Pacific University, Azusa, CA 91702, Tel: (800) Department.
Cli/Serv.: rmiCORBA/131 Client/Server Distributed Systems v Objectives –introduce rmi and CORBA , Semester 1, RMI and CORBA.
CS 603 DCOM April 5, DCOM – What is it? Start with COM – Component Object Model –Language-independent object interface Add interprocess communication.
Information Management NTU Interprocess Communication and Middleware.
Copyright (c) Qusay H. Mahmoud 1 The Naming Service (Client’s View) A tree-like directory for object references Much like a file system: provides directory.
1 Java RMI G53ACC Chris Greenhalgh. 2 Contents l Java RMI overview l A Java RMI example –Overview –Walk-through l Implementation notes –Argument passing.
New features for CORBA 3.0 by Steve Vinoski Presented by Ajay Tandon.
Abhishek Bachchan Vishal Patangia
CORBA IS 8030 – Integrated Computing Environments Dr. Hoganson CORBA Common Object Request Broker Architecture Published by Object Management Group (OMG)
CORBA/IDL Common Object Resource Broker Architecture (CORBA) Interface Definition Language (IDL) Object Management Group (OMG) ( Specification.
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.
CSC 480 Software Engineering Lecture 18 Nov 6, 2002.
CORBA Common Object Request Broker Architecture. Basic Architecture A distributed objects architecture. Logically, an object client makes method calls.
Electronic Payment Systems (1)
Netprog: Corba Object Services1 CORBA 2.0 Object Services Ref: The Essential Distributed Objects Survival Guide: Orfali, Harky & Edwards.
The World Leader in Making Software Work Together ™ Copyright IONA Technologies 1999 Building CORBA Applications (On OS/390 ?) Dusty Rivers Enterprise.
CS 501: Software Engineering Fall 1999 Lecture 12 System Architecture III Distributed Objects.
18-349: Introduction to Embedded Systems Embedded Middleware Lecture 23.
CS551 - Lecture 11 1 CS551 Object Oriented Middleware (III) (Chap. 5 of EDO) Yugi Lee STB #555 (816)
 Common Object Request Broker Architecture  An industry standard developed by OMG to help in distributed programming.
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 Source: George Colouris, Jean Dollimore, Tim Kinderberg & Gordon Blair (2012). Distributed Systems: Concepts.
.NET Mobile Application Development XML Web Services.
1 Distributed Programming low level: sending data among distributed computations higher level: supporting invocations among distributed computations network.
(C) 2003 University of ManchesterCS31010 Lecture 14: CORBA.
CORBA: Object Adapter, Services, Inter-ORB Protocols - Balaprasuna Chennupati.
CEN6502, Spring Understanding the ORB: Client Side Structure of ORB (fig 4.1) Client requests may be passed to ORB via either SII or DII SII decide.
Topic 5: CORBA RMI Dr. Ayman Srour
1 CS 501 Spring 2002 CS 501: Software Engineering Lecture 15 System Architecture III.
Distributed Web Systems Distributed Objects and Remote Method Invocation Lecturer Department University.
CORBA Antonio Vasquez, John Shelton, Nidia, Ruben.
Common Object Request Broker Architecture (CORBA)
Presentation on Distributed Object-Based Systems
Broker in practice: Middleware
CORBA Alegria Baquero.
CORBA (Common Object Request Broker Architecture)
The OMG Approach CORBA, CCM, OMA, and MDA.
CORBA Alegria Baquero.
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Inventory of Distributed Computing Concepts
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
1999년 10월 29일 김 정 선 한양대학교 공학대학 전자컴퓨터공학부
Presentation transcript:

CS603 Distributed Object Systems March 27, 2002

Distributed Object Systems What are they? –CORBA –DCOM –Java/RMI But what does it mean? –RPC for the object crowd –With all the tradeoffs/choices/distinctions of RPC systems

Distributed Objects as RPC++ Interface Description Language –Defines external view of objects Compilers / Precompilers –Language extensions Run Time System –Directory Services –Data Conversion –Security / Authentication

Distributed Object System: Distinctions Single language vs. multilingual –Cross-lingual? Platform independence –True cross-platform communication? “Extras” –Real-time features –Fault tolerance –Transaction support –…

The Big Three CORBA – DCE on steroids –Cross-lingual (primarily C++, Java) –Cross-platform –Many features DCOM – Microsoft’s answer –Some cross-lingual support (within Microsoft world) –Windows only –Built on DCE RPC and COM Java RMI –Single language, tightly integrated

CORBA: Background Object Management Group –Corporate-sponsored standards body –Members develop and vote on standards –Current specs include UML, CORBA Started April 1989 Working groups for extensible specifications –RealTime CORBA –Fault-Tolerant CORBA –Embedded CORBA –Many more…

CORBA: Basics (Thanks to Doug Schmidt, Andrew Tannenbaum, and OMG for figures) Object Request Broker Object Services –Naming, “Trading” (property-based location), security, etc. Common Facilities –General interfaces, e.g., OpenDoc –Domain interfaces: Standards –Application interfaces: IDL specifications for a particular application

ORB Architecture

CORBA IDL Syntactic description of objects Single Interface Definition Language –Compiles to multiple binary interfaces: C, C++, Java, Smalltalk, Ada, COBOL, ? Assign Repository Identifier –Register interface in interface repository Generate Proxy –Client-side stub –Marshals invocation request –Unmarshals result Also Dynamic Invocation Interface –Invoke object when interface not known until runtime

Key ORB facilities Manipulate object references –Marshal/Unmarshal –Comparison Service Discovery –By name –By property –Interface repository and Implementation repository ORB/Proxy interface can be vendor specific

Interfaces

Invocation Models Default: Synchronous Semantics –Block for response –Exception on failure –At-most-once semantics One-Way Request –No response needed/possible –Non-blocking –Best effort semantics Deferred Synchronous –Caller can continue and later wait for result

Naming Object reference –Language independent “pointer” –POA: Adaptor to make server-side code accessible to client

Indirect Binding

Message passing models Events –No guarantees –No persistence Notification –Events with filtering

Persistent Communications Callback model –Client provides object that is called with result Polling Model –Client polls for results Messages Stored by ORB

Processes Client and Server distinct –Client processes are simple –Server potentially complex Agent processes –Interface to external agent system

Common Services Collection service –List/queue/etc. objects Iterator, get methods –“Class library” for CORBA Query service –Construct collections searchable through declarative query language Concurrency control service –Locking mechanisms Transaction service

Services – The Full ListThe Full List CollectionGrouping objects into lists, queue, sets, etc. QueryQuerying collections of objects in a declarative manner ConcurrencyAllow concurrent access to shared objects TransactionFlat and nested transactions on method calls over multiple objects EventAsynchronous communication through events NotificationEvent-based asynchronous communication ExternalizationMarshaling and unmarshaling of objects Life cycleCreation, deletion, copying, and moving of objects LicensingAttaching a license to an object NamingSystemwide naming of objects PropertyAssociating (attribute, value) pairs with objects TradingPublish and find the services an object has to offer PersistencePersistently storing objects RelationshipExpressing relationships between objects SecuritySecure channels, authorization, and auditing TimeCurrent time within specified error margins

Interoperability Multiple ORB vendors –Do you have to choose one? General Inter-ORB Protocol –Framework – without tranport –Internet Inter-ORB Protocol on TCP Message Types: –From client: Request, LocateRequest, CancelRequest –From server: Reply, LocateReply –Both: CloseConnection, MessageError, Fragment

CS603 CORBA March 29, 2002

CORBA Programming 1.Select and install an Object Request Broker –More later – examples based on ORBIX, C++ 2.Define the interfaces (IDL) 3.Create classes that implement interfaces 4.Write server function –Instantiates classes –Registers with ORB 5.Run Server 6.Write and Run Client

Ticket Office: IDL // IDL – file ticket.idl typedef float Price; struct Place { char row; unsigned long seat; }; Interface TicketOffice { readonly attribute string name readonly attribute unsigned long numberOfSeats Price getPrice (in Place chosenPlace); boolean bookSingleSeat (in Place chosenPlace, in string creditCard); };

Ticket Office: Compile IDL % idl –B –S ticket.idl // Produces several files: ticket.hh – C++ headers #include Typedef CORBA::Float Price; Struct Place { CORBA::Char row; CORBA::ULong seat; }; Class TicketOffice: public virtual CORBA::Object { public: Virtual char* name() throw (CORBA::SystemException); … Class TicketOfficeBOAImpl { … }; ticketC.C// stubs for clients ticketS.C// skeleton for server TicketOffice_i.h,.C// Outline of implementation

TicketOffice: Implementation Declaration class TicketOffice_i : public virtual TicketOfficeBOAImpl { char* m_name; Price m-highPrice; Price m-lowPrice; unsigned char** m_avail = {{1 1 1} {1 1 1} {1 1 1}}; public: TicketOffice_i (const char * theName, const Price theHighPrice, const Price theLowPrice); virtual ~TicketOffice_i(); virtual char* name() throw (CORBA::SystemException); virtual CORBA::ULong numberOfSeats() throw (CORBA::SystemException); virtual Price getPrice (const Place& chosenPlace) throw (CORBA::SystemException); virtual CORBA::Boolean bookSingleSeat (const Place& chosenPlace, const char* creditCard) throw (CORBA::SystemException); };

TicketOffice: Implementation #include “ticket_i.h” TicketOffice_i::TicketOffice_i (const char * theName, const Price theHighPrice, const Price theLowPrice) : m_highPrice(theHighPrice), m_lowPrice (theLowPrice) { m_name = new char[strlen(theName) + 1]; strcpy(m_name, theName); } TicketOffice_i::~TicketOffice_i() { delete[] m_name; } char* TicketOffice_i::name() throw (CORBA::SystemException) { return CORBA::string_dup(m_name); } CORBA::ULong TicketOffice::numberOfSeats() throw (CORBA::SystemException) { return 9; } Price TicketOffice::getPrice (const Place& chosenPlace) throw (CORBA::SystemException) { if (chosePlace.row == 1) return m_lowPrice; else return m_high_price; } CORBA::Boolean TicketOffice::bookSingleSeat ( const Place& chosenPlace, const char* creditCard) throw (CORBA::SystemException) { unsigned long rowIndex = chosenPlace.row – ‘A’; if (m_avail[rowIndex][chosePlace.seat]) { m_avail[rowIndex][chosePlace.seat] = 0; return 1; } else return 0; }

TicketOffice: Server #include “ticket_i.h” int main() { TicketOffice_i myTicketOffice( “Loeb”, 15.00, 10.00); CORBA::Orbix.impl_is_read(“TicketOfficeSrv”); } Following registers server so it is automatically started (or just run a.out) % putit TicketOfficeSrv a.out

TicketOffice: Client #include “Ticket.hh” int main() { TicketOffice_var toVar; tovar = TicketOffice::_bind(“:TicketOfficeSrv”); Place p = {‘B’, 1}; if (toVar->bookSingleSeat(p, “ ”)) cout name() getPrice(p); else cout << “Seat B1 taken”; }

CS603 CORBA April 1, 2002

More on Registering a Server Registration – generic (not Orbix-specific) CORBA::ORB_ptr orb = “CORBA::ORB_init(argc, argv, “Orbix”); CORBA::BOA_ptr boa = orb->BOA_init (argc, argv, “Orbix_BOA); boa->impl_is_ready(“TicketOfficeSrv”); impl_is_ready defaults to waiting forever –impl_is_ready(name, ORBA::ULong timeOut); // return if idle for timeOut

Wrapping Existing Code TIE approach –Creates object that interfaces CORBA to identically declared existing C++ classes –Execute DEF_TIE macros to create/bind Multiple inheritance approach –CORBA interface implementation inherits BOAImpl Legacy class

Finding operations: Simple Binding Simple Optionally specify host Can specify additional information: Marker –Server myTicketOffice._marker(“Loeb”); myTicketOffice._bind(“TicketOffice”); –Client to_var p = to::_bind(“Loeb:TicketOffice”, “blitz”);

Finding Operations: Naming Service Database of bindings: name X object ref Naming context: Hierarchical structure A name is a sequence –typedef sequnce Name; –Struct NameComponent id – real name kind – application-specific information

Finding Operations: Naming Service NamingContext interface –Object resolve(in Name n) – get object given name raises ( NotFound, CannotProceed, InvalidName ); –Void bind(in Name n, in Object o) … -- bind object to name –Void bind_context(in Name n, in NamingContext nc) … – put name in context CosNaming interface –Struct Binding { Name binding_name; {nobject, ncontext} binding_type }; –Typedef sequence BindingList; –Interface NamingContext { void list (in unsigned long how_many, out BindingList bl, out BindingIterator bi); };

Naming: Use Create hierarchy of naming contexts –E.g., tourism: theatre, hotel, … Bind specific name to context –tourism.theatre.loeb Resolution: Create name and resolve –name = new CosNaming::Name(3); –name->length(3); –name[0].id = CORBA::string_dup(“tourism”); –name[0].kind = CORBA::string_dup(“”); –name[1].id = … LoebTicketOffices = namecontext->resolve(name); –Also facilities to iterate over or select from multiple results

More on IDL IDL supports inheritance, multiple inheritance –Implementations must do the same –Can redefine operations at implementation level Can forward reference / recursive types interface a; interface b { readonly attribute a a_inst }; interface a { … }; #include, #define, etc. supported

Object References Can pass objects Given class foo, get class foo_ptr (C++ pointer) –Must manually maintain reference counts foo_ptr p2 = p1;p2 = foo::_duplicate(p1); CORBA::release(p2); –Class foo_var: Automatically maintains reference counts –Use _ptr for parameters Passing objects: Server understands them –Parameters defined in IDL –Server must have valid implementation (including parameters) to invoke them

Casting Can assign object reference to object reference of parent class –Can’t use _var for target and _ptr for source Can Narrow: Assign object to child –child = child_class::_narrow(parent)

Dynamic Invocation (following syntax ORBIX-specific) Create an “on-the fly” reference CORBA::Object_ptr target = // any object CORBA::Request r(target, “operation”) r << CORBA::inMode << inparameter << CORBA::outMode << outparameter …; r.invoke(); Can use repository to identify name/parameters to construct request Only way to make deferred synchronous calls –r.send_deferred(), r.poll_response(), r.get_response() –Also r.send_oneway()

Dynamic Skeleton Interface Server equivalent of DII –Not required to use DII Intended for gateways –Server doesn’t understand calls it can process –Trusts client/server to generate legal calls –Translates to legacy server protocol

Security Policy Objects –Specify requirements Secure messaging Authentication / signing Trusted host list Security services –Know how to implement policy objects