Object Management Architecture
Object Management Architecture
edu/~muccini/ics123
ICS 123 (Fall 2002)
2/35 5/35
1
Object Management Architecture (OMA) Object Model and Interface Definition
Application Interfaces Domain Interfaces Common Facilities Objects
Types
Modules
Attributes
Object Request Broker (ORB)
Operations
Requests
Exceptions
Subtypes
CORBAServices
CORBAServices: Object location, object creation and mobility, concurrent access control,
7/35 10/35
distributed transaction controller, …
8/35 11/35
9/35 12/35
2
CORBA Object Model: Types Operations (in CORBA IDL)
Syntax:
<return type><operation name>(<parameter>, <>, …)
typedef struct _Address { <parameter> = <parameter kind><parameter type><parameter name>
3
Summarizing: IDL CORBA: Normal and Exception Behavior
Client NORMAL EXCEPTION
module Bank {
Modules interface Account {
Interfaces float balance(); Client requests ORB forwards
ORB propagates
Attributes };
an operation on result to
exception to
an object
client
Types interface AccountManager {
client
Constants
exception CantOpen {};
ORB
Operations
Account open(in string name)
Exceptions
raises (CantOpen); ORB locates
Object
Object raises
produces
exception
}; object and operation
forwards request result
};
Object
19/35 22/35
Compilation according to
ORB Core language-specific
mapping
Implementation
Client Stub, implementation skeleton and Dynamic level
Invocation interface are responsible for marshalling Client Object Implementation
and unmarshalling Stub Skeleton
ORB
Stub and skeleton are generated from the IDL using
an IDL compiler Client Implementation facilitatedrequest
Client
by ORB Object Implementation
Presentation Layer
-Common data representation
20/35 23/35
-Marshalling and Unmarshalling
Session Layer
Architecture
-Object activation
-Object Binding
ORB Core
4
Comparison Roadmap
Object Model: Architecture: F ea t ur e C O M /D C O M C O R B A /II O P
Exceptions …
No Visual Basic
Multiple Transports TCP IP, IP, IPX, SPX, HTTP, TCP only
many others
25/35 28/35
CORBA and COM: The Object Model Java RMI and CORBA - COM
RMI:
Differences:
Differences: Requires objects to be programmed in Java
INTERFACES: The inheritance root in CORBA is the interface “Object”
. COM has “IUnknown” as root interface. Objects are platform independent
TYPES: CORBA supports more type’s construction mechanisms: The IDL is in Java
COM: records and arrays
CORBA: sequence, struct, array and union extend the java.rmi.Remote class
REQUESTS:
REQUESTS: COM operations return a 32-bit integer, while CORBA can any method that can be remotely invoked in Java/RMI may
return different types. COM requests can be local to the same process, throw a java.rmi.RemoteException
local to the same machine, remote (using RPC)
IDL: CORBA uses CORBA IDL while COM uses MIDL Java needs to call a Security Manager
INHERITANCE: COM does not support multiple inheritance (p. 105), Many object services are being defined within Enterprise
while CORBA does JavaBeans
Multiple interfaces in COM provide similar expressiveness as multiple
inheritance in CORBA CORBA provided these services since the OMA architecture
FAILURE HANDLING: COM uses the HRESULT. CORBA uses system COM provides services through COM+
and type-specific exceptions. COM failure handling is less powerfull
than CORBA’s (p. 104) It can be used in any hw platform with a JVM
ID: COM uses unique UUID and CLSID CORBA may be run on different O.S.
COM mainly under Windows
26/35 29/35
CORBA and COM: The Object Model Java RMI and CORBA, COM
Similarites:
Similarites
OPERATION VISIBILITY: Like COM, CORBA does not have
any primitives to define the visibility of operations Object Reference
OPERATIONS TYPE: CORBA and COM operations type are CORBA identifies objects through object references
very similar, since both present input, output and input/output COM objects are identified by interface pointers
parameters Java/RMI objects are identified by references
Inheritance root
Notes:
CORBA Object
RPC: Microsoft did not invent the distribution mechanisms by
COM
IUnknown
scratch but extended OSF/DCE’s RPC
COM is for reuse and evolvability, using binary encapsulation Java/RMI
Remote
and binary compatibility Inheritance and Failure Handling
STUBS: COM proxies are equivalent to CORBA client stub Both CORBA and Java/RMI support multiple inheritance at the
MODULE: COM has not the concept of “module” owned by IDL or interface level
CORBA: CORBA and Java/RMI IDLs can specify exceptions in the
CORBA modules are for scoping purpose IDLs while DCOM does not
COM does not need, since it uses UUIDs and CLSIDs
Corba ORB is not portable to other ORB products
27/35 30/35
5
The CORBA Architecture
Java/RMI - Interface
DCOM - IDL CORBA - IDL
definition
…
…
File : File :
File : StockMarket.idl
StockMarketLib.idl StockMarket.java
31/35 34/35
Client Server
CORBA, COM and RMI
OXID OXID
Resolver Resolver
33/35