91
Komponenttiväliohjelmist ot

Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Embed Size (px)

DESCRIPTION

Components Components are entities running in a standardized environment that provides transactions, security, event-handling, persistence, and component model services (horizontal and vertical infrastructure services) COTS: Operating systems, compilers, network managers, database systems, CASE tools; aircraft navigation algorithms, banking transaction handlers Examples in CCM, EJB, DCOM

Citation preview

Page 1: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Komponenttiväliohjelmistot

Page 2: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet

networking and interoperability server control system administration infrastructure

Sovellustilanteen arkkitehtuurimallikkeita Realisaatioita Laajennustrendit

Page 3: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Components Components are entities running in a

standardized environment that provides transactions, security, event-handling,

persistence, and component model services (horizontal and

vertical infrastructure services) COTS: Operating systems, compilers, network

managers, database systems, CASE tools; aircraft navigation algorithms, banking transaction handlers

Examples in CCM, EJB, DCOM

Page 4: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Komponenttijärjestelmät

General component model + services

horizontal infrastructures+services

verticalinfra-structure

InteroperablityMetadata

Compound documentsSystem management

SimulationTelecommunicationProcess AutomationFinancialHealthcare

Generality

Dom

ain

spec

ific

Heineman, Councill 2001

Page 5: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Components Independently deployed; Component

transfer and deployment is standardized. Subject to third-party composition In the global software component

markets; packaging and licencing Downloadable packages Deployment descriptor provides information about the

contents of the package; used for installing and configuring the component properly

Components are produced using declarative languages.

Page 6: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component system production

Tranditionally coordination among components by a skeletal software infrastructure Invokes each component Handles communication Handles coordination -> architectural styles

Set of component types Topological layout of components indicating their

interealtionships Set of interaction mechanims

Page 7: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component system production

software componentinfrastructure

finalappli-cation

infrastructuredesigner

applicationproducer

Productline ?

Page 8: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Mismatch of architectural styles

layeredabstractmachine

buss

shared repository

Page 9: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Tuumaustauko … Object factory and product line (Oliver Simms) Product line: set of products that share reqs and reused plans Business object: composed object across EAI n-tier model tiers Availability of different kind of middleware at each tier (GUI

mw, J2EE, .NET, database mw) + ”standard” deployment model and object architecture

applications

middleware service APIs

middlewareconfigurationlanguages

3GL languages-editors-interfaces to compilers

middleware implementations3GL languagescompiler implementations

Page 10: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CORBA-komponenttimalli CCM

abstrakti komponenttimalli komponenttien suoritusaikainen

ympäristö Component container programming model

komponenttien toteutus Component Implementation Framework CIF

+ Component implementation language CIDL Komponenttien pakkaaminen ja

käyttöönsaatto

Page 11: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

The Abstract Component Model Allows component designers to capture how CORBA

components are viewed by other components and clients

What a component offers to other components What a component requires from other components What collaboration modes are used between components

Synchronous via operation invocation Asynchronous via event notification

Which component properties are configurable What the business life cycle operations are (i.e. home)

Expressed via OMG IDL 3.0 extensions Syntactic construction for well known design patterns Mapped to OMG IDL interfaces for clients and implementers

Page 12: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

What is a CORBA Component? component is a new CORBA meta-type

Extension of Object (with some constraints) Has an interface, and an object reference Also, a stylized use of CORBA interfaces/objects

Provides component features (also named ports)

Could inherit from a single component type Could supports multiple interfaces Each component instance is created and

managed by a unique component home

Page 13: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CORBA components extends and specializes object type (server side!) ports

Facets – interfaces provided to clients Receptacles – named connection points, required

operation interfaces Event sources – named points that send events Event sinks – named points to which events are pushed Attributes – named values with set/get, for

configuration; can raise exceptions Equivalent interface

Navigation Modifying port states

Page 14: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

A CORBA Component

MyBusinessComponent

Component interface

Facets

Eventsources

Eventsinks

Attributes

Receptacles

OFF

ERED

REQ

UIR

ED

Page 15: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component runtime support

Component home Controls a set of components using the component

equivalent interface Provides component factory facilities

Specializations Container

Defines the environment for supporting dynamic collections of components

The core of the CCM is the container: a running piece of code that you buy from a vendor and install on your server machine. The container includes an ORB with a POA. Corba components are server-side objects; your system administrator installs components into the container, which takes charge of them when they run.

Page 16: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Facets Distinct named interfaces that provide the

component’s application functionality to clients

Each facet embodies a view of the component, corresponds to a role in which a client may act relatively to the component

A facet represents the component itself, not a separate thing contained by the component

Facets have independent object references

Page 17: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Receptacles Distinct named connection points for potential

connectivity Ability to specialize by delegation, compose functions The bottom of the Lego, if you will

Store a simple reference or multiple references But not intended as a relationship service

Configuration Statically during initialization stage or assembly stage Dynamically managed at runtime to offer interactions

with clients or other components (e.g. callback)

Page 18: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Events Simple publish / subscribe event model

“push” mode only Sources (2 kinds) and sinks

Events are value types Defined with the new eventtype meta-type valuetype specialization for component

events

Page 19: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Event Sources Named connection points for event production

Push a specified eventtype

Two kinds: Publisher & Emitter publishes = multiple client subscribers emits = only one client connected

Client subscribes or connects to directly component event source

Container mediates access to CosNotification channels

scalability, quality of service, transactional, etc.

Page 20: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Event Sinks Named connection points into which

events of a specific type may be pushed

Subscription to event sources Potentially multiple (n to 1)

No distinction between emitter and publisher Both push in event sinks

Page 21: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Attributes Named configurable properties

Vital key for successful re-usability Intended for component configuration

e.g., optional behaviors, modality, resource hints, etc. Could raise exceptions Exposed through accessors and mutators

Could be configured By visual property sheet mechanisms in assembly or

deployment environments By homes or during implementation initialization Potentially readonly thereafter

Page 22: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Navigation and Introspection Navigation from any facet to component base

reference with CORBA::Object::get_component() Returns nil if target isn’t a component facet Returns component reference otherwise

Navigation from component base reference to any facet via generated facet-specific operations

Navigation and introspection capabilities provided by CCMObject

Via the Navigation interface for facets Via the Receptacles interface for receptacles Via the Events interface for event ports

Page 23: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

A CORBA Component Home

MyBusinessHome

c1

cN

Home interface

Page 24: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Home Is instantiated at deployment time Manages a unique component type

More than one home type can manage the same component type But a component instance is managed by a single home instance

Allows life cycle characteristics or key type to vary/evolve without changing component definition

Optional use of primarykey for business component identity and persistency primary key

Standard factory and finder business logic operations Extensible with arbitrary user-defined business logic

operations

Page 25: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Primary Keys Values exposed to clients to create, find, and

destroy component instances Uniquely identifies a component instance within a home Assigned at creation time, or in pre-existing database Must be a value type derived from

Components::PrimaryKeyBase (empty, abstract) Association between a primary key and a

component is defined and maintained by its home

Different home types may define different key types (or no key) for the same component type

Primary key is not necessarily a part of the component’s state

Page 26: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CCM development project stages

1. Analysis/design UML + business object profiles

2. Component declaration Define component’s methods and home

with extended IDL and compile to produce for clients: Operations, navigation operations,

stubs for servers: skeletons, IR entries, some code,

packaging and deployment descriptors in XML

Page 27: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Esimerkki component ShoppingCart { provides ShoppingCartIntf Cart1; uses CheckoutIntf CheckOut1;}home ShoppingCartHome manages

ShoppingCart{};

Page 28: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CCM development project stages3. component implementation

declare component’s persisent state in PSDL and some behaviour aspects in CIDL

compile to get skeletons; fill in with business logic; compile to joint result to get compiled libraries

Page 29: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Esimerkkiabstract storagetype CustomerState{ state long AcctNum; state ...}storagetype PortableCustomerState implements

CustomerState{};typedef sequence <Customer> CustomerList;abstract storagehome CustomerStorageHome of Customer { primary key AcctNum(AcctNum); factory create(AcctNum, Name, ...);}storagehome PortableCustomerStorageHome implements

CustomerStateHome{};

Page 30: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Relations betweenOMG Definition Languages

OMG IDL 2.x Object-oriented collaboration i.e. data types, interfaces, and value types

OMG IDL 3.0 Component-oriented collaboration i.e. component types, homes, and event types

OMG PSDL Persistent state definition i.e. [abstract] storage types and homes

OMG CIDL Component implementation description i.e. compositions and segments

OMG IDL 2.x

OMG PSDL

OMG IDL3.0

OMG CIDL

extends

extends

extends

extends

Page 31: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component usage patterns

7 component categories: 4 CCM, 2 EJB, 1 clustomizable

servant lifetime policies: method, transaction, component, container

category usage container primary model API type key----------------------------------------------------------service stateless session nosession conversational session noprocess durable entity noentity durable entity yes

Page 32: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Composition Defined in CIDL

Category Home executor Executor Bindings State management (storage)

Page 33: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Esimerkkicomposition entity CustomerImpl { implements Customer; home executor CustomerHomeImpl delegatesTo

abstractstoragehome CustomerStateStorageHome; }

Page 34: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CCM development project stages4. component packaging

(use interactive tools to produce)/write component descriptor (in XML) to tell CCM runtime how to connect up and manage the implementation

package up implementation and component descriptor into a component archive file CAR

5. component assembly An application or part composed of some

components with predefined interaction pathways in an assembly archive file AAR

Customizes configuration, connections, partitioning to different computers

Page 35: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Building CCM Applications =Assembling CORBA Component

Instances

Page 36: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CCM development project stages6. component deployment and installation

Prior to this: system admin has installed and configured runtime environement

Installer program for CARs Deploy component factories and managers

7. Runtime: component instance activation Part of the application logic Components are activated by the container POA

Page 37: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Esimerkki<componentassembly id=”374...2304”><description>Assembly descr for example</description><componentfiles><componentfile id=“ShoppingChartFIle”><fileinarchve name=“shoppingchar.car”></componentfiles><partitioning><homeplacement id =“ShoppingCartHome”><componentfileref idref=“ShoppingCartFIle”></homeplacement>…</partitioning><connections><connectinterface><usesport><usesidentifier>Check1</usesidentifier><homeplacementref idref=“ShoppingChartHome”>…

Page 38: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Komponenttien suoritusaikainen ympstö

component container model Framework for component application servers Mostly built on the POAs

Automatic activation/deactivation Resource usage optimization Provides simplified interfaces for corba services Uses callbacks for instance management

Container encapsulates 1-N POAs References exported thourhg component

home finder, naming or trading

Page 39: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

The Container Architecture

Container

ORB

SecurityTransaction NotificationPersistency

CORBAComponent

HomePO

AClient

ExtendedOMG IDLexternal

API

InternalAPI

CallbackAPI

Page 40: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CCM Container model CORBA Usage Model

Describes the interaction between the container, the POA and the CORBA services, ie reference persistence and servant to ObjectID mapping

Types: stateless, conversational, durable Component categories

Combination of internal and external APIsusage model container

APIcomp.category

object ref servant/OID

stateless session service transient 1:Nconversational

session session transient 1:1

durable entity process persistent 1:1durable entity entity persistent 1:1

Page 41: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CCM Container model Components define their runtime

requirements through (in the deployment descriptor) Usage model Component category Activation and servant lifetime management Transaction policies Security policies Events Persistence Compoent level (basic-ejb-compat, extended)

Page 42: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CCM container model component activation and servant

lifetime management Each container has a POA and servantLocator Policies

Method: activate/passivate by method-basis Transaction: lifetime tied to a transaction Component: component decides itsef on

deactivation Container: lifetime tied to container’s lifetime

Depends also on component category

Page 43: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

characteristics property (service)internal interface session context (basic) or Session2Context

(extended)callback interface session componentusage model statelessextenral API type keylessclient design pattern factoryservat lifetime mgmt method (only)

characteristics property (entity)internal interface entitycontext(basic) or

entity2context(extended)callback interface EntityComponentusage model durableextenral API type keyfullclient design pattern factory or finderservat lifetime mgmt any

Page 44: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system
Page 45: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system
Page 46: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

The Container Server Architecture

Container ManagerSession

ContainerEJB

ContainerOther

ContainerEntity

Container

POA1 POA2 POA3 POA4

ORB

Transactions Security Persistence Events

Page 47: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

The Client Programming Model Component-aware and -unaware clients Clients see two design patterns

Factory – Client finds a home and uses it to create a new component instance

Finder - Client searches an existing component instance through Name Service, Trader Service, or home finder operations

Optionally demarcation of transactions Could establish initial security credentials Invokes operations on component instances

Those defined by the client-side mapping

Page 48: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Cmponent Implementation Framework

CIF defines a programming model for constructing component implementations

How components should be implemented Generates executors: implementation of behavioural

elements (homes, containers, …) Facilitates component implementation

“only” business logic should be implemented Not activation, identify, port management and introspection

=> Local server-side OMG IDL mapping Interactions between implementations and containers

Manages segmentation and persistency=> Component Implementation Definition Language

Page 49: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Server-Side Mapping

Component Implementation Framework to Component Skeleton Generation

Component executor

Skeletons managingports, life cycle,persistency, etc.

+ GIOP/IIOP

ExtendedOMG IDL

file+

CIDL

Compilingfor CIF/Java

Page 50: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Implementation Definition Language CIDL

describes component composition Aggregate artifacts required to implement a

component and its home Manages component persistent state

Persistent state definition language PSDL Links storage types to segmented executors

Generates executor skeletons providing Segmentation of component executors Default implementations of callback operations Component’s state persistency

Page 51: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

A Monolithic Component Executor

Monolithic executor

Container context

Componentspecificcontext

Component container

Main component executor interface

Facet or event sink executor interface

SessionComponent or EntityComponent

Component-oriented context interfaceContainer-oriented context interface

Container interpositionContext use

Page 52: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CIF implementations can be segmented

Segments are physical partitions of implementations

Can define independent state and can be independently activated

Help in managing, partitioning and sharing a high number of facet implementations

Only in process and entity categories

Page 53: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

A Segmented Component Executor

Main segment

Container context

Componentspecificcontext

Component container

Seg2 Seg4Seg3

ExecutorLocator

Page 54: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system
Page 55: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Packaging and Deployment Packaging and Deployment of Components

Components are packaged into a self-descriptive package

Packages can be assembled Assemblies can be deployed

Helped by XML descriptors Packaging and Deployment model Allows

interoperability between deployment tools and containers

Page 56: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CCM Applications Deployment It is necessary for an application to

List component instances Define logical location and partitioning Specify connections between components

It is necessary for a component to Specify its elements

interfaces, implementations Describe system requirements

OS, ORB, JVM, library releases, … Specify its initial configuration

It is necessary for a connection to Associate related component ports

Page 57: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Packaging Artifacts

IDL/CIDLCom piler

IDL/CIDL File

S tubs, Skeletons

PackagingTool

Im plem entation

Program m ingLanguage

Tools

User's Code

Com ponentDescriptor

Default P roperties

Assem blyTool

Com ponentAssem blyPackage

Hom e Properties Com ponent Properties

Deploym entTool

CO RBACom ponent

Package

CORBACom ponent

Package

Assem blyDescriptor

CORBACom ponent

Package

softpkgDescriptor

Page 58: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

XML Descriptors Overview Software Package Descriptor (.csd)

Describes contents of a component software package Lists one or more implementation(s)

CORBA Component Descriptor (.ccd) Technical information mainly generated from CIDL Some container managed policies filled by user

Component Assembly Descriptor (.cad) Describes initial virtual configuration

homes, component instances, and connections Component Property File Descriptor (.cpf)

name/value pairs to configure attributes

Page 59: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Relationship Between CCM XML Descriptors

CORBAComponentDescriptor

ComponentProperty

FileDescriptor

SoftwarePackage

Descriptor

ComponentAssemblyDescriptor

* *

*

Page 60: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Assembly Package Archive (ZIP file) containing

One or more component packages, either Including a package’s contents Including the original package Referencing the package by URL

Property File Descriptors defining initial attribute values Component Assembly Descriptor (.cad)

Defines home instances to be created Defines component instances to be created Defines connections between ports to be made

Self-contained and self-descriptive unit For automatic and easy “one step” deployment No programming language experience necessary

Page 61: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Assembly Descriptor (.cad)

References one or more Component Software Descriptors

Defines home instances and their collocation and cardinality constraints

Defines components to be instantiated Defines that homes, components or ports

are to be registered in the ComponentHomeFinder, Naming or Trading Service

Defines connections to be made between component ports, e.g. receptacles to facets and event sinks to event sources

Page 62: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Software Package Descriptor (.csd)

Descriptive general elements title, description, author, company, webpage, license

Link to OMG IDL file Link to default property file Implementation(s)

Information about Implementation Operating System, processor, language, compiler, ORB Dependencies on other libraries and deployment requirements Customized property and CORBA component descriptor

Link to implementation file Shared library, Java class, executable

Entry point

Page 63: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CORBA Component Descriptor (.ccd) Structural information generated by CIDL

Component / home types and features Ports and supported interfaces Component category and segments

Container policies filled by the packager Threading Servant lifetime Transactions Security Events Persistence Extended POA policies

Link to component and home property files

Page 64: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Property File Descriptor (.cpf) Used to set home and component properties

However, it could be used for anything Contains zero or more name/value pairs to

configure attributes Referenced by...

Software Package Descriptors to define default values for component attributes

CORBA Component Descriptors to define default values for component or home attributes

Assembly Descriptors to configure initial values for home or component instances

Page 65: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Packaging

IDL/CIDL Compiler

UserCode

GeneratedCode

IDL

ComponentDescriptor

DefaultProperties

Compiler

SharedLibrary or

Executable

Packaging Tool

ComponentPackage

.zip

Page 66: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component Assembly

Properties DeploymentTool

AssemblyArchive

.aar (ZIP)Assembly Tool

ComponentPackage

ComponentPackage

ComponentPackage

PortConnections

InstanceCreation

...

Page 67: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Deployment An Assembly Archive is deployed by a

deployment tool The deployment tool might interact

with the user to assign homes and components to hosts and processes

The deployment application interacts with installation objects on each host

Page 68: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Deployment Objects ComponentInstallation

Singleton, installs component implementations AssemblyFactory

Singleton, creates Assembly objects Assembly

Represents an assembly instantiation Coordinates the creation and destruction of component

assemblies and components ServerActivator

Singleton by host, creates ComponentServer objects ComponentServer

Creates Container objects Container

Installs CCMHome objects

Page 69: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

The Component Deployment Process

Deployment A pp

S taging Area

Assembly File

I nst allO bject

P roc essor

I nst allO bject

Processor

I nstallObject

Processor

Process or

I nst allO bject

P roc essor

ZIP

OMG IDL

Page 70: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

The Component Deployment Process

Deployment Tool

AssemblyFactory Assembly

ServerActivator

ComponentServer

Container

CCMHome

CCMObjectComponentInstallation

«instantiates»

«instantiates»

«instantiates»

«instantiates»

«instantiates»

Page 71: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

More Information CORBA 3.0: New Components Chapters

OMG TC Document ptc/2001-11-03

CORBA 3 Fundamentals and Programming Dr. John Siegel, published at John Wiley and

Sons

“The CCM Page”, Diego Sevilla Ruiz http://www.ditec.um.es/~dsevilla/ccm/

Page 72: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Kurssilukemisto Vinoski, S., New features for

CORBA 3. Wang, Schmidt, O’Ryan: Overview

of the CORBA Component Model

Page 73: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Muuta materiaalia CCM-spesifikaation intro

http://www.omg.org/cgi-bin/doc?formal/02-06-69 Ohjelmointitutoriaaleja

http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO/docs/tutorials/Quoter/

useimmilla toimittajilla omansa (Sun+Java+CORBA, etc)

CORBA-sivustoja http://www.cs.wustl.edu/~schmidt/corba.html http://www.puder.org/corba/

Page 74: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Open Source CCM Implementations OpenCCM from LIFL & ObjectWeb

Java on ORBacus 4.1 & OpenORB 1.2.1 http://www.objectweb.org/OpenCCM/

MicoCCM from FPX & Alcatel C++ on MICO http://www.fpx.de/MicoCCM/

FreeCCM from Humboldt University C++ on ORBacus 4.1 http://sourceforge.net/projects/cif

Page 75: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Commercial CCM Implementations EnagoCCM from IKV++/Fraunhofer

FOKUS C++ on MICO & ORBacus 4.1 [email protected]

EJCCM from CPI Inc. Java on OpenORB 1.3.x http://www.ejccm.org

K2 from ICMP C++ on various ORBs http://www.icmgworld.com

Page 76: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Komponenttimallien vertailua

Page 77: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Java component models applets – client side, downloadable lightweight

component for augmenting websites display JavaBeans – focuses on supporting connection-

oriented programming, for clients and servers Enterprise Java Beans, EJB – container-integrated

services supporting components that request services using declarative attributes and deployment descriptors

servlets – lightweight componetns instantiated by web server processing web pages

application client components – uncontstrained Java application

Page 78: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

EJB Overview EJB Architecture contracts

Client view contract between client and container

Client can be servlet or JSP, standalone Java application, applet, another EJB (same/different container), web services client

Provides development model for clients Component contract between EJB

component and its container Runtime environment, development model

Page 79: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

EJB Overview Client view contract is comprised of

Home interface Methods for creating and locating beans

Remote interface Business methods for clients

Object identity Metadata interface handle

Page 80: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

EJB Overview component contract

Enables EJB method invocations from clients Manages the life cycle of EJB bean instances Implements home and remote interfaces Provides persistence Provides runtime context information Manages transactions, security, exceptions,

… Implements callbacks

Page 81: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

EJB Overview Deployment process defined

Deployment descriptor includes instructions for container on how to control transactions, security, lifecycle, state management, persistence, …

Describes structural and external dependencies of enterprise bean

Page 82: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component model comparison

both CCM and EJB provide component model with stateless and

statefull sessions and entities services for building scalable

applications (load-balancing etc) access to components via HTTP or

distributed object protocol Transaction support Development tools

Page 83: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component model comparison EJB interoperability is explicitly

defined in the CCM specification CCM defines both ”container to

component” and ”container to infrastructure contract”

CCM’s container environment specification is a superset of EJB 1.1 containter environment specification

Page 84: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

CCM Container Architecture

Container

ORB / POA

SecurityTransaction NotificationPersistency

CORBAComponent

Page 85: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

EJB Container Architecture

Container

HomeClient Remote

Enterprise Java Bean

Page 86: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component model comparison

CCM lookup and instantiation of

objects on remote hosts marchalling security across mach. bound. IIOP and GIOP Objects handled via object

reference Error handling via exceptions Multiple interfaces Necessary services (in

CACM): Naming, transactions, events

EJB invocation of object

methods, serialization JRMP/IIOP Server-side beans that

process business logic, Single interfaces only Supports transactions RMI = easy to use Not language-

independent Better third-party

market

Page 87: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Component container environments CCM container

managed policies Servant lifetime Transaction: flat,

operation level Security Notification/events persistence

EJB container manages Component

lifecycle, resource pooling, load balancing

EJB component descriptor Persistence Transaction security

Page 88: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Usability comparison why multi-tier architecture? flexibility

middle-tier business services accessible by many different types of clients

scalability Optimization of resource sharing in middle-tier

Robustness Interchangeable servers deliver business

services

Page 89: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

A comparison framework

thin client

rich client

fat client

web server

middle-tiercomponent server mainframe

data serverSQL

??distributedobject protocol

distributedobject protocolHTTP

HTMLXML

simplewebclients

appletsetc

DOEclients

Page 90: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

COM+ EJB CCMscalability **** **** ****ease of development **** **** ***?security **** **** ****state management no

container-managed persistence

**** ****

deployment *** ** ****robustness *** product

based**?

platform support ** **** ?

Page 91: Komponenttiväliohjelmistot. Teemat Järjestelmämallin tarpeet Palvelut ja rajapinnat Sisärakenteet networking and interoperability server control system

Kirjallisuutta Humberto Cervantes, Common concepts of

component models. Technical paper, LSR, Beanome, September 2002. http://www-adele.imag.fr/BEANOME/commonconcepts.html

http://www.cs.wustl.edu/~schmidt/PDF/middleware-chapter.pdf

Gail Anderson, Paul Anderson, Enterprise JavaBeans Overview. InformIT, Aug 2002. http://www.informit.com/isapi/product_id~{A8F4E24F-437D-4668-A18B-2063C916B472}/st~{94C03A97-1188-4875-8A06-17743BA224B7}/session_id~{73D81F64-38CF-4D84-9AA7-0FF388D098FE}/content/articlex.asp