Download presentation
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
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 (2006) UML 1.1 nov > 2.1 (2006)
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
Common Object Request Broker Architecture (CORBA/IIOP) (3.0.3) CORBA Component Model (3.0) Light Weight CCM CORBA/e (replaces Minimum CORBA) Minimum CORBA (1.0) Real-Time CORBA (Dynamic Scheduling) (2.0) Real-Time CORBA (Static Scheduling) (1.1) Families of specifications: CORBAservices Specifications CORBAfacilities Specifications OMG Domain Specifications IDL / Language Mapping Specifications Many others Realted to UML UML Profile for CORBA (1.0)
6
Object Management Architecture (OMA)
Application Objects Domain Interfaces CORBA Facilities Object Request Broker CORBA Services (mandatory)
7
CORBA Architecture1 Many different vendors and ORB types
Many of which 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
CORBA Architecture 2 Client Object Implementation ORB Core
Dynamic Invocation Client Stubs ORB Interface Implementation Skeletons Object Adapter One standardised interface One interface per object operation ORB-dependent interface One interface per object adapter
9
Interoperability Protocols
Applications Environment Specific .. CORBA 2.0 GIOP ESIOP IIOP DOETalk DCE-CIOP Mandatory: provides "out of the box" interoperability IIOP: Internet Inter-ORB Protocol is the primary CORBA transport protocol
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 More on the IIOP later in the course
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
Heterogeneous OO Network
“Object Wrapping of non OO application” CORBA Java Client App.1 CORBA Cobol Database Server CORBA C# Client App.2 TCP/IP Network CORBA C++ Client App.3 DB Different ORB’s from different vendors, on different operating systems – and written in different languages = Heterogenity
14
Avoid multiple mappings
CORBA IDL & Mappings PL 6 2 5 1 4 3 IDL PL PL 1 2 Avoid multiple mappings PL PL 6 3 PL PL 5 4
15
CORBA Programming Language Bindings
Smalltalk C++ Ada-95 IDL Common Object Model C Java .NET Cobol 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 The IDL is very comprehensive – please read and experiment with it
17
Example UML to IDL mapping
Organization #name:string uses +transfer(p:Player) Club -noOfMembers:int -location:Address has 1 * coaches 1..* Trainer -name:string 1 +train() works for Player Team -name:string +bookGoalies() plays in 1 11..16 -name:string -Number:int +book()
18
CORBA Object Model: Types
typedef struct Address { string street; string postcode; string city; }; typedef sequence<Address> AddressList; interface Team { ... }; Constructed types Atomic types Object type
19
CORBA Object Model: Modules
Soccer::Address module Soccer { typedef struct Address { string street; string postcode; string city; }; module People { string flat_number; string country; Modules = namespaces People::Address
20
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; ... }; Clients cannot change value changeable Attribute type Attribute name
21
CORBA Object Model: Operations
Parameter kind interface Team { ... void bookGoalies(in Date d); string print(); }; Parameter list Return types Parameter type Parameter name Operation name used in requests
22
CORBA Object Model: Exceptions
Generic Exceptions (e.g. network down, invalid object reference, out of memory) Type-specific Exceptions Exception name Exception data exception PlayerBooked{sequence<Date> free;}; interface Team { void bookGoalies(in Date d) raises(PlayerBooked); }; Operations declare exceptions they raise
23
CORBA Object Model: Subtypes
Implicit supertype: Object Inherited by Club interface Organization { readonly attribute string name; }; interface Club : Organization { exception NotInClub{}; readonly attribute short noOfMembers; readonly attribute Address location; attribute TeamList teams; attribute TrainerList trainers; void transfer(in Player p) raises NotInClub; Supertype This has only been a minimal presentation of the IDL
24
Legal Values in CORBA (Types)
25
Development Steps – CORBA vs RMI & SOAP
AXIS SOAP Design J2SE JDK CORBA: IDL Java2WSDL Interface Definition SOAP: WSDL Start with Server Interface Coding: JAVA RMI: JAVA interface WSDL2JAVA Server Stub Generation Client Stub CORBA: IDL RMI: rmic RMI: JAVA C++, Java … Server Coding Client C++, Java … ORB rmiregistry Server Registration
26
CORBA Client and Server Implementation
Team.idl included in generates reads IDL-Compiler Teamcl.hh Teamcl.cc Teamsv.cc Teamsv.hh Client.cc Server.cc C++ Compiler, Linker Server C++ Compiler, Linker Client Next we will look into a simple CORBA programming example
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.