1
Early Distributed Computing
2
What is CORBA?
3
Distributed Object-based Systems
Goal: transparently access remote objects in a distributed
system
Challenges:
- Ensure semantics of invoking a local object
- Accommodate heterogeneity, e.g., multiple languages, OSes, …
Client Server
Object Object
Middleware 4
Two Examples
5
CORBA
CORBA is similar in high level concepts to RMI
RMI is basically a simplified form of CORBA
It Adds:
Cross-platform
Multiple language interfaces
Widely used standard
Allows programs written in various languages to communicate
with each other as would two processes in the same address space.
Features leveraged by clients:
- Invocation transparency
- Implementation transparency
- Location transparency
6
CORBA Architecture
Remote-object: object implementation resides in server’s
address space
Client Server
Java Object
C++ Object
Skeleton
Client Server
Java Object
C++ Object
Skeleton
8
Skeleton
Provides iterface between server object and ORB
Unmarshaling: client invocation
Marshaling: server response
Client Server
Java Object
C++ Object
Skeleton
9
Object Adapters
10
Object Adapters
12
Basic Object Adapter (BOA)
• BOA.impl_is_ready();
Tells the BOA/ORB to begin listening for requests
Underspecified
- Initially unclear which features would be required on various
platforms
13
Portable Object Adapter (POA)
Replaces BOA
- Most commercial implementations still use BOA
Expanded scope of OA to include
- Activation policies
- Threading models
- Object life cycle (transient/persistent)
- Pre/post invocation capabilities
14
(Portable) Object Adapter (POA)
Register class implementations
Creates and destroys objects
Handles method invocation
Handles client authentication and access control
Client Server
Java Object
C++ Object
Skeleton
15
What is an ORB?
16
Object Request Broker (ORB)
ORB
17
Object Request Broker (ORB)
Request
ORB
18
ORB Usage
ORB is a singleton
ORB initialization
- Single static call to init() an ORB
- Afterorg.omg.CORBA.ORB
initialization, you register
orb = objects
org.omg.CORBA.ORB.init();
with the ORB using an Object Adapter
19
Proxy-based Invocation
Request
Request
Stub Skeleton
Request
ORB
20
ORB Abstraction
Client
Java
Java
? C++ Object Implementation
C++
IDL IDL
ORB
21
Object Request Broker ...
Communication infrastructure sending messages between
objects
Communication type:
- GIOP (General Inter-ORB Protocol)
- IIOP (Internet Inter-ORB Protocol) (GIOP on TCP/IP)
Client Server
Java Object
C++ Object
Skeleton
22
ORB and IIOP
23
Internet Inter ORB Protocol (IIOP)
Transport protocol
- Defines inter ORB communication
- Runs on top of TCP/IP
- Defines CORBA messages
IIOP is a specification
- Vendors must implement to be “CORBA-compliant”
- Allows for multi-vendor interoperability
24
CORBA Object
Server
CORBA
Interoperable Object Reference
Object
Interface C++/Java
IDL Implementation Servant
25
Interoperable Object Reference (IOR)
Server
CORBA
Interoperable Object Reference
Object
Interface C++/Java
IDL Implementation Servant
26
Interface Definition Language (IDL)
Describes interface
Language independent
Client and server platform independent
Server
CORBA
Interoperable Object Reference
Object
Interface C++/Java
IDL Implementation Servant
27
IDL (cont…)
28
29
30
Overall CORBA Architecture
Implementation Interface
repository repository Server
Client
Interface
Interface repository
repository
interface
interface repository
repository provides
provides information
information about
about registered
registered IDL
IDL interfaces
interfaces to
to clients
clients
and
and servers
servers that
that require
require it.
it.
Skeleton
Stub
Implementation
Implementation repository
repository Object Adapter
activates
activates registered
IIOPon demand
registered servers
servers on demand and
and locates
locates running
running servers
servers
ORB
uses
uses the
the object
object adapter
adapter name
name to
to register
ORB
register and
and activate
activate servers
servers
31
Development Steps
1 IDL
4 3
idltojava
Client Application Object Implementation
Stub 2 2 Skeleton
request
ORB ORB
response
steps:
1 write the IDL file
2 compile with idltojava (stubs/skeleton generated automatically)
3 write object implementation (servant)
4 write client application
32
Example of CORBA Services
33
CORBAservices are the baseline services available to all
objects sitting on the ORB communication bus.
34
Corba Services
Service Description
Collection Facilities for grouping objects into lists, queue, sets, etc.
Query Facilities for querying collections of objects in a declarative manner
Concurrency Facilities to allow concurrent access to shared objects
Transaction Flat and nested transactions on method calls over multiple objects
Event Facilities for asynchronous communication through events
Notification Advanced facilities for event-based asynchronous communication
Externalization Facilities for marshaling and unmarshaling of objects
Life cycle Facilities for creation, deletion, copying, and moving of objects
Licensing Facilities for attaching a license to an object
Naming Facilities for systemwide name of objects
Property Facilities for associating (attribute, value) pairs with objects
Trading Facilities to publish and find the services on object has to offer
Persistence Facilities for persistently storing objects
Relationship Facilities for expressing relationships between objects
Security Mechanisms for secure channels, authorization, and auditing
Time Provides the current time within specified error margins
35
RMI Deployment
Interface Implementation
Definition Installation
Stubs Skeletons
36
CORBA Deployment
Interface Implementation
Stubs Skeletons
Repository Repository
37
38
CORBA Features
Language independence
Location transparency
Reuse of facilities & services
OMG IDL defined interfaces
Stub & Skeleton generation
Server activation
39
Technical/Architectural Overview
40
Technical/Architectural Overview
(cont.)
41
Technical/Architectural Overview
(cont.)
7. Transportation
8. Life Science Research
9. Utilities
10. C4I (Command, Control, Communications, Computers, and
Intelligence)
11. Space
42
Technical/Architectural Overview
(cont.)
O b je c t Re q u e st Bro ke r
Ob je c t Se rv ic e s
G e n e ra l se rvic e in te rfa c e s
43
CORBA Basics
IDL J a va
module package
interface interface
struct class
const public static final
boolean boolean
char char
wchar wchar
octet octet
string java.lang.String
wstring java.lang.String
short short
unsigned short short
long int
unsigned long int
long long long
unsigned long long long
float float
double double
fixed (not supported in idlj) java.math.BigDecimal
sequence [] (array)
[] (array) [] (array)
Fig . 26.9 IDL ke yw o rd s, typ e s a n d th e ir m a p p in g s to J a va ke yw o rd s.
44
Static Invocation Interface (SII), Dynamic Invocation
Interface (DII) and Dynamic Skeleton Interface (DSI)
45
Static Invocation Interface (SII), Dynamic Invocation
Interface (DII) and Dynamic Skeleton Interface (DSI)
(cont.)
47
BOAs, POAs (cont’d)
48
BOAs, POAs (cont.)
49
BOAs, POAs (cont.)
POA policies:
- ImplicitObjectActivation,
• tells POA outside object created servant and activated it
- IDAssignmentPolicy, and
• determines who is responsible for assigning a unique ID to a
given servant
- RequestProcessingPolicy.
• uses object id either to find matching servant or invoke default
service that uses object id to perform lookup in database
Policy combinations provide POAs with fine-grained control
over one or many servants.
50
BOAs, POAs and TIEs (cont.)
51
CORBA services
52
Naming Service
53
Security Service
54
Security Service (cont.)
- Level 2
• is everything level 1 provides in addition to:
1. more fine-grained user authentication
2. greater invocation security
3. auditing
4. finer control over secure invocations
5. delegation
6. administrators can set security policies
7. discovery of security policies by security-aware applications
8. discovery of security policies by ORBs and other services
55
Object Transaction Service
56
Object Transaction Service (cont.)
57
Object Transaction Service (cont.)
58
Persistent State Service
59
Persistent State Service (cont.)
60
Event and Notification Services
61
Event and Notification Services
(cont.)
62