Seminarium on Component-based Software Engineering

Download Report

Transcript Seminarium on Component-based Software Engineering

Seminarium on
Component-based
Software Engineering
CORBA
Jan Willem Klinkenberg
Object Management Group (OMG)





Consortium of Computing Industry
Founded in 1989
Non profit
around 800 members
Goal: standardization of “whatever it
takes” to achieve interoperability on
all levels of an open market for
“objects”
18/07/2015
Seminarium CBSE
2
OMG
 Original effort: fix “wiring” problem:
How can distributed object-oriented systems
implemented in different languages and running on
different platforms interact?
Incompatibility between compilers
Differences in object models
Differences in platforms



Solution:
18/07/2015
CORBA
Seminarium CBSE
3
CORBA
 Common Object Request Broker
Architecture.
 Open standard
 1991 – version 1.0
 Initial version.
 1995 – version 2.0
 IIOP
 OMA
 More languages support
 2002 – version 3.0
 Corba Component Model (CCM)
 Scripting languages support
18/07/2015
Seminarium CBSE
4
CORBA
 CORBA - Common Object Request
Broker Architecture.
18/07/2015
Seminarium CBSE
5
IDL
 Interface Definition Language
 Defines all object interfaces in a common language
 Bindings are available for C, C++, Java, Python,
Smalltalk, Cobol, etc…
 An IDL compiler generates stubs and skeletons.
 Stubs:
•
•
•
Looks like local object
Marhals arguments
Forwards all invocations through ORB to target object
 Skeletons:
•
•
•
•
18/07/2015
Receives invocations from ORB
Unmarshals arguments
Invokes target methods
Sends back return value
Seminarium CBSE
6
IDL – example
module Example {
struct Date {
unsigned short Day;
unsigned short Month;
unsigned short Year;
};
interface Ufo {
readonly attribute unsigned long ID;
readonly attribute string Name;
readonly attribute Date FirstContact;
unsigned long Contacts();
void RegisterContact(out Date dateOfContact);
};
};
18/07/2015
Seminarium CBSE
7
IDL types
 IDL distinguishes between basic and
constructed type and CORBA object
references.
 Before CORBA 2.3, only references
 Since CORBA 2.3, call by value is
supported -> standard mapping by
XML
18/07/2015
Seminarium CBSE
8
DII and DSI
Sometimes binding can be too static:
 DII Dynamic invocation interface
 DSI Dynamic skeleton interface (since
Corba 2.0)
These interfaces allow for dynamic selection
of methods at client side or server side
18/07/2015
Seminarium CBSE
9
ORB
 Object Request Broker





Routes the method invocations
Interface repository
Implementation repository
Can load and start object servants
Can communicate with other ORBs using
IIOP
18/07/2015
Seminarium CBSE
10
CORBA and OMG IDL
IDL source
Applications
Programs
Dynamic
invocation
interface
IDL
stubs
IDL
compiler
ORB
interface
Object
servants
IDL
Skeletons
Dynamic
Skeleton
interface
Object
Adapter
Object Request Broker (ORB)
18/07/2015
Seminarium CBSE
11
Object Adapter
 Object servants register with ORB via the
object adapter.
 Servants are loaded and started by ORB via
adapter.
 BOA – Basic Object Adapter
 Under specified, deprecated in 1998
 POA – Portable Object Adapter




Replaced the BOA
Essential for several CCM features
Creates object references
Several possible policies for object creation
18/07/2015
Seminarium CBSE
12
Server, client or both
 Separation of client and called object
does not impose an asymetric
architecture.
 The same process can issue and
receive calls.
 Pure application programs do not
require registration with ORB
18/07/2015
Seminarium CBSE
13
CORBA v.1 - Problems
 An ORB is essentially an remote
incovation service
 Replaces sockets and remote
procedure calls in distributed
applications with a cleaner model
So what’s the problem?
 Applictions still have to share many
conventions to interoperate
 OMG had to broaden it’s focus.
18/07/2015
Seminarium CBSE
14
OMA - Object Management Architecure
 Since CORBA 2.0
 Adds new areas of standardization:
 CORBAservices
 Common object services e.g.: naming, trader
event, security
 CORBAfacilities – defines a specific component
framework than can be used to integrate
components.
 Horizontal: domain independent, focus on
specific application models e.g. printing facilities
 Vertical: domain specific e.g. healtcare, finance
 Application object specifications (currently void)
 CCM - CORBA Component Model (since 3.0)
18/07/2015
Seminarium CBSE
15
CORBA Services supporting
enterprise distributed computing
 Naming service
 White pages
 Trader service
 Yellow pages
 Event service
 Send event objects from event suppliers to
event consumers.
 Notification service
 Add QoS, filtering, etc. to Event service
 Object transaction service
 Security Service
 Encryption, authentication
18/07/2015
Seminarium CBSE
16
CORBA Services supporting architecture using
fine-grained objects
 Concurrency control service
 Lock and release resources
 Licensing service
 For non-freeware objects
 Lifecycle service
 Creation, copying, moving and deletion of
objects
 Relationship service
 Not used or implemented
 Persistant state service
 Allows storing and retrieving of objects
18/07/2015
Seminarium CBSE
17
CORBA Services continued…
 Externalization service
 Mapping of object into stream and back
 Properties service
 Add/delete and retrieve arbitrary properties to
objects
 Object query service (not implemented)
 Locate object instance by attributes
 Object collections service (not implemented)
 Provides collection types like sets, trees, queues or
lists.
 Time service
 Provides a universal time for the distributed system
18/07/2015
Seminarium CBSE
18
CCM - Corba Component Model
 Introduced with CORBA 3.0 in 2002
 Logical extension of Enterprise
JavaBeans
 Is an architecture for defining
components and their interactions
 Provides a packaging technology
 Provides a container implementation
framework (CIF)
18/07/2015
Seminarium CBSE
19
CCM Component
Component interface
OFFERED
Receptacles
My
Business
Component
Event
sinks
18/07/2015
Event
sources
Attributes
Seminarium CBSE
20
REQUIRED
Facets
CCM Components features
 Ports




Facet – provided interface
Receptacle – required interface
Event sources
Event sinks
 Primary keys
 Instance identification for client
 Attributes
 Home interfaces
 Provides factory functionality
18/07/2015
Seminarium CBSE
21
CCM packaging
CCM Assembly
CCM Component
CCM Component
Deployment configuration
18/07/2015
Seminarium CBSE
22
CCM Containers
 Component instances are placed
inside containers:
Home interface
Component C
Callbacks
Home for C
Services
Container
Components interact with POA as well as transaction, security, persistence
and notification services via interfaces on their container
18/07/2015
Seminarium CBSE
23
Components types
 There are different types of
components:




Service
Session
Entity
Process
18/07/2015
Seminarium CBSE
24
CIF
 Component Implementation
Framework
 Described in CIDL, Component
implementation Definition Language
 Creates programming skeletons that
automate many of the basic behaviors of
components, including navigation,
identity inquiries, activation, state
management, lifecycle management, and
so on.
18/07/2015
Seminarium CBSE
25
Questions?
?
18/07/2015
Seminarium CBSE
26