CORBA Overview - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

CORBA Overview

Description:

CIS 6611 April 5, 1999. Hoff Presentation. 5. The Inter-operability Problem ... CIS 6611 April 5, 1999. Hoff Presentation. 6. Motivation for COTS Middle-ware ... – PowerPoint PPT presentation

Number of Views:31
Avg rating:3.0/5.0
Slides: 46
Provided by: joeh93
Category:
Tags: corba | cis | overview

less

Transcript and Presenter's Notes

Title: CORBA Overview


1
CORBA Overview
  • CIS 6611
  • Joe Hoff
  • April 5 1999

2
CORBA Overview
  • Introduction to CORBA
  • Presentation of Open Research Issues in Object
    Services Architectures (OSAs)

3
Introduction to CORBA
  • The inter-operability problem
  • Motivation for COTS Middle-ware
  • Available Solutions
  • CORBA architecture
  • CORBA Services
  • CORBA Facilities
  • Examples

4
The Inter-operability Problem
5
The Inter-operability Problem
  • Proven solutions
  • Components
  • Self-contained, pluggable ADTs
  • Frameworks
  • Reusable, semi-complete applications
  • Patterns
  • Problem/Solution/Context
  • Architecture
  • Families of Related Patterns (Models, ADLs etc.)

6
Motivation for COTS Middle-ware
  • It is hard to develop distributed applications
    whose components collaborate
  • efficiently
  • reliably
  • transparently
  • scalably

7
Available Solutions
  • Domain Specific Examples
  • SQL, ODBC, Oracle Glue
  • Groupware Middleware
  • Microsoft Exchange,Lotus notes
  • Internet Middleware
  • HTTP, SSL
  • Object Middleware
  • Java RMI,JavaBeans,Enterprise Java Beans
    (EJB),DCOM, CORBA

8
Comparison of Object Middleware
  • Outside the scope of this paper.
  • http//www.execpc.com/gopalan/misc/compare.html

9
What is CORBA?
  • Common Object Request Broker Architecture
  • Object Management Group Reference architecture
    for distributed applications middleware.
  • What is CORBA -- http//www.omg.org/corba/whatisc
    orba.html

10
Motivation for CORBA
  • Simplifies application interworking
  • CORBA provides higher level integration than
    traditional untyped TCP bytestreams
  • Provides a foundation for higher-level
    distributed object collaboration
  • e.g. Windows OLE and the OMG Common Object
    Service Specification (COSS)
  • OO-like benefits

11
CORBA Architecture
IDL - Interface Definition Language DII - Dynamic
Invokation Interface DSI - Dynamic Skeleton
Interface
Interface Repository
IDL Compiler
Implementation Repository
Client
Server
control
control
DSI
IDL skeleton
IDL stubs
DII
ORB Interface
ORB Interface
Basic Object Adapter
Object Request Broker
Object Request Broker
Server Node
Network
Client Node
12
CORBA Architecture
Object Request Broker
13
CORBAServices
  • Naming Service
  • Event Service
  • Security Service
  • Trading Service

14
CORBAServices
  • Concurrency
  • Property
  • Transaction
  • Relationship
  • Query Service

15
CORBAServices
  • Persistent Object
  • Externalization

16
CORBAServices
  • Life-cycle
  • Licensing
  • Time

17
CORBA Architecture
Object Request Broker
18
Communication Features of CORBA
  • Supports reliable uni-cast communication
  • oneway, twoway, deferred synchronous and
    (shortly) asynchronous
  • CORBA objects can also collaborate in a
    client/server, peer-to-peer, or publish/subscribe
    manner

19
Fundamental CORBA Design Principles
  • Separation of interface and implementation
  • Clients depend on interfaces, not implementations
  • Location transparency
  • Service use is orthogonal to service location
  • Access transparency
  • Invoke operations on objects
  • Typed interfaces
  • Support of multiple inheritance of interfaces

20
CORBA Example
  • PROBLEM
  • A client/server application where the server
    represents a ticket agency handling ticket
    reservations and pricing for various stage
    productions at a particular theatre facility.

client
client
client
client
client
21
CORBA Example
  • PROBLEM
  • A client/server application where the server
    represents a ticket agency handling ticket
    reservations and pricing for various stage
    productions at a particular facility


22
CORBA Example -- Programming Steps
  • Define the IDL interfaces
  • Implement these interfaces with target language
    classes (I.e. C or Java)
  • Write a server main function, which creates
    instances of the classes and then informs the ORB
    which initialization has been done and the server
    is ready to accept requests
  • Register the server
  • Write a client main function to find an use the
    servers objects.

23
CORBA Example -- Define the IDL interface
  • typedef float Price
  • struct Place
  • char row
  • unsigned long seat
  • typedef sequenceltPlacegt Places
  • typedef string Date // in DD.MM.YYYY format
  • struct CreditCard
  • string id
  • Date expiry

24
CORBA Example -- Define the IDL interface
  • interface Booking
  • readonly attribute Date when
  • readonly attribute Places seats
  • void cancel()
  • interface GroupBooking Booking
  • readonly attribute string organizer
  • readonly attribute string groupName
  • interface FrontOffice
  • exception NoSuchPlace Place where
  • exception PlaceAlreadyBooked Place whereDate
    when
  • exception InvalidCreditCard CreditCard
    invalidCard
  • exception InvalidDate Date when
  • exception GroupTooSmall unsigned long
    chosenSizeunsigned long minimumSize

25
CORBA Example -- Define the IDL interface
  • // from interface FrontOffice
  • // Name of the cinema
  • readonly attribute string name
  • // The next 2 attrs give the size of the cinema
  • readonly attribute char lastRow
  • readonly attribute unsigned long seatsPerRow
  • boolean checkIfOpen (in Date when,out Date
    nextAvailable) raises (InvalidDate)
  • Places listAvailablePlaces (in Date when) raises
    (InvalidDate)
  • Booking makeBooking(in Places chosenPlaces,in
    Date when,in CreditCard payment)
  • raises (NoSuchPlace,PlaceAlreadyBooked,InvalidCre
    ditCard,InvalidDate)
  • GroupBooking makeGroupBooking(in Places
    chosenPlaces, in Date when,
  • in CreditCard payment, in string organizer,
  • in string groupName)
  • raises(NoSuchPlace,PlaceAlreadyBooked,InvalidCred
    itCard,InvalidDate,
  • GroupTooSmall)

26
CORBA Example -- Compile IDL
front.hh
IDL Compiler
front.idl
frontC.hh
frontH.hh
idl -B front.idl
27
CORBA Example -- Generated Code
// front.hh include ltCORBA.hgt class Booking
public virtual CORBAObject public //
Various details for Orbix. // IDL
attributes virtual Date when () throw
(CORBASystemException) virtual Places
seats() throw (CORBASystemException) virtual
void cancel() throw (CORBASystemException)
28
CORBA Example -- Generated Code
Class FrontOffice public virtual CORBAObject
public // Various details for Orbix // IDL
attributes virtual char name() throw
(CORBASystemException) virtual CORBAChar
lastRow() throw (CORBASystemException) virtual
CORBAUlong seatsPerRow() throw
(CORBASystemException) virtual
CORBABoolean checkIfOpen(const char when,
Date nextAvailableDate) throw(CORBASystemExce
ption, FrontOfficeInvalidDate) virtual
Places listAvailablePlaces (const char when)
throw (CORBASystemException,FrontOfficeInva
lidDate) //etc.
29
CORBA Example -- Implement Client
include ltNaming.hhgt main(int argc,char
argv) CosNamingNamingContext_var
initContext CosNamingName_var
name FrontOffice_var cinemaVar CORBAObject_v
ar objVar try objVar CORBAOrbix.resolve_
initial_references(NameService) initContext
CosNamingNamingContext_narrow(objVar) na
me new CosNamingName(3) name-gtlength(2)
name0.id CORBAstring_dup(tourism) name
0.kind CORBAstring_dup() name1.id
CORBAstring_dup(cinemas) name1.kind
CORBAstring_dup()
30
CORBA Example -- Name Services
tourism
Savoy
Royal
Screen
31
CORBA Example -- Implement Client
objVar initContext-gtresolve(name) if
(!CORBAis_nil(cinema_var)) cinema_var
FrontOffice._narrow(objVar) CORBAString_var
cinemaName hotelVar-gtname() coutltltcinemaNamelt
lt is name of cinema.ltltendl // else deal
with failure to _narrow // other catch clauses
32
Dynamic Invocation Interface
  • Obtain object reference
  • Construct request object
  • Populate request with object reference, the name
    of the operation/attribute and parameters
  • Invoke the request
  • Obtain the results.

33
CORBA Example -- DII Version
objVar initContext-gtresolve(name) if
(!CORBAis_nil(cinema_var)) cinema_var
FrontOffice._narrow(objVar) CORBAString_var
cinemaName hotelVar-gtname() coutltltcinemaNamelt
lt is name of cinema.ltltendl // else deal
with failure to _narrow // other catch
clauses CORBARequest_var
request cinema_var-gtrequest(name) request-gt
add_in_arg() ltlt some arg request-gtset_return_
type (CORBA_tc_string) request-gtinvoke() COR
BAString value if (request-gtreturn_value()
gtgt value) coutltltvalueltlt is name of
cinema.ltltendl
34
CORBA Example -- Writing the Server
  • Two Approaches
  • Base Object Adapter
  • TIE

Booking C class Used by Clients
IDL Compiler
BookingBOAImpl C class Used as a
base class by the implementer of the interface
oldBooking Existing C Class
Booking_i C class Used as a
base class by the implementer of the interface
35
CORBA Example -- Writing the Server
// BOAImpl approach main() int try
FrontOffice_var foVar new
FrontOffice_I(Savoy,H,12,5,E,3,5,10) //W
ait for incoming requests. CORBAimpl_is_ready(
) // initialization of the ORB catch
(CORBASystemException se)
36
CORBA Example -- Writing the Server
// TIE approach main() int try
FrontOffice_i p new FrontOffice_i
(Savoy,H,12,5,E,3,5,10) FrontOffice_var
foVar new TIE_FrontOffice(FrontOffice_i)
(p) //Wait for incoming requests. CORBAimp
l_is_ready() // initialization of the
ORB catch (CORBASystemException se)
37
Register the Server
putit ltserverNamegt ltfullPathNamegt
command-line-args for server putit
FrontOfficeSrv /usr/users/joe/FrontOfficeExec
38
Activation Modes
  • Shared
  • Unshared
  • Per-method-call

39
Shared Activation Mode
40
Shared Activation Mode (II)
41
Shared Activation Mode (III)
42
Unshared Activation Mode (I)
43
Unshared Activation Mode (II)
44
Unshared Activation Mode (III)
45
Per-method-call Activation
Will execute getPrice()
Savoy
Client 1
a-gtgetPrice() a-gtmakeBooking()
Will execute makeBooking()
Savoy
Client 2
a-gtgetPrice()
Will execute getPrice()
Savoy
Write a Comment
User Comments (0)
About PowerShow.com