1 / 25

Objektorienteret Middleware (OOMI)

Objektorienteret Middleware (OOMI). CORBA Introduction. Outline. CORBA (part one) Introduction & Background Architecture Session & Presentation layer GIOP / IIOP / CDR CORBA Interface Definition Language – IDL Language mappings CORBA development steps. Who is the OMG?.

ezra
Télécharger la présentation

Objektorienteret Middleware (OOMI)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Objektorienteret Middleware (OOMI) CORBA Introduction

  2. Outline • CORBA (part one) • Introduction & Background • Architecture • Session & Presentation layer • GIOP / IIOP / CDR • CORBA Interface Definition Language – IDL • Language mappings • CORBA development steps

  3. Who is the OMG? • OMG: Object Management Group • http://www.omg.org • Non-profit organization in the US, representatives in United Kingdom, Germany, Japan, India, and Australia • Founded April 1989 • More than 800 members • Dedicated to creating and popularizing object-oriented industry standards for application integration, e.g. • CORBA 1.0 (1995) –> CORBA 3.0 • UML 1.1 nov. 97. -> 1.5 (2004)

  4. Goal of CORBA • CORBA: Common Object Request Broker Architecture • Support distributed and heterogeneous object request in a way transparent to users and application programmers • Facilitate the integration of new components with legacy components • Open standard that can be used free of charge • Based on wide industry consensus • But not much Microsoft support • Problem with CORBA • Considered too complex by many

  5. The specifications • CORBA is a collection of specifications • http://www.omg.org/technology/documents/corba_spec_catalog.htm • Common Object Request Broker Architecture (CORBA/IIOP) (3.0.2) • CORBA Component Model (3.0) • Minimum CORBA (1.0) • Real-Time CORBA (Dynamic Scheduling) (2.0) • Real-Time CORBA (Static Scheduling) (1.1) • Many others • Realted to UML • UML Profile for CORBA (1.0)

  6. Object Management Architecture (OMA) CORBAFacilities DomainInterfaces ApplicationObjects Object Request Broker CORBA Services(mandatory)

  7. CORBA Architecture1 • There are many different vendors and ORB types • Many of who do not interoperate • Must check specification • OrbBacus from IONA produces both C++ and Java • Sun J2SE SDK has only Java-based ORB • C++ ORB from IONA will work with SUN ORB as specified • Many others • MicoORB, Middcor, TAO, openORB, VisiBroker

  8. Object Implementation Client Implementation Skeletons Object Adapter Dynamic Invocation ORB Interface Client Stubs ORB Core One standardised interface One interface per object operation One interface per object adapter ORB-dependent interface CORBA Architecture 2

  9. Interoperability Protocols Applications EnvironmentSpecific .. CORBA 2.0 ESIOP GIOP ........ ........ IIOP DOETalk DCE-CIOP Mandatory: provides "out of the box" interoperability

  10. General Inter-ORB Protocol (GIOP) • Handles the session & presentation layer • Defines seven message primitives: • Request, Reply, Locate Request, Locate Reply, Cancel request, Close Connection, Message Error • More simple than JRMP for Java RMI • Internet Inter-ORB Protocol (IIOP) • Maps GIOP to TCP/IP • Provides operations to open and close TCP/IP connections • Is required from ORBs for CORBA compliance • But intra vendor ORB com is not restricted to this

  11. Common Data Representation (CDR) • Defined as part of GIOP • Presentation layer implementation to support heterogeneity • Mapping of IDL data types to transport byte stream • Encodings of • primitive types • constructed types • interoperable object references

  12. Recap - motivation for an IDL • IDL: Interface Definition Language • Components of distributed systems are written in different programming languages • Programming languages may or may not have their own object model • Object models largely vary • Differences need to be overcome in order to facilitate integration

  13. “Object Wrappingof nonOO application” CORBA C++ Client App.3 CORBAC# Client App.2 CORBA Java Client App.1 Heterogeneous OO Network CORBA CobolDatabase Server TCP/IPNetwork DB Different ORB’s from different vendors, on different operating systems – and written in different languages = Heterogenity

  14. PL PL 1 2 PL IDL PL 6 3 PL PL 5 4 Why do we use an IDL? PL PL 1 2 Avoid multiple mappings PL PL 6 3 PL PL 5 4

  15. Smalltalk C++ Ada-95 Java C .NET Cobol CORBA Programming Language Bindings IDL Common Object Model Janeva / Middcor (C#)

  16. Interface Definition Language (IDL) • Language for expressing all concepts of the middleware’s object model • Should be • programming-language independent • not computationally complete • Bindings to different programming languages are needed • language bindings are specified by CORBA

  17. Organization #name:string uses Trainer 1 1..* Club -name:string works for -noOfMembers:int -location:Address +train() +transfer(p:Player) 1 1..* has coaches 1..* * Team plays in -name:string 1 11..16 +bookGoalies() Example UML to IDL mapping Player -name:string -Number:int +book()

  18. Constructed types Atomic types Object type CORBA Object Model: Types typedef struct Address { string street; string postcode; string city; }; typedef sequence<Address> AddressList; interface Team { ... };

  19. CORBA Object Model: Modules Soccer::Address module Soccer { typedef struct Address { string street; string postcode; string city; }; }; module People { typedef struct Address { string flat_number; string street; string postcode; string city; string country; }; }; Modules = namespaces People::Address

  20. Clients cannot change value changeable Attribute type Attribute name CORBA Object Model: Attributes interface Player; typedef sequence<Player> PlayerList; interface Trainer; typedef sequence<Trainer> TrainerList; interface Team { readonly attribute string name; attribute TrainerList coached_by; attribute Club belongs_to; attribute PlayerList players; ... };

  21. Parameter list Parameter kind Return types Parameter type Parameter name Operation name used in requests CORBA Object Model: Operations interface Team { ... void bookGoalies(in Date d); string print(); };

  22. Exception data Exception name Operations declare exceptions they raise CORBA Object Model: Exceptions • Generic Exceptions (e.g. network down, invalid object reference, out of memory) • Type-specific Exceptions exceptionPlayerBooked{sequence<Date> free;}; interface Team { void bookGoalies(in Date d) raises(PlayerBooked); };

  23. Implicit supertype: Object Inherited by Club Supertype CORBA Object Model: Subtypes interface Organization { readonly attribute string name; }; interface Club : Organization { exceptionNotInClub{}; readonly attribute short noOfMembers; readonly attribute Address location; attribute TeamList teams; attribute TrainerList trainers; void transfer(in Player p) raisesNotInClub; };

  24. Server Stub Generation Client Stub Generation Server Coding Client Coding Development Steps – CORBA vs RMI & SOAP CORBA AXISSOAP Design J2SE JDK CORBA: IDL Java2WSDL Interface Definition SOAP: WSDL Start with Server Interface Coding: JAVA RMI: JAVA interface WSDL2JAVA CORBA: IDL RMI: rmic RMI: JAVA C++, Java … C++, Java … ORB rmiregistry Server Registration

  25. Team.idl Client.cc Server.cc IDL-Compiler Teamcl.hh Teamsv.hh Teamcl.cc Teamsv.cc C++ Compiler, Linker C++ Compiler, Linker included in generates reads Client Server CORBA Client and Server Implementation

More Related