CORBA COMMON OBJECT REQUEST BROKER ARCHITECTURE OVERVIEW OF CORBA, OMG'S OBJECT TECHNOLOGY FOR DISTRIBUTED APPLICATIONS CORBA

Similar documents
The Common Object Request Broker Architecture (CORBA)

Distributed Object-based Systems CORBA

Session plan. sessionx. Desarrollo de Aplicaciones en Red. What s Corba? RPC vs. Corba. Middleware. Middleware task

Agent and Object Technology Lab Dipartimento di Ingegneria dell Informazione Università degli Studi di Parma. Distributed and Agent Systems

Steps to Demonstrate CORBA Application using Java

Middleware services RT- CORBA. Making an application to CORBA. Distributed objects. Distribution issues, global state, clusters, CORBA, etc

CORBA (Common Object Request Broker Architecture)

Distributed Object-based Systems CORBA

Today: Distributed Middleware. Middleware

Distributed Object-Based Systems The WWW Architecture Web Services Handout 11 Part(a) EECS 591 Farnam Jahanian University of Michigan.

CORBA CASE STUDY Introduction 20.2 CORBA RMI 20.3 CORBA services 20.4 Summary

6 Distributed Object-Based Systems

Distributed Software Systems

Today: Distributed Objects. Distributed Objects

What is CORBA? CORBA (Common Object Request Broker Architecture) is a distributed object-oriented client/server platform.

CORBA. CORBA Background. (Common Object Request Broker Architecture)

DS 2009: middleware. David Evans

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), Institute BW/WI & Institute for Computer Science, University of Hildesheim

Distributed Objects. Object-Oriented Application Development

Department of Computer Science & Engineering. M.Tech(CSE)-I Year-II Semester WEB SERVICES AND SERVICE ORIENTED ARCHITECHTURE (B1513) Mr.K.

UNIT 4 CORBA 4/2/2013 Middleware 59

Orbix Programmer s Guide Java Edition

Information Systems Distributed Information Systems I: CORBA

PROFESSOR: DR.JALILI BY: MAHDI ESHAGHI

Network Computing (EE906) Part 4: Distributed Object Technology

DISTRIBUTED SYSTEMS [COMP9243] Lecture 7: Middleware MIDDLEWARE. Distributed Object based: Slide 1. Slide 3. Message-oriented: Slide 4

On the Use of CORBA in High Level Software Applications at the SLS

Distributed Objects and Remote Invocation. Programming Models for Distributed Applications

Object Management Group. minimumcorba. Presented By Shahzad Aslam-Mir Vertel Corporation Copyright 2001 Object Management Group

CORBA and COM TIP. Two practical techniques for object composition. X LIU, School of Computing, Napier University

NOKIA M2M PLATFORM ACTIVE NAMINGCONTEXT PROGRAMMING GUIDE. Copyright 2002 Nokia. All rights reserved. Issue

Corba. Distributed Object Systems 5 Corba/Activation/POA. Interaction with ORB. ORB init. Object references. ORB init. slides5.pdf March 10,

Distributed Systems Principles and Paradigms

2. Java IDL and CORBA

Problems with the specification lead to new specifications, forcing vendors to

Distributed Object-Based. Systems. Chapter 9

S. Monaghan CSEE, University of Essex. September 21, Client Program and Server Program 3

Part 6: Distributed Objects and EJB. 2003, Karl Aberer, EPFL-SSC, Laboratoire de systèmes d'informations rèpartis Part 5-1

Recommendations for a CORBA Language Mapping for RTSJ

RMI: Design & Implementation

Xx Xx xx CORBA. 4 Dr. Ahmed ElShafee, ACU Spring 2011, Distributed Systems

Java and Distributed Systems

presentation DAD Distributed Applications Development Cristian Toma

RPC and RMI. 2501ICT Nathan

Distributed Middleware. Distributed Objects

RPC flow. 4.3 Remote procedure calls IDL. RPC components. Procedure. Program. sum (j,k) int j,k; {return j+k;} i = sum (3,7); Local procedure call

Chapter 5: Distributed objects and remote invocation

Assignment 5 Discussion: 4. July 2007

MTAT Enterprise System Integration. Lecture 2: Middleware & Web Services

Spectra ORB C++ Edition IDL Guide

Dynamic Invocation Interface 5

Contents. Java RMI. Java RMI. Java RMI system elements. Example application processes/machines Client machine Process/Application A

Distributed Objects. Chapter Distributing Objects Overview

Object-based distributed systems. INF 5040/9040 autumn Lecturer: Frank Eliassen

Distributed Environments. CORBA, JavaRMI and DCOM

Distributed Systems Middleware

Lecture 6. Architectural Patterns: Broker

Introduction to CORBA

AQUILA. Project Defense. Sandeep Misra. (IST ) Development of C++ Client for a Java QoS API based on CORBA

Software Paradigms (Lesson 10) Selected Topics in Software Architecture

DISTRIBUTED OBJECTS AND REMOTE INVOCATION

The Object Model Overview. Contents. Section Title

Challenges in component based programming. Lena Buffoni

Creating CORBA Applications Using UML and SDL

Object-Oriented Programming in C# (VS 2015)

Verteilte Systeme (Distributed Systems)

Migrating IONA Orbix 3 Applications

Distributed Systems Principles and Paradigms. Distributed Object-Based Systems. Remote distributed objects. Remote distributed objects

Middleware in Context: 2016 David E. Bakken. Cpt. S 464/564 Lecture Auxiliary Material (not from text) January 30, 2019

orber Copyright Ericsson AB. All Rights Reserved. orber March 13, 2018

Architecture of the CORBA Component Model. Object Services: Naming Service

Programmer s Guide. VisiBroker for Java VERSION 4.0. Inprise Corporation, 100 Enterprise Way Scotts Valley, CA

Building an Interoperable Distributed Image Database Management System

Distributed Systems. 5. Remote Method Invocation

Electronic Payment Systems (1) E-cash

Interprocess Communication Tanenbaum, van Steen: Ch2 (Ch3) CoDoKi: Ch2, Ch3, Ch5

DISTRIBUTED SYSTEMS [COMP9243] Distributed Object based: Lecture 7: Middleware. Slide 1. Slide 3. Message-oriented: MIDDLEWARE

Borland VisiBroker 8.0

Plug-and-Play Network Service Configuration Using CORBA

Platform-Independent Object Migration in CORBA

1.264 Lecture 16. Legacy Middleware

CORBA vs. DCOM. Master s Thesis in Computer Science

5.4. Events and notifications

Lecture 06: Distributed Object

Implementation of GDMO to IDL Translator and CORBA/CMIP Gateway for TMN/CORBA Integration

C 1. Recap: Finger Table. CSE 486/586 Distributed Systems Remote Procedure Call. Chord: Node Joins and Leaves. Recall? Socket API

Verteilte Systeme (Distributed Systems)

PL/I Programmer s Guide and Reference. Version 6.0, November 2003

MAKING A STATEMENT WITH CORBA

Lecture 5: Object Interaction: RMI and RPC

Distributed Systems. Distributed Object Systems 2 Java RMI. Java RMI. Example. Applet continued. Applet. slides2.pdf Sep 9,

JAVA RMI. Remote Method Invocation

MOM MESSAGE ORIENTED MIDDLEWARE OVERVIEW OF MESSAGE ORIENTED MIDDLEWARE TECHNOLOGIES AND CONCEPTS. MOM Message Oriented Middleware

ORB Interface 4. This chapter contains the following sections. Section Title

Implementacja: /* * JFrame.java */ /** tkubik */

Mohsin Qasim Syed Abbas Ali

OTS 1.1 vs. OTS 1.2 Approvers Function Name Approvers comments Reviewers Function Name Reviewers comments

DLS: a CORBA Service for Dynamic Loading of Code

inside: THE MAGAZINE OF USENIX & SAGE June 2001 Volume 26 Number 3 PROGRAMMING Using CORBA with Java by Prithvi Rao

Chapter 15: Distributed Communication. Sockets Remote Procedure Calls (RPCs) Remote Method Invocation (RMI) CORBA Object Registration

Transcription:

CORBA COMMON OBJECT REQUEST BROKER ARCHITECTURE OVERVIEW OF CORBA, OMG'S OBJECT TECHNOLOGY FOR DISTRIBUTED APPLICATIONS Peter R. Egli 1/27

Contents 1. What is CORBA? 2. CORBA Elements 3. The CORBA IDL 4. Server Programming Models - How to Implement the Server 5. COS CORBA Object Services 6. DII Dynamic Invocation Interface 7. ORB - Object Request Broker 8. Pros and cons of CORBA 2/27

1. What is CORBA? CORBA: Common Object Request Broker Architecture. CORBA is a distributed object technology. Objects call operations (methods) on other objects, either locally or on a remote objects. CORBA provides interoperability between vendors and languages (e.g. objects developed in one programming language like C++ may call operations on objects developed in another language like Java). Client Object Server Object Client Object Server Object Stub Skel. Stub Skel. ORB 1 ORB 2 Inter-ORB communication uses the GIOP (General Inter-ORB Protocol) 3/27

2. CORBA Elements ORB: The Object Request Broker dispatches operation calls to the right server object. Stub: The stub is a component that connects the client object to the ORB. Skeleton: The skeleton is a server-side component that, like the client stub, connects the server object to the ORB. GIOP / IIOP: GIOP: General Inter ORB Protocol. IIOP: Internet Inter ORB Protocol. Communication between ORBs uses a standard protocol. GIOP is a general interoperability protocol while IIOP, a variant of GIOP, is used in TCP/IP based networks. 4/27

3. The CORBA IDL (1/11) IDL (Interface Description Language) defines an object interface in an abstract and implementation neutral way. The IDL of an object represents an interface contract. This separates interface definition from the interface implementation. The IDL compiler generates stub / skeleton code for specific languages (=language mapping or language binding). Language mappings exist for a range of languages (Java, C++, Python, Ruby, COBOL etc.). Language and platform independent interface description Target language / platform Hello.idl IDL compiler (e.g. idlj.exe) Code Stub / Skeleton Code Code E.g. Java: idlj.exe -fall -td../helloserver/src../../hello.idl E.g. omniorb: omniidl.exe -C. -bcxx..\..\hello.idl 5/27

3. The CORBA IDL (2/11) The syntax of IDL inherited much from the C/C++ programming language. Namespace: Keyword module defines a namespace or scope (scoping for avoiding naming conflicts). module can be omitted (the interface then is in the global IDL namespace). Example: //IDL module HelloApp { interface Hello { string sayhello(); oneway void shutdown(); The fully qualified name of the interface is HelloApp::Hello (note the scoping operator :: ). Reopening modules: Modules can appear multiple times in IDL-files. //IDL module HelloApp { interface Hello {...... interface Hello {... 6/27

3. The CORBA IDL (3/11) Main elements of an interface: Operations: Similar to operations (methods) in classes. Arguments have classifiers (in, inout, out) for specifying the direction of the argument passing. Attributes: Similar to attributes in classes. The IDL compiler generates setter and getter functions for each attribute except when it is declared readonly. Example: //IDL module BankSimple { typedef float CashAmount; //type definition interface Account; //forward declaration interface bank {... interface Account { readonly attribute string name; readonly attribute CashAmount balance; void deposit (in CashAmount amount); void withdraw (in CashAmount amount); 7/27

3. The CORBA IDL (4/11) IDL exceptions: There are 2 types of exceptions: a. System exceptions defined by CORBA (may be thrown at any time). b. User defined exceptions (operations may throw multiple exceptions). Example: //IDL module BankSimple { typedef float CashAmount; //type definition required so it can be used as operation argument interface Account { exception InsufficientFunds { string reason; exception AccountBlocked { string reason; void withdraw(in CashAmount amount) raises(insufficientfunds, AccountBlocked);... IDL includes: The #include statement allows importing other IDL files: // IDL #include <BaseInterface.idl>... 8/27

3. The CORBA IDL (5/11) IDL operation invocation semantics: IDL supports 2 operation invocation semantics: A. Synchronous: In synchronous operation calls, the caller is blocked until the operation terminates and has returned. Synchronous operations correspond to operation calls on objects. B. Oneway: In oneway operation invocations, the client is not blocked during the invocation but may continue with other work (asynchronous operation). E.g. oneway operations may be used to send logging information to a log server where it is not necessary to wait for the operation to complete. N.B.: In oneway operations, there is no feedback to the client if the operation succeeded or failed. //IDL module BankSimple {... interface Account { oneway void notice(in string text);... 9/27

3. The CORBA IDL (6/11) Passing context information in operations: Contexts allow mapping a set of identifiers to a set of string values. In the code that the IDL compiler generates, the context is passed like an ordinary argument. //IDL module BankSimple {... interface Account { void deposit(in CashAmount amount) context ( sys_time, sys_location );... Generated code: public interface AccountOperations { void withdraw (float amount, org.omg.corba.context $context); } 10/27

3. The CORBA IDL (7/11) IDL interface inheritance: Interfaces may inherit all operations and attributes of super-interfaces. Multiple inheritance is possible. // IDL module BankSimple { interface Account {... interface CheckingAccount : Account {... interface SavingsAccount : Account {... interface PremiumAccount : CheckingAccount, SavingsAccount {... IDL Object interface type: Object is the mother of all interfaces (user defined interfaces implicitly inherit from Object). Example interface Object operations: Object::_create_request(...): Object::_duplicate(...): Object::_narrow(...): Object::_is_a(...): Creation of requests using DII (Dynamic Invocation Interface). Duplicate object references. Convert an object to a more specific type (kind of a dynamic typecast). Check whether an object may be narrowed to the specified type. 11/27

3. The CORBA IDL (8/11) IDL forward declarations: Similar to C++, IDL allows forward declarations. Forward declarations are required when interfaces reference each other. // IDL module BankSimple { interface Account; // Forward declaration of Account interface Bank { Account create_account (in string name); Account find_account (in string name); // Full definition of Account. interface Account {... Constants in IDL: Like other languages, IDL allows defining constants. module BankSimple { interface Bank { const long MaxAccounts = 10000; const float Factor = (10.0-6.5) * 3.91;... 12/27

3. The CORBA IDL (9/11) Standard IDL data types (1/3): A. Basic types: IDL defines the following basic types. short, unsigned short, long, float, double, char, boolean, octet, any (=arbitrary IDL type) B. Complex types: IDL complex types are enumerations and structure types. enum Currency {pound, dollar, yen, franc struct CustomerDetails { string name; short age; C. Union: Unions allow defining the type of a type member based on an argument. // IDL struct DateStructure { short Day; short Month; short Year; union Date switch (short) { case 1: string stringformat; case 2: long digitalformat; //if argument short=1 default: DateStructure structformat; //defines the default format 13/27

3. The CORBA IDL (10/11) Standard IDL data types (2/3): D. String: IDL supports bounded and unbounded strings. //IDL interface Account { // A bounded string with maximum length 10. attribute string<10> sortcode; // An unbounded string. readonly attribute string name; E. Sequence: A sequence is similar to a one-dimensional array. Again there are bounded and unbounded sequences. A sequence must be defined as a type before being used as an argument in an operation or attribute. // IDL module BankSimple { struct LimitedAccounts { string banksortcode<10>; // Maximum length of sequence is 50. sequence<account, 50> accounts; struct UnlimitedAccounts { string banksortcode<10>; // No maximum length of sequence. sequence<account> accounts; // IDL module BankSimple { typedef sequence<string> CustomerSeq; interface Account { void getcustomerlist(out CustomerSeq names);... 14/27

3. The CORBA IDL (11/11) Standard IDL data types (3/3): F. Array: Arrays are always fixed-size. Arrays may be multi-dimensional. Like sequences, arrays must be defined as typedef before being used as attributes or operation arguments. //IDL struct CustomerAccountInfo { string name; Account accounts[3]; typedef Account AccountArray[100]; interface Bank { readonly attribute AccountArray accounts; G. Fixed: Fixed point numbers are represented as a tuple {digit, scale}. Digit is the length of the number, while scale defines the position of the decimal point. module BankSimple { typedef fixed<10,4> ExchangeRate; //range: (+/-)999999.9999 struct Rates { ExchangeRate USRate; ExchangeRate UKRate; ExchangeRate IRRate; 15/27

4. Server Programming Models - How to Implement the Server (1/5) Over time, different ways of implementation emerged for the server side of the interface defined in the IDL. A. POA model versus ImplBase model (deprecated): POA (Portable Object Adaptor) provides a standard interface for object implementations (portability of servants across different vendors). POA allows 1 servant instance to serve multiple object identities (POA dispatches request to the right servant object). Server application Incoming request Client ORB POA Servants ImplBase is less portable since it does not use a standard interface. The ImplBase model is now deprecated in favor of POA. Server application Client Incoming request ORB Servants 16/27

4. Server Programming Models - How to Implement the Server (2/5) B. Inheritance versus delegation (tie): In the inheritance model, a servant object implements either the ImplBase (deprecated) or POA base class. In the delegation model, the IDL interface is implemented with 2 classes: a. IDL-generated tie-class that dispatches requests to a delegate b. User-defined implementation class (delegate) Server application Incoming request Client ORB POA tie Delegation Servants Combining POA/ImplBase with Inheritance/Delegation: POA and ImplBase can be combined with inheritance and delegation. POA ImplBase Inheritance POA-Inheritance Model ImplBase Inheritance Model (deprecated) Tie POA Tie Model ImplBase Tie Model (deprecated) 17/27

4. Server Programming Models - How to Implement the Server (3/5) ImplBase-Inheritance Model (deprecated): The server (servant) class directly implements ImplBase class (_HelloImplBase in the example). HelloOperations Hello HelloClient _HelloStub (client stub) Comm. _HelloImplBase HelloImpl (servant) Servant = implementor of interface HelloServer 18/27

4. Server Programming Models - How to Implement the Server (4/5) POA Inheritance Model: The POA is the standard interface for connecting servants to the ORB. HelloOperations Hello HelloClient _HelloStub (client stub) Comm. HelloPOA (server skeleton) HelloImpl (servant) Servant = implementor of interface HelloServer 19/27

4. Server Programming Models - How to Implement the Server (5/5) POA/Tie Model: The POA-Tie dispatches requests to servant delegates. HelloOperations Hello HelloPOA (server skeleton) HelloPOATie (tie class) HelloClient _HelloStub (client stub) Comm. HelloImpl (servant) HelloServer Servant = implementor of interface 20/27

5. COS CORBA Object Services COS defines additional services that extend the CORBA 2.0 standard. These service are, however, rarely used in practice. Service Life Cycle Service Persistence Naming Services Event Service Concurrency Control Transaction Service Relationship Services Query Service Licensing Service Property Service Time Service Security Service Description Support for the creation, copying, moving and deleting of objects. Common interface for storing / retrieving objects from storage. Primary object location service, mapping of human readable names to object references. Event notification mechanism (event supplier and consumer objects). Push (publish - subscribe) and pull (=polling) models. Resource locking, transaction locks. Flat and nested transactions (sub-transactions). Explicit definition of relationships of objects. Mapping CORBA objects to relational DBs (a kind of ORM). Controlled access to objects. Association of properties to objects at runtime (properties are not part of IDL interface). Synchronization of clocks on different hosts. Authentication and propagation of credentials, encryption. 21/27

6. DII Dynamic Invocation Interface Static invocation: In a static invocation, a call of an operation is performed through a client stub. The client stub needs to be linked to the client (thus client stub must be available @ compile time). Dynamic invocation with DII: The dynamic invocation does not need or use a client stub but dynamically (@ run-time) constructs a client stub (=proxy object). DII allows calling operations on objects that are not known @ client compile time. From the server point of view, DII is identical to static invocation. DII uses the IFR (InterFace Repository = central registry for interfaces) for locating the right server object. DSI Dynamic Skeleton Interface: DSI is the server-side equivalent of DII. 22/27

7. ORB - Object Request Broker (1/4) ORB functions: A. Object location (providing client location transparency) B. Data marshaling C. Server side: Deliver requests to objects (=servants) D. Client side: Return output values back to the client ORB-Interoperability: Interoperability between ORBs can be achieved with: a. Employing ORBs that use the standard protocol GIOP (General Inter-ORB Protocol) IIOP (Internet Inter-ORB Protocol) is a variant of GIOP GIOP / IIOP uses interoperable object identifiers (IOR: Interoperable Object Reference) Client Server Client machine ORB GIOP (IIOP) Server machine ORB b. Use of bridges between different ORB-protocols Bridges translate from one ORB-protocol to another Client Server Client machine ORB GIOP (IIOP) Inter-ORB bridge Proprietary protocol Server machine ORB 23/27

7. ORB - Object Request Broker (2/4) What is location transparency? The location of remote objects (in which server they live) is hidden to the client application. But: The location must be known to the client s ORB instance. How to locate (find) remote objects: 1. Via direct ORB-connection: ORB orb = ORB.init( -ORBInitialPort 1234 -ORBInitialHost RemoteHost", null); org.omg.corba.object objref = orb.resolve_initial_references("nameservice"); NamingContext ncref = NamingContextHelper.narrow(objRef); NameComponent nc = new NameComponent("Hello", ""); NameComponent path[] = {nc Hello helloimpl = HelloHelper.narrow(ncRef.resolve(path)); Argument in ORB.init() specifies remote host and port. Not true location transparency (remote host address must be passed into client application). Client Servants Client machine ORB Server machine ORB NameService 24/27

7. ORB - Object Request Broker (3/4) 2. Use naming service: ORB orb1 = ORB.init( -ORBInitialPort 10001 -ORBInitialHost orbhost1.net", null); // Initialize another ORB reference ORB orb2 = ORB.init( -ORBInitialPort 10002 -ORBInitialHost orbhost2.net", null); // Get references to the Naming Services org.omg.corba.object nc1ref = orb1.resolve_initial_references("nameservice"); org.omg.corba.object nc2ref = orb2.resolve_initial_references("nameservice"); // Narrow the Naming Service references to NamingContexts and use them... The client still has to deal with multiple remote naming service objects (1 for each remote ORB). 3. Use a central naming service as a bridge to other ORBs: A central naming service allows looking up remote object references. Server machine ORB Servants Client Client machine ORB Server machine ORB NameService NameService Servants Server machine ORB NameService 25/27

7. ORB - Object Request Broker (4/4) 4. Use IOR Interoperable Object References: IORs are stringified object references. IORs contain information about the remote object in order to: a. locate the remote object s home ORB (address, port) b. construct a local stub from the string representation The IOR can be obtained as follows: ORB orb = ORB.init(args, null); HelloImpl helloimpl = new HelloImpl(); helloimpl.setorb(orb); orb.object_to_string(helloimpl) An IOR looks like: IOR:000000000000001749444c3a48656c6c6f4170702f48656c6c6f3a312e30000000000001000000000000006e000102000000000d3137322e32302 e39322e353100000ed000000019afabcb00000000024b3bc3e80000000800000000000000001400000000000002000000010000002000000000000100 0100000002050100010001002000010109000000010001010000000026000000020002 The IOR must be passed to client in some way (web page, web service etc.). 26/27

8. Pros and cons of CORBA Language independence (different mappings defined, e.g. C++, Java, Python, COBOL) OS independence Viable integration technology for heterogenous legacy systems Strong data typing Complex standard, difficult to implement for CORBA product vendors Too complex to use compared to the features and services it provides Firewall-unfriendly because CORBA (IIOP) uses arbitrary TCP ports Lack of security 27/27