Distributed Applications with CORBA. Frank Kargl Chaos Computer Club, Ulm, Germany frank.kargl@ulm.ccc.de

Similar documents
Infrastructure that supports (distributed) componentbased application development

Chapter 6. CORBA-based Architecture. 6.1 Introduction to CORBA 6.2 CORBA-IDL 6.3 Designing CORBA Systems 6.4 Implementing CORBA Applications

Architecture of the CORBA Component Model CORBA 3.0

Overview of CORBA 11.1 I NTRODUCTION TO CORBA Object services 11.5 New features in CORBA Summary

Introduction to Distributed Computing using CORBA

Distributed Network Management Using SNMP, Java, WWW and CORBA

Middleware Lou Somers


Module 17. Client-Server Software Development. Version 2 CSE IIT, Kharagpur

Introduction to CORBA. 1. Introduction 2. Distributed Systems: Notions 3. Middleware 4. CORBA Architecture

CORBA. BY VIRAJ N BHAT

Introduction CORBA Distributed COM. Sections 9.1 & 9.2. Corba & DCOM. John P. Daigle. Department of Computer Science Georgia State University

Elements of Advanced Java Programming

Interface Definition Language

Corba. Corba services. The (very) global picture. Corba. Distributed Object Systems 3 CORBA/IDL. Corba. Features. Services

Introduction to CORBA

A Web-Based Real-Time Traffic Monitoring Scheme Using CORBA

Chapter 2: Remote Procedure Call (RPC)

MIDDLEWARE 1. Figure 1: Middleware Layer in Context

What is Middleware? Software that functions as a conversion or translation layer. It is also a consolidator and integrator.

Migrating Legacy Software Systems to CORBA based Distributed Environments through an Automatic Wrapper Generation Technique

Java and Distributed Object Models: An Analysis

CORBA Firewall Security: Increasing the Security of CORBA Applications. Abstract

Load Balancing in CORBA: A Survey. Response to the Aggregated Computing RFI

PERFORMANCE COMPARISON OF COMMON OBJECT REQUEST BROKER ARCHITECTURE(CORBA) VS JAVA MESSAGING SERVICE(JMS) BY TEAM SCALABLE

3F6 - Software Engineering and Design. Handout 10 Distributed Systems I With Markup. Steve Young

The Java Series Introduction to Java RMI and CORBA. The Java Series. Java RMI and CORBA Raul RAMOS / CERN-IT User Support Slide 1

Web Services. Copyright 2011 Srdjan Komazec

The Service Availability Forum Specification for High Availability Middleware

SOFT 437. Software Performance Analysis. Ch 5:Web Applications and Other Distributed Systems

CORBA Programming with TAOX11. The C++11 CORBA Implementation

Layering a computing infrastructure. Middleware. The new infrastructure: middleware. Spanning layer. Middleware objectives. The new infrastructure

Motivation Definitions EAI Architectures Elements Integration Technologies. Part I. EAI: Foundations, Concepts, and Architectures

Middleware and Distributed Systems. Introduction. Dr. Martin v. Löwis

XII. Distributed Systems and Middleware. Laurea Triennale in Informatica Corso di Ingegneria del Software I A.A. 2006/2007 Andrea Polini

Middleware: Past and Present a Comparison

Information integration platform for CIMS. Chan, FTS; Zhang, J; Lau, HCW; Ning, A

What can DDS do for You? Learn how dynamic publish-subscribe messaging can improve the flexibility and scalability of your applications.

The Efficiency Analysis of the Object Oriented Realization of the Client-Server Systems Based on the CORBA Standard 1

Chapter 5 Application Server Middleware

CORBAservices. Naming. Part of the CORBA Naming Service Interface in IDL. CORBA Naming Service

Implementing Java Distributed Objects with JDBC

System types. Distributed systems

CHAPTER 1: OPERATING SYSTEM FUNDAMENTALS

Security System for Patient DB

Report of the case study in Sistemi Distribuiti A simple Java RMI application

3-Tier Architecture. 3-Tier Architecture. Prepared By. Channu Kambalyal. Page 1 of 19

VisiBroker Configuration Reference

The EMSX Platform. A Modular, Scalable, Efficient, Adaptable Platform to Manage Multi-technology Networks. A White Paper.

An Overview of Java. overview-1

The Enterprise Service Bus

Middleware. Peter Marwedel TU Dortmund, Informatik 12 Germany. technische universität dortmund. fakultät für informatik informatik 12

Network/Socket Programming in Java. Rajkumar Buyya

Netscape Internet Service Broker for C++ Programmer's Guide. Contents

Applying a Pattern Language to Develop Extensible ORB Middleware

UCS. Amazing tools suite in CORBA world

App Servers & J2EE Platform. Contents: Transaction Processing Monitors. TP Monitors (cont) TP-Monitors. TP Standards. TP Monitors (cont)

CORBA Component Model(CCM)

Status of the CORBA Firewall Traversal RFP

Lecture 1: Introduction

Fundamentals of Java Programming

EJB & J2EE. Component Technology with thanks to Jim Dowling. Components. Problems with Previous Paradigms. What EJB Accomplishes

CORBA Objects in Python

Cache Database: Introduction to a New Generation Database

How To Write A Network Operating System For A Network (Networking) System (Netware)

The distributed object computing paradigm: concepts and applications

Division of Informatics, University of Edinburgh

CORBA, DCOP and DBUS. A performance comparison.

Java Application Developer Certificate Program Competencies

Enterprise Application Designs In Relation to ERP and SOA

CORBA I An Introduction To CORBA CptS 464/564 Sept 2, 2004

Event-based middleware services

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme. Middleware. Chapter 8: Middleware

TELECOMMUNICATION SERVICE MANAGEMENT

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)

OMG/CORBA: An Object-Oriented Middleware

What is COM/DCOM. Distributed Object Systems 4 COM/DCOM. COM vs Corba 1. COM vs. Corba 2. Multiple inheritance vs multiple interfaces

Vortex White Paper. Simplifying Real-time Information Integration in Industrial Internet of Things (IIoT) Control Systems

COMP5426 Parallel and Distributed Computing. Distributed Systems: Client/Server and Clusters

Information and Communications Technology Courses at a Glance

Transcription:

Distributed Applications with CORBA Frank Kargl Chaos Computer Club, Ulm, Germany frank.kargl@ulm.ccc.de

Future Networks March 10, 2006 Frank Kargl, CCC Ulm 2

The Problem Application Integration and Distributed Processing are the same thing Constructing information-sharing distributed systems from diverse sources: heterogeneous, networked, physically disparate, multi-vendor. March 10, 2006 Frank Kargl, CCC Ulm 3

Existing Tools? A major problem stands in the way: Existing tools (Sockets, DCE, ONC) are too lowlevel; don t offer a unified view of all distributed applications. Complexity of Distributed Systems grows beyond any boundaries. Implementation and Management Overkill March 10, 2006 Frank Kargl, CCC Ulm 4

Object Management Group Not-for-profit company based in United States, with representation in United Kingdom, Japan & Germany. Founded April 1989. Small staff (15 full time); no internal development. Dedicated to creating and popularizing objectoriented standards for application integration based on existing technology. Object World subsidiary for market studies, training, seminars and conferences. March 10, 2006 Frank Kargl, CCC Ulm 5

Technical Committee Representatives of all member companies. Determines direction of architecture & standards. Meets every eight weeks, hosted internationally. March 10, 2006 Frank Kargl, CCC Ulm 6

Electronic Meetings Discussions continue between meetings by by electronic mail March 10, 2006 Frank Kargl, CCC Ulm 7

Adoption Process RFI (Request for Information) to establish range of commercially available software. RFP (Request for Proposals) to gather explicit descriptions of available software. Letters of Intent to establish corporate direction. Task Force and End User evaluation & recommendation; simultaneous Business Committee examination. Board decision based on TC, End User, and BC recommendations. March 10, 2006 Frank Kargl, CCC Ulm 8

Domain Task Forces Manufacturing: Engineering Resource Planning (ERP), Product Data Management (PDM); Finance Currency Standard, Party Management,Compass Project for Accounting Telecommunications TMN/CORBA interworking, CORBA for IN, Audio/Video Streams Electronic Commerce Electronic Payments, Negotiations Healthcare (CORBAmed) Patient Identification Number (PID), Lexicon Query System, Life Sciences, Transportation air Traffic control, inter-nodal transport. March 10, 2006 Frank Kargl, CCC Ulm 9

Other Directions End-user SIG. Object-oriented analysis & design SIG Object-oriented database interface standards SIG Business Object Management SIG Manufacturing SIG Healthcare SIG Telecommunications SIG Financial SIG Security SIG March 10, 2006 Frank Kargl, CCC Ulm 10

An Open Process OMG is an open, member-supported process, and share their work with other organizations doing related work: X/Open OSF, X Consortium, W3C ESPRIT, NIST, NII ISO, ITU National bodies: ANSI, IEEE, JIPS CFI, ODMG, COS, NMF, IMA, POSC March 10, 2006 Frank Kargl, CCC Ulm 11

A Common Foundation Enable interoperability and Portability based on an object-oriented foundation which specifies: A single terminology for object-orientation. A common abstract framework or object model. A common reference model or architecture. Common interfaces & protocols. Foundation: Model published in OMA Guide March 10, 2006 Frank Kargl, CCC Ulm 12

Object Model Stated Goal is "to define an object model that facilitates Portability of applications and type libraries, and Interoperability of software components in a distributed environment." The model was completed in 1992 and published in the updated OMA Guide. Key concepts are core, components, and profiles. March 10, 2006 Frank Kargl, CCC Ulm 13

OMA Overview Not standardized by OMG; Scope is single application or vendor Application Objects CORBA Facilities Compound Docs Object Linking Help Facilities User Interface Desktop Mgmt Vertical Markets Object Request Broker Lifecycle Events Naming Persistence Transactions Concurrency CORBA Services Externalization Security Time Properties Query Licensing March 10, 2006 Frank Kargl, CCC Ulm 14

Fundamental CORBA Design Principles Separation of interface and implementation Clients depend on interfaces, not implementation Location transparency Service use is orthogonal to service location Access transparency Invoke operations on objects Typed interfaces Object references are typed by interfaces Support of multiple inheritance of interfaces Inheritance extends or specializes behavior March 10, 2006 Frank Kargl, CCC Ulm 15

Fundamental CORBA Design Principles CORBA supports reliable, uni-cast communication oneway, twoway, deferred synchronous CORBA objects can also collaborate in a client/server, peer-to-peer or publish/subscriber manner e.g. COS Event Service defines a publish/subscribe communication paradigm March 10, 2006 Frank Kargl, CCC Ulm 16

CORBA Advantages Simplifies application interworking higher level integration than traditional untyped bytestreams Benefits for distributed programming similar to OO languages for non-distributed programming encapsulation, interface inheritance, polymorphism and exception handling March 10, 2006 Frank Kargl, CCC Ulm 17

CORBA Architecture ORB: Object Request Broker Client ORB Server March 10, 2006 Frank Kargl, CCC Ulm 18

CORBA Architecture CO Client ORB: Object Request Broker CO: Client Object SO: Server Object ORB Server SO SO March 10, 2006 Frank Kargl, CCC Ulm 19

CORBA Architecture CO Client Stub ORB: Object Request Broker CO: Client Object SO: Server Object Stub: Client Stub Skel: Server Skeleton ORB Skel Server SO SO March 10, 2006 Frank Kargl, CCC Ulm 20

CORBA Architecture CO Client Stub ORB: Object Request Broker CO: Client Object SO: Server Object Stub: Client Stub Skel: Server Skeleton ORB Common Services & Facilities Skel Server SO SO March 10, 2006 Frank Kargl, CCC Ulm 21

Interface Definition Language IDL separates the Interface from the Implementation Benefits of using an IDL Ensure platform independence (e.g. NT, Unix) Enforce modularity Increase robustness Enable language independence Many IDLs available ASN.1, DCE IDL, ONC XDR, CORBA IDL March 10, 2006 Frank Kargl, CCC Ulm 22

CORBA IDL Object-oriented, strongly typed, public interface specification language Independent of any particular language/compiler Mappings will be provided for many languages/compilers C, C++, Smalltalk, COBOL, Modula3, DCE, Java,... Not a programming language similar to Java Interface / C++ abstract classes March 10, 2006 Frank Kargl, CCC Ulm 23

CORBA IDL Elements modules and interfaces Operations and Attributes Single and multiple inheritance Basic types (double, long, char, etc.) any type Arrays and sequence struct, enum, union, typedef consts exceptions March 10, 2006 Frank Kargl, CCC Ulm 24

Differences from C++ or Java No control constructs No data members No pointers No con-/destructors No overloaded operations No int data type Contains parameter passing modes Unions require a tag Different String type Different Sequence type Different exception interface No templates oneway call semantics readonly keyword March 10, 2006 Frank Kargl, CCC Ulm 25

CORBA Interface Definition Language IDL isolates interface from implementation Client side Server side Infrastructure IDL March 10, 2006 Frank Kargl, CCC Ulm 26

CORBA Interface Definition Language You can then implement the interface e.g. in C++ using the C++ language mapping. Client side Server side Infrastructure IDL C++ Impl. March 10, 2006 Frank Kargl, CCC Ulm 27

CORBA Interface Definition Language Or perhaps you better like Java. Client side Server side Infrastructure IDL Java Impl. March 10, 2006 Frank Kargl, CCC Ulm 28

CORBA Interface Definition Language Or C, Smalltalk, Cobol or a number of other languages. Client side Server side Infrastructure IDL??? Impl. March 10, 2006 Frank Kargl, CCC Ulm 29

CORBA Interface Definition Language You may also wrap legacy applications using IDL interfaces Client side Server side Infrastructure IDL IDL Wrapper Legacy Appl. March 10, 2006 Frank Kargl, CCC Ulm 30

CORBA Interface Definition Language Or 3rd party libraries. Client side Server side Infrastructure IDL Library Objects March 10, 2006 Frank Kargl, CCC Ulm 31

CORBA Interface Definition Language The same IDL defines the client s interface. Client side Server side IDL Infrastructure IDL Object Impl. March 10, 2006 Frank Kargl, CCC Ulm 32

CORBA Interface Definition Language Then you can implement the client e.g. using Java... Client side Server side Java Client IDL Infrastructure IDL Object Impl. March 10, 2006 Frank Kargl, CCC Ulm 33

CORBA Interface Definition Language or C++, Ada, Smalltalk,... Client side Server side Java Client Java Client Java Client IDL Infrastructure IDL Object Impl. March 10, 2006 Frank Kargl, CCC Ulm 34

CORBA IDL Example Kommentar Package Interface // GoodDay.idl module simplegoodday { interface GoodDay { string hello(); }; }; Methode March 10, 2006 Frank Kargl, CCC Ulm 35

CORBA IDL Compiler // GoodDay.idl module simplegoodday { interface GoodDay { string hello(); }; }; idl2java // GoodDay.java package simplegoodday; public interface GoodDay extends org.omg.corba.object { public java.lang.string hello(); } // _GoodDayImplBase.java // _st_goodday.java // GoodDayHelper.java // GoodDayHolder.java //... March 10, 2006 Frank Kargl, CCC Ulm 36

CORBA IDL Compiler IDL File IDL Compiler Client Stub Body Client Impl. Server Impl. Server Skeleton Header Server Skeleton Body Java Compiler Client Program Corba Runtime Lib. C++ Compiler Server Program March 10, 2006 Frank Kargl, CCC Ulm 37

CORBA IDL // complex.idl module de { module uni-ulm { interface Meeting { readonly attribute string purpose; readonly attribute string participants; oneway void destroy(); }; interface MeetingFactory { Meeting CreateMeeting(in string purpose, in string part); }; interface Room { enum Slot { am9, am10, pm12, pm1, pm2, pm3, pm4}; const short MaxSlots = 8; typedef Meeting Meetings[MaxSlots]; exception NoMeetingInThisSlot{}; exception SlotAlreadyTaken{}; readonly attribute string name; Meetings View(); void Book(in Slot a_slot, in Meeting a_meeting) raises(slotalreadytaken); void Cancel(in Slot a_slot) raises(nomeetinginthisslot); }; }; March }; 10, 2006 Frank Kargl, CCC Ulm 38

Object Invocation Client side Server side Java Client Java Client Java Client IDL Infrastructure IDL Object Impl. There will be a number of different Object Implementations, each with its own IDL interface... March 10, 2006 Frank Kargl, CCC Ulm 39

Object Invocation Client side Server side Java Client Java Client Java Client IDL Infrastructure IDL Object Impl. ObjRef#1 Each Object Implementation is assigned a unique Object Reference... March 10, 2006 Frank Kargl, CCC Ulm 40

Object Invocation Client side Server side Java Client Java Client Java Client ObjRef#1 IDL Infrastructure IDL Object Impl. ObjRef#1 Clients obtain an Object Reference via several ways. March 10, 2006 Frank Kargl, CCC Ulm 41

Object Invocation Client side Server side Java Client Java Client Java Client ObjRef#1 IDL Infrastructure IDL Object Impl. ObjRef#1 Clients use the Object Reference to inform the infrastructure... March 10, 2006 Frank Kargl, CCC Ulm 42

Object Invocation Client side Server side Java Client Java Client Java Client ObjRef#1 IDL Infrastructure IDL Object Impl. ObjRef#1 about the Target Object Implementation for their request. March 10, 2006 Frank Kargl, CCC Ulm 43

Roles of Infrastructure Provides a Local, Well-Known Point of Contact for All Object Invocations a Client may make Passes invocation to Local or Remote Target Object Implementation Understands IDL; Maintains Repository of available Object Interfaces Also Maintains Repository of Available Implementations Federates this information across the System A WEB OF INTERCONNECTED ORBs Infrastructure March 10, 2006 Frank Kargl, CCC Ulm 44

CORBA Architecture C CC Client Client Client Client Client IDL C Obj C Client Client Impl Client Client #1 IDL ORB REQUEST An Object Request Broker relays the Invocation from Client to Object Implementation, and the result back to the Client. March 10, 2006 Frank Kargl, CCC Ulm 45

Different ORB Types Client Obj Impl Client Obj Impl IDL IDL IDL IDL ORB REQUEST ORB REQUEST Server or Operating- System Based Single-Process Library Resident Client IDL ORB REQUEST ORB Obj Impl IDL Client & Implementation Resident March 10, 2006 Frank Kargl, CCC Ulm 46

ORB to ORB Interoperability Client Obj Impl Client Obj Impl IDL IDL IDL IDL ORB ORB ORB ORB IDL Client IDL Obj Impl March 10, 2006 Frank Kargl, CCC Ulm 47

CORBA Interoperability CORBA 2.0 Interoperability Comprises: An overall architecture for CORBA-CORBA communications; An API for adding bridges; A general multi-transport message format (General Inter- ORB Protocol or GIOP); An API for gateways using ESIOPs -- (Environment- Specific Inter-ORB Protocols) UNIVERSAL, OUT-OF-THE-BOX INTEROPERABILITY: GIOP over TCP/IP (IIOP) is mandatory for compliance either internally or via a half-bridge; DCE ESIOP is optional for all implementations. March 10, 2006 Frank Kargl, CCC Ulm 48

CORBA 2.0 Interoperability Spec Applications CORBA 2.0 CORBA 1.2 API GIOP ESIOP TCP/IP Netwar e OSI Mandatory portion: provides out-of-the-box interoperability DCE A General Inter-ORB Protocol (GIOP) is a message format hosted on any network transport. TCP/IP is required for CORBA 2.0, either native or via a half-bridge. An Environment Specific Inter-ORB Protocol (ESIOP) is an optional approach for special environments (real time systems, existing base of DCE, etc.) March 10, 2006 Frank Kargl, CCC Ulm 49

CORBA 2.0 Compliance ORB XYZ Native IIOP! ORB 123 Native DCE! IIOP Half-Bridge! ORB 42 2 Protocols! Native IIOP! Native DCE! CORBA 2.0 COMPLIANT CORBA 2.0 COMPLIANT CORBA 2.0 COMPLIANT These products can all interoperate with every IIOP ORB, and they can all display the CORBA 2.0 brand. March 10, 2006 Frank Kargl, CCC Ulm 50

Implementing CORBA Applications // GoodDay.idl module simplegoodday { interface GoodDay { string hello(); }; }; idl2java // GoodDay.java package simplegoodday; public interface GoodDay extends org.omg.corba.object { public java.lang.string hello(); } // _GoodDayImplBase.java // _st_goodday.java // GoodDayHelper.java // GoodDayHolder.java //... March 10, 2006 Frank Kargl, CCC Ulm 51

Implementing CORBA Applications // _GoodDayImplBase.java package simplegoodday; abstract public class _GoodDayImplBase extends com.inprise.vbroker.corba.portable.skeleton implements simplegoodday.goodday { protected simplegoodday.goodday _wrapper = null; public simplegoodday.goodday _this() { return this; } protected _GoodDayImplBase(java.lang.String name) { super(name); } public _GoodDayImplBase() { } //... Stuff deleted public static boolean _execute(vbj.simplegoodday.corba.goodday _self, int _method_id, org.omg.corba.portable.inputstream _input, org.omg.corba.portable.outputstream _output) { switch(_method_id) { case 0: { java.lang.string _result = _self.hello(); _output.write_string(_result); return false; } } throw new org.omg.corba.marshal(); March } 10, 2006 Frank Kargl, CCC Ulm 52 }

Implementing CORBA Applications // _st_goodday.java package simplegoodday; public class _st_goodday extends com.inprise.vbroker.corba.portable.objectimpl implements simplegoodday.goodday { protected vbj.simplegoodday.corba.goodday _wrapper = null; public vbj.simplegoodday.corba.goodday _this() { return this; } public java.lang.string hello() { org.omg.corba.portable.outputstream _output; org.omg.corba.portable.inputstream _input; java.lang.string _result; while(true) { _output = this._request("hello", true); try { _input = this._invoke(_output, null); _result = _input.read_string(); } catch(org.omg.corba.transient _exception) { continue; } break; } March return 10, 2006 _result; Frank Kargl, CCC Ulm 53 }

Implementing CORBA Applications // GoodDayHelper.java package simplegoodday; abstract public class GoodDayHelper { public static simplegoodday.goodday narrow(org.omg.corba.object object) { return narrow(object, false); } private static simplegoodday.goodday narrow(org.omg.corba.object object, boolean is_a) { // implementation deleted } public static vbj.simplegoodday.corba.goodday bind(org.omg.corba.orb orb) { return bind(orb, null, null, null); } public static simplegoodday.goodday bind(org.omg.corba.orb orb, java.lang.string name) { return bind(orb, name, null, null); } public static simplegoodday.goodday bind(org.omg.corba.orb orb, java.lang.string name, java.lang.string host, org.omg.corba.bindoptions options) { // implmenetation deleted March } 10, 2006 Frank Kargl, CCC Ulm 54 }

Implementing CORBA Applications package simplegoodday; final public class GoodDayHolder implements org.omg.corba.portable.streamable { public simplegoodday.goodday value; public GoodDayHolder() { } public GoodDayHolder(simplegoodday.GoodDay value) { this.value = value; } public void _read(org.omg.corba.portable.inputstream input) { value = simplegoodday.gooddayhelper.read(input); } public void _write(org.omg.corba.portable.outputstream output) { simplegoodday.gooddayhelper.write(output, value); } public org.omg.corba.typecode _type() { return simplegoodday.gooddayhelper.type(); } } March 10, 2006 Frank Kargl, CCC Ulm 55

Implementing CORBA Applications What we have to do: Write an implementation of hello() extending _GoodDayImplBase. Write a server instantiating this implementation. Write a client to call the server. March 10, 2006 Frank Kargl, CCC Ulm 56

Implementing CORBA Applications // GoodDayImpl.java package simplegoodday; import java.util.date; import org.omg.corba.*; import simplegoodday.*; public class GoodDayImpl extends _GoodDayImplBase { } private String location; public GoodDayImpl( String location ) { super(); // initialize location this.location = location; } // hello method public String hello() { return "Hello World from " + location + "!"; } March 10, 2006 Frank Kargl, CCC Ulm 57

Implementing CORBA Applications // GoodDayServer.java package simplegoodday; import java.io.*; import org.omg.corba.*; import simplegoodday.*; public class GoodDayServer { public static void main(string[] args) { try { ORB orb=orb.init(args, null); // init ORB GoodDayImpl gooddayimpl=new GoodDayImpl(args[0]); // create a GoodDay Object; orb.connect(gooddayimpl); // export the object reference System.out.println(orb.object_to_string(goodDayImpl)); // print stringified object reference java.lang.object sync = new java.lang.object(); // wait for requests synchronized (sync) { sync.wait(); } } catch (Exception e) { System.err.println(e); } } } March 10, 2006 Frank Kargl, CCC Ulm 58

Implementing CORBA Applications // GoodDayClient.java package simplegoodday; import java.io.*; import org.omg.corba.*; import simplegoodday.*; public class GoodDayClient { public static void main(string args[]) { try { ORB orb=orb.init(args, null); //init orb org.omg.corba.object obj=orb.string_to_object(args[0]); // get object reference from command line GoodDay goodday = GoodDayHelper.narrow(obj); // cast the IIOR to a specific interface if (goodday==null) { // check for errors System.err.println("stringified object reference" + "is of wrong type"); System.exit(-1); } System.out.println(goodDay.hello()); // call remote method } catch (SystemException ex) { System.err.println(ex); } } } March 10, 2006 Frank Kargl, CCC Ulm 59

What s s missing here? Dynamic Object Discovery Naming Service Dynamic Object Instantiation Basic and Portable Object Adapter Passing parameters IDL: in, out, inout, oneway Classes must extend *ImplBase tie approach Stubs/Skeletons must be present at Client/Server Dynamic Invocation Interface (DII) Dynamic Skeleton Interface (DSI) March 10, 2006 Frank Kargl, CCC Ulm 60

CORBA ORB Architecture Naming Service Interface Rep. IDL Compiler Implementation Rep. Client in args operation() out args + return value Object (Servant) DII IDL Stubs ORB Interface IDL Skel. DSI Object Adapter GIOP/IIOP ORB Core OS Kernel OS I/O Subsyst. Network Interface OS Kernel OS I/O Subsyst. Network Interface March 10, 2006 Frank Kargl, CCC Ulm 61

CORBA Services Basic Services, needed by every OO application Standard Interfaces provide portability and interoperability for these basic functions Not all services implemented by all vendors Interoperability should be provided March 10, 2006 Frank Kargl, CCC Ulm 62

COS Naming Events / Notification Life Cycle Persistent Object Relationship Externalization Transactions Concurrency Control Licensing Query Properties Security (incl. IIOP over SSL) Time Collections Trading March 10, 2006 Frank Kargl, CCC Ulm 63

COS Lifecycle: creation and deletion of objects. Naming: mapping of convenient object names to references to actual objects. Event Notification: registration of required and expected notification of event passage. Persistence: long-term existence of objects, management of object storage. Relationships: representation and consistency management of relationships between objects. Externalization: ability to store object representation on removable media and allow re-internalization later. March 10, 2006 Frank Kargl, CCC Ulm 64

COS Transactions: merger of OLTP and distributed objects. Concurrency Control: management of concurrent execution in distributed environment. Security: framework for many underlying security technologies. Properties: assign properties to objects. Query: common query interface to objects. Licensing: license management. Trading: trading of different object references by attributes March 10, 2006 Frank Kargl, CCC Ulm 65

Evaluation Learning curve Interoperability Portability Feature Limitations Performance March 10, 2006 Frank Kargl, CCC Ulm 66

Learning Curve CORBA introduces the following: New concepts (e.g. IOR, stubs, object adapters) New components and tools (e.g. IDL compiler, ORB, implementation rep.) New features (e.g. exception handling, inheritance) Time spent learning this must be amortized over many projects March 10, 2006 Frank Kargl, CCC Ulm 67

Interoperability CORBA 1 was woefully incomplete with respect to interoperability CORBA 2.x defines a useful interoperability specification later extensions deal with portability issues for server-side (i.e. the POA spec) Most ORB implementations now support IIOP or GIOP robustly but not all higher services are interoperable March 10, 2006 Frank Kargl, CCC Ulm 68

Portability To improve portability, the latest CORBA specification standardizes IDL language mappings (e.g. C, C++, Java) Naming service, event service, lifecycle service ORB initialization service Portable Object Adapter API Servant mapping Porting applications from ORB-to-ORB will be limited, however, until conformance tests become common-place http://www.opengroup.org/testing/testsuites/vsorb.htm March 10, 2006 Frank Kargl, CCC Ulm 69

Feature Limitations Standard CORBA doesn t yet address key inherent complexities of distributed computing, e.g. latency fault tolerance (RPF is underway on this) causal ordering deadlock March 10, 2006 Frank Kargl, CCC Ulm 70

Feature Limitations Most ORBs do not support passing objects by value Solution with CORBA 2.3/3.0 Most ORBs still support only the following semantics: ORs are passed by reference structs and unions are passed by value objects by value must be hand-crafted using factories March 10, 2006 Frank Kargl, CCC Ulm 71

Feature Limitations Most ORBs do not yet support asynchronous method invocation or timeouts Versioning is supported in IDL via pragmas not language inherent like in ONC RPC or DCOM March 10, 2006 Frank Kargl, CCC Ulm 72

Performance Limitations Performance may not be as good as handcrafted code for some applications due to additional remote invocations for naming marshaling/demarshaling overhead data copying and memory management endpoint and request demultiplexing context switching and synchronization overhead Trade off between performance and extensibility, robustness, maintainablility March 10, 2006 Frank Kargl, CCC Ulm 73

For Your Developers Much more than Client-Server CORBA provides a sophisticated base CORBA Services provide necessary OO foundation CORBA Facilities will standardize building blocks Developers create or assemble Application Objects Object Services and and Common Facilities accessed via via standard OMG OMG IDL IDL Interfaces Develop Clients and and Servers Independently using the the Best Best Tools for for Each Each Task Task March 10, 2006 Frank Kargl, CCC Ulm 74

For Your Users Purchase Server Objects from Multiple Vendors and Integrate Under One or More Client Applications Seamlessly Integrate In-House and Purchased Objects Acquire & Maintain a Single Set of Business Objects Accessed by the Entire Enterprise Each Division Accesses These Common Objects Using a GUI Built for its Own Needs APPLICATION: A Set Set of of Clients and and Servers Activated and and Connected at at Run Time to to Attack the the Problem at at Hand March 10, 2006 Frank Kargl, CCC Ulm 75

CORBA Implementations Many ORBs available Orbix from IONA Visibroker from Inprise BEA Web Logic Enterprise Component Broker from IBM CORBAplus from Expertsoft ORB Express Open Source ORBs (TAO, ORBacus, omniorb, MICO,...) In theory CORBA facilitates vendor-and platform independent application collaboration In practice interoperability and portability still an issue March 10, 2006 Frank Kargl, CCC Ulm 76

CORBA 3 Improved Java and Internet Integration Java-to-IDL reverse mapping Firewall specification CORBA Object URLs Quality of Service Control Asynchronous Invocation/Messaging Invocation QoS Control Realtime, Minimum, Fault Tolerance CORBA Component Model Objects passed by value Component Container Transactional, Persistent, Secure Distribution Format Scripting Language Specification March 10, 2006 Frank Kargl, CCC Ulm 77

Summary of CORBA Features Object Request Broker (ORB) Interface Definition Language (IDL) Language Mappings (C, C++, COBOL, Java) Static and Dynamic Invocation Interfaces Static and Dynamic Skeleton Interfaces Interface and Implementation Repositories Basic and Portable Object Adapter CORBA Services March 10, 2006 Frank Kargl, CCC Ulm 78

More Information www.omg.org March 10, 2006 Frank Kargl, CCC Ulm 79