Title: Objektorienteret Netv
1Objektorienteret Netværkskommunikation (ITONK1)
2Outline
- CORBA (part one)
- Introduction Background
- Architecture
- Session Presentation layer
- GIOP / IIOP / CDR
- CORBA Interface Definition Language IDL
- Language mappings
- CORBA development steps
3Who is the OMG?
- OMG Object Management Group
- http//www.omg.org
- Non-profit organization
- 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) gt CORBA 3.0
- UML 1.1 nov. 97. -gt 1.5 (2004)
4Goal 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
5The 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)
6Object Management Architecture (OMA)
CORBAFacilities
DomainInterfaces
ApplicationObjects
Object Request Broker
CORBA Services(mandatory)
7CORBA Architecture1
- There are 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
8CORBA Architecture 2
9Interoperability Protocols
Applications
EnvironmentSpecific ..
CORBA 2.0
ESIOP
GIOP
........
........
IIOP
DOETalk
DCE-CIOP
Mandatory provides "out of the box"
interoperability
10General 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
11Common 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
12Recap - 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
13Heterogeneous OO Network
CORBA CobolDatabase Server
TCP/IPNetwork
DB
Different ORBs from different vendors, on
different operating systems and written in
different languages Heterogenity
14CORBA Programming Language Bindings
IDL
Common Object Model
Janeva / Middcor (C)
15Interface Definition Language (IDL)
- Language for expressing all concepts of the
middlewares object model - Should be
- programming-language independent
- not computationally complete
- Bindings to different programming languages are
needed - language bindings are specified by CORBA
16Example UML to IDL mapping
Player
-namestring -Numberint
book()
17CORBA Object Model Types
- typedef struct Address
- string street
- string postcode
- string city
-
- typedef sequenceltAddressgt AddressList
- interface Team ...
18CORBA Object Model Modules
SoccerAddress
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
PeopleAddress
19CORBA Object Model Attributes
interface Player typedef sequenceltPlayergt
PlayerList interface Trainer typedef
sequenceltTrainergt TrainerList interface Team
readonly attribute string name attribute
TrainerList coached_by attribute Club
belongs_to attribute PlayerList players
...
20CORBA Object Model Operations
- interface Team
- ...
- void bookGoalies(in Date d)
- string print()
-
21CORBA Object Model Exceptions
- Generic Exceptions (e.g. network down, invalid
object reference, out of memory) - Type-specific Exceptions
exception PlayerBookedsequenceltDategt free
interface Team void bookGoalies(in Date d)
raises(PlayerBooked)
22CORBA Object Model Subtypes
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
23Development 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
24CORBA Client and Server Implementation