CORBA Overview and Advanced Programming Issues 1998 CTIT, Nikolay Diakov 1 Table Of Contents...

Post on 02-Jan-2016

223 views 1 download

Transcript of CORBA Overview and Advanced Programming Issues 1998 CTIT, Nikolay Diakov 1 Table Of Contents...

CORBAOverview and Advanced Programming Issues

1998 CTIT, Nikolay Diakov

11

Table Of Contents

• Introduction

• OMG, OMA, CORBA Object Model

• CORBA

• Introspection

• ORB Interoperability

• Run-time features, Fault-tolerance and Component Model

• CORBA 3.0

Part 1 Part 2

• Simple Application

• IDL to Programming Language mapping

• Advanced Programming Issues

Appendix• Look into the IDL

CORBAOverview and Advanced Programming Issues

1998 CTIT, Nikolay Diakov

22

Part 1. Overview

• Proprietary systems

• Networks with proprietary protocols

• Open systems and standardized communication protocols

Introduction

1998 CTIT, Nikolay Diakov

33

• Object Management Group (OMG)

• Common Object Request Broker Architecture (CORBA)

• Object Management Architecture (OMA)

OMG

1998 CTIT, Nikolay Diakov

44

• Founded April 1989.

• Largest software consortium in the world

• It has 800+ participants• Small staff (27 full time); no internal development. Offices in U.S.A., Germany, Japan, U.K, Australia, India.

• Dedicated to creating and popularizing object-oriented standards for application integration based on existing technology.

Common Object Request Broker Architecture

1998 CTIT, Nikolay Diakov

55

CORBA

1998 CTIT, Nikolay Diakov

66

CORBA bus

App1App2

App3

AppX

Object Management Architecture

1998 CTIT, Nikolay Diakov

77

OMA

1998 CTIT, Nikolay Diakov

88

Application Objects

Object Request Broker

ObjectServices

CommonFacilities

Object Management Architecture

OMA

1998 CTIT, Nikolay Diakov

99

• System oriented components

• Object Request Brokers

• Object Services

Application Objects

Object Request Broker

ObjectServices

CommonFacilities

OMA

1998 CTIT, Nikolay Diakov

1100

• System oriented components

• Object Request Brokers

• Object Services

• Application oriented components

• Application Objects

• Common Facilities

Application Objects

Object Request Broker

ObjectServices

CommonFacilities

OMA

1998 CTIT, Nikolay Diakov

1111

• System oriented components

• Object Request Brokers

• Object Services

• Application oriented components

• Application Objects

• Common Facilities

• Horizontal

• Vertical

Application Objects

Object Request Broker

ObjectServices

CommonFacilities

OMG Object Model (OM)

1998 CTIT, Nikolay Diakov

1122

OMG Object Model (OM)

1998 CTIT, Nikolay Diakov

1133

• Object– Combines Functionality and Data – Typically represents a real-world object– Has a well-defined interface (Through IDL)– and an “object reference” or address– Follows basic OO principles:

• Encapsulation Inheritance

• PolymorphismInstantiation

OMG Object Model (OM)

1998 CTIT, Nikolay Diakov

1144

Consists of• Core Object Model

• Components

• Profiles

GoalsApplication portability

Object level

Design level

Source code level

Interoperability

CORBA Object Model

1998 CTIT, Nikolay Diakov

1155

• Based on OMG/OM

• Goes concrete on the technology - interaction between clients and servers

Concepts

clients

requests

operations

Interfaces and attributes

CORBA Object Services

1998 CTIT, Nikolay Diakov

1166

CORBA Object Services

1998 CTIT, Nikolay Diakov

1177

•Access to object references• Naming Service

• Object Trader Service

• Notification of significant events of change of state

• Event Service

• Notification Service

• Support of transactional semantics

• Transaction Service

•Access to object references• Naming Service

• Object Trader Service

• Notification of significant events of change of state

• Event Service

• Notification Service

• Support of transactional semantics

• Transaction Service

•Support for secure interoperability

• Object Security Service

• Licensing Service

• Other• Life Cycle Service

• Persistence Service

• Concurency Control Service

• Time Service

•Support for secure interoperability

• Object Security Service

• Licensing Service

• Other• Life Cycle Service

• Persistence Service

• Concurency Control Service

• Time Service

CORBA Interface Definition Language

1998 CTIT, Nikolay Diakov

1188

CORBA IDL

1998 CTIT, Nikolay Diakov

1199

OMG/ISO IDL (Interface Definition Language) Separates the Interface from the Implementation

• multiple-inheritance, strongly typed, public interface specification language;

• independent of any particular language/compiler;

• mappings will be provided for many languages/compilers;

• not a programming language.

Enables Interoperability

CORBA IDL

1998 CTIT, Nikolay Diakov

2200

I D L

I D L

I D L

I D L

I D L

I D L

ORB

C

C++

COBOL

Ada

Smalltalk

More

Client Side Object Implementation

Side COBOL

C

Ada

C++

Smalltalk

More

I D L

I D L

I D L

I D L

I D L

I D L

ORB

CORBA - UML and MOF

1998 CTIT, Nikolay Diakov

2211

•Unified Modeling Language - enables visual modeling and analysis

•Metadata Object Facility - provides a standard repository for metadata within the CORBA architecture

CORBA For Developers

1998 CTIT, Nikolay Diakov

2222

Develop Clients and Servers Independently using the Best Tools for Each Task

Develop Clients and Servers Independently using the Best Tools for Each Task

CORBA Services and CORBA Facilities accessed via standard OMG IDL Interfaces

CORBA Services and CORBA Facilities accessed via standard OMG IDL Interfaces

• CORBA provides a sophisticated base for software

development

• CORBA Services provide necessary OO foundation

• CORBA Facilities standardize building blocks

• Developers create or assemble Application Objects

Much more than Client-Server

CORBA For Users

1998 CTIT, Nikolay Diakov

2233

• Purchase Server Objects from Multiple Vendors and Integrate Under One or More Client Applications

• Seamlessly Integrate In-House and Purchased Objects

• Acquire & Maintain a Single Set of Business Objects Accessed by the Entire Enterprise

• Each Division Accesses These Common Objects Using a GUI Built for its Own Needs

CORBA Essential

1998 CTIT, Nikolay Diakov

2244

CORBA

1998 CTIT, Nikolay Diakov

2255

ClientObject

Implementation

ORB

With IDL the interface definition is separated from the implementation

With IDL the interface definition is separated from the implementation

CORBA

1998 CTIT, Nikolay Diakov

2266

ClientObject

Implementation

ORB

Defining the Object’s interface in the OMG IDL creates a language independent API for the Object

Defining the Object’s interface in the OMG IDL creates a language independent API for the Object

CORBA

1998 CTIT, Nikolay Diakov

2277

ClientObject

Implementation

ORB

Objects may be written in programming languages -- C, C++, Java, Smalltalk, Ada, COBOL, Visual Basic, or might be Wrapped Legacy Applications, Tool-Generated Objects, or Objects purchased from

Vendors.

Objects may be written in programming languages -- C, C++, Java, Smalltalk, Ada, COBOL, Visual Basic, or might be Wrapped Legacy Applications, Tool-Generated Objects, or Objects purchased from

Vendors.

•C++

•Java

•Pascal

•Ada

CORBA

1998 CTIT, Nikolay Diakov

2288

ClientObject

Implementation

ORB

The same IDL defines the Client Side API.The same IDL defines the Client Side API.

CORBA Introspection

1998 CTIT, Nikolay Diakov

2299

CORBA Introspection

1998 CTIT, Nikolay Diakov

3300

Client

ORBDII

IDLstubs

ORB interface IDLskeleton

DSI

Object Adapter

GIOP/IIOP ORB CORE

ObjectImplementation

CORBA Introspection

1998 CTIT, Nikolay Diakov

3311

Client

ORBDII

IDLstubs

ORB interface IDLskeleton

DSI

Object Adapter

GIOP/IIOP ORB CORE

ObjectImplementation

CORBA Introspection

1998 CTIT, Nikolay Diakov

3322

Client• The Client invokes operations

• The invocation is transparent in terms of

• runtime environment

• location

• implementation language

• The Client invokes operations

• The invocation is transparent in terms of

• runtime environment

• location

• implementation language

CORBA Introspection

1998 CTIT, Nikolay Diakov

3333

Client

ORBDII

IDLstubs

ORB interface IDLskeleton

DSI

Object Adapter

GIOP/IIOP ORB CORE

ObjectImplementation

CORBA Introspection

1998 CTIT, Nikolay Diakov

3344

ObjectImplementation

• Implements the interface

• Can be written in any programming language

• Can be independent to the ORB implementation

CORBA Introspection

1998 CTIT, Nikolay Diakov

3355

Client

ORBDII

IDLstubs

ORB interface IDLskeleton

DSI

Object Adapter

GIOP/IIOP ORB CORE

ObjectImplementation

CORBA Introspection

1998 CTIT, Nikolay Diakov

3366

IDLstubs

IDLskeleton

• The stub is the part to include into the client project.• The stub is the part to include into the client project.

Both generated from the same IDL interface

• The skeleton is the part to include into the server project.

• The skeleton is the part to include into the server project.

Both provide the mapping to the particular programming language

CORBA Introspection

1998 CTIT, Nikolay Diakov

3377

Client

ORBDII

IDLstubs

ORB interface IDLskeleton

DSI

Object Adapter

GIOP/IIOP ORB CORE

ObjectImplementation

CORBA Introspection

1998 CTIT, Nikolay Diakov

3388

ORB interface

ORB is a logical entity that may be implemented in various ways. To hide implementation details from the applications, the CORBA specification defines an abstract interface for an ORB. This interface provides a variety of helper functions.

ORB is a logical entity that may be implemented in various ways. To hide implementation details from the applications, the CORBA specification defines an abstract interface for an ORB. This interface provides a variety of helper functions.

CORBA Introspection

1998 CTIT, Nikolay Diakov

3399

Client

ORBDII

IDLstubs

ORB interface IDLskeleton

DSI

Object Adapter

GIOP/IIOP ORB CORE

ObjectImplementation

CORBA Introspection

1998 CTIT, Nikolay Diakov

4400

DII DSI

• Provides dynamic access to the request scheme of the ORB

• No stub specific bindings

• Allows deferred synchronous and oneway requests

• Provides dynamic access to the request scheme of the ORB

• No stub specific bindings

• Allows deferred synchronous and oneway requests

• Allows request to go to implementations that does not have compile-time knowledge about the interface they implement

• Allows request to go to implementations that does not have compile-time knowledge about the interface they implement

CORBA Introspection

1998 CTIT, Nikolay Diakov

4411

Client

ORBDII

IDLstubs

ORB interface IDLskeleton

DSI

Object Adapter

GIOP/IIOP ORB CORE

ObjectImplementation

CORBA Introspection

1998 CTIT, Nikolay Diakov

4422

Object Adapter

• Object Activation

• Delivering the requests to the particular implementation

• CORBA 3.0 standardizes Portable Object Adapters

• Object Activation

• Delivering the requests to the particular implementation

• CORBA 3.0 standardizes Portable Object Adapters

CORBA Introspection

1998 CTIT, Nikolay Diakov

4433

Client

ORBDII

IDLstubs

ORB interface IDLskeleton

DSI

Object Adapter

GIOP/IIOP ORB CORE

ObjectImplementation

CORBA Introspection

1998 CTIT, Nikolay Diakov

4444

GIOP/IIOP ORB CORE

Provides a mechanism for transparently communicating client requests to target object implementations. The ORB simplifies the distributed environments.

Provides a mechanism for transparently communicating client requests to target object implementations. The ORB simplifies the distributed environments.

CORBA Interoperability

1998 CTIT, Nikolay Diakov

4455

CORBA Interoperability

1998 CTIT, Nikolay Diakov

4466

•There are different hardware platforms;

• There are different operating systems;

• There are different network protocols;

• There are different application formats/protocols.

There must be consensus

on interoperability.

One possible answer to the question how to make these things work together is:

CORBA Interoperability

1998 CTIT, Nikolay Diakov

4477

• Boundaries which may not be obvious or

logical to you

– departmental (budget, task, group)

boundaries

– site boundaries (company, plant)

– technological boundaries (HW, SW)

CORBA Interoperability

1998 CTIT, Nikolay Diakov

4488

ORB ORB

TCP/IP (Internet)

Domain A Domain B

CORBA Interoperability

1998 CTIT, Nikolay Diakov

4499

Key steps to Full Interoperability

• Standardize rich, extendible, and generic enough communication protocol

• Each vendor implements mapping to and from this protocol

• Standardize rich, extendible, and generic enough communication protocol

• Each vendor implements mapping to and from this protocol

CORBA InteroperabilityBridging

1998 CTIT, Nikolay Diakov

5500

ORB ORB

TCP/IP (Internet)

Domain A Domain B

Bridge

Client Server Object

CORBA InteroperabilityBridging

1998 CTIT, Nikolay Diakov

5511

• Bridging

• mediated• full-bridging

• half-bridging

• immediate

ORB ORB

Domain ADomain B

Bridge

CORBA InteroperabilityBridging

1998 CTIT, Nikolay Diakov

5522

• Bridging

• mediated• full-bridging

• half-bridging

• immediate

In-line bridges

Request-level bridges

ORB ORB

Domain ADomain B

Bridge

CORBA InteroperabilityBridging

1998 CTIT, Nikolay Diakov

5533

• GIOP

• IIOP

• ESIOP

CORBA goes Real-Time

1998 CTIT, Nikolay Diakov

5544

CORBA goes Real-Time

1998 CTIT, Nikolay Diakov

5555

Real-time CORBA is an optional ORB extension

•fixed-priority scheduling

• control over ORB resources for end-to-end predictability

• flexible communications

Real-time CORBA is an optional ORB extension

•fixed-priority scheduling

• control over ORB resources for end-to-end predictability

• flexible communications

CORBA is Fault-Tolerant

1998 CTIT, Nikolay Diakov

5566

CORBA is Fault-Tolerant

1998 CTIT, Nikolay Diakov

5577

The flexible POA it self is not enough.

A new specification for

fault-tolerant CORBA is standardized.

The flexible POA it self is not enough.

A new specification for

fault-tolerant CORBA is standardized.

CORBA is Fault-Tolerant

1998 CTIT, Nikolay Diakov

5588

An Example is the GIOP offers mechanism of providing multiple addresses in an Interoperable Object Reference. This allows load-balance schemes and fault-tolerant schemes of finding another ORB resource for satisfying a request.

An Example is the GIOP offers mechanism of providing multiple addresses in an Interoperable Object Reference. This allows load-balance schemes and fault-tolerant schemes of finding another ORB resource for satisfying a request.

CORBA Component Model

1998 CTIT, Nikolay Diakov

5599

CORBA Component Model

1998 CTIT, Nikolay Diakov

6600

CORBAbeansCORBAbeans

•Multiple interfaces per object, object passable by value, messaging servce

•Components does not map 1:1 to interface or CORBA object

•Multiple interfaces per object, object passable by value, messaging servce

•Components does not map 1:1 to interface or CORBA object

CORBA Component Model

1998 CTIT, Nikolay Diakov

6611

CORBA componentCORBA component

• instance identity

• properties

• event notification mechanism

• CORBA scripting facility - assembling applications from CORBA components

• instance identity

• properties

• event notification mechanism

• CORBA scripting facility - assembling applications from CORBA components

CORBA 3.0

1998 CTIT, Nikolay Diakov

6622

CORBA 3.0

1998 CTIT, Nikolay Diakov

6633

1. Portable Object Adapter

2. CORBA messaging

3. Objects-By-Value

1. Portable Object Adapter

2. CORBA messaging

3. Objects-By-Value

CORBA 3.0

1998 CTIT, Nikolay Diakov

6644

1. Portable Object Adapter (POA)

The POA mediates the CORBA objects and the programming implementationsThe POA mediates the CORBA objects and the programming implementations

The main purpose of POA is to provide portability for CORBA server applications. Portability from the implementation of the ORB.

The main purpose of POA is to provide portability for CORBA server applications. Portability from the implementation of the ORB.

CORBA 3.0

1998 CTIT, Nikolay Diakov

6655

1. Portable Object Adapter (POA) allows

• Creation of CORBA Objects

• Demultiplexing of requests made on each CORBA object

• Dispatching requests to the appropriate implementation that the CORBA Object represents

• Activation/Deactivation of CORBA Objets

• Creation of CORBA Objects

• Demultiplexing of requests made on each CORBA object

• Dispatching requests to the appropriate implementation that the CORBA Object represents

• Activation/Deactivation of CORBA Objets

All this in an ORB implementation independent way

Server Application

CORBA 3.0

1998 CTIT, Nikolay Diakov

6666

1. Portable Object Adapter (POA)

ORB

Request

Server Application

CORBA 3.0

1998 CTIT, Nikolay Diakov

6677

1. Portable Object Adapter (POA)

ORB POA

Request

Server Application

CORBA 3.0

1998 CTIT, Nikolay Diakov

6688

1. Portable Object Adapter (POA)

ORB POA

Request

Implementation(Servant)

CORBA 3.0

1998 CTIT, Nikolay Diakov

6699

2. CORBA Messaging

• The CORBA messaging fills a big hole in the consistency of the CORBA specification

• It helps reliably communicating over unreliable connections.

• The Client / Servers are not that tightly coupled anymore as in the synchronous invocation.

• Makes CORBA usable in large distributed systems.

• The CORBA messaging fills a big hole in the consistency of the CORBA specification

• It helps reliably communicating over unreliable connections.

• The Client / Servers are not that tightly coupled anymore as in the synchronous invocation.

• Makes CORBA usable in large distributed systems.

CORBA 3.0

1998 CTIT, Nikolay Diakov

7700

2. CORBA Messaging

• Asynchronous messaging

• Time-independent invocations

• Facilities for specifying messaging quality of service (QoS)

• Asynchronous messaging

• Time-independent invocations

• Facilities for specifying messaging quality of service (QoS)

CORBA 3.0

1998 CTIT, Nikolay Diakov

7711

2. CORBA Messaging

• Asynchronous messaging

• Callback

• Polling - returns a type, for later polling

•Time-independent invocations

• Facilities for specifying messaging quality of service (QoS)

• Asynchronous messaging

• Callback

• Polling - returns a type, for later polling

•Time-independent invocations

• Facilities for specifying messaging quality of service (QoS)

CORBA 3.0

1998 CTIT, Nikolay Diakov

7722

2. CORBA Messaging

• Quality of Service Allows specifying policies for quality of message delivery, queuing and priorities.These policies can be applied on level ORB, level Thread, orlevel object.

• Quality of Service Allows specifying policies for quality of message delivery, queuing and priorities.These policies can be applied on level ORB, level Thread, orlevel object.

CORBA 3.0

1998 CTIT, Nikolay Diakov

7733

3. Objects by Value

• What is passing-by-value?

CORBA 3.0

1998 CTIT, Nikolay Diakov

7744

3. Objects by Value -How is it possible with CORBA?

Valuetype - new constructed type added to the OMG IDL

• like interfaces it has operations and data members

• it can inherit other Valuetype (single only)

Unlike interfaces

• datamembers are transferred

• operation invocations are local

Valuetype - new constructed type added to the OMG IDL

• like interfaces it has operations and data members

• it can inherit other Valuetype (single only)

Unlike interfaces

• datamembers are transferred

• operation invocations are local

CORBA 3.0

1998 CTIT, Nikolay Diakov

7755

3. Objects by Value -How is it possible with CORBA?

How the operation invocations are local and still work?

- Java, Smalltalk

- C++

The programmer of the object has to take care of the mechanism of transferring the implementation locally. The extended IDL to programming language mapping just gives the means for doing that.

How the operation invocations are local and still work?

- Java, Smalltalk

- C++

The programmer of the object has to take care of the mechanism of transferring the implementation locally. The extended IDL to programming language mapping just gives the means for doing that.

CORBAAdvanced Programming Issues

1998 CTIT, Nikolay Diakov

7766

Part 2. Advanced Programming Issues

CORBASimple Application In CORBA

1998 CTIT, Nikolay Diakov

7777

CORBASimple Application In CORBA

1998 CTIT, Nikolay Diakov

7788

0. Define the problem

1. Think distributed

2. Define a communication interface

3. Build the server

4. Build the client

5. Setup a test session

CORBASimple Application In CORBA

1998 CTIT, Nikolay Diakov

7799

0. Define the problem

We define our problem in the context of the electronic commerce. We need our client to be able to buy goods from our sites.

CORBASimple Application In CORBA

1998 CTIT, Nikolay Diakov

8800

1. Think distributed

Client

Client

Client

ClientServerObject

CORBASimple Application In CORBA

1998 CTIT, Nikolay Diakov

8811

2. Define a communication interface

ClientServerObject

Interface Purchase

- operation ListGoodies

- operation AddGoodytoCart

- operation ListCart

- operation Order

CORBASimple Application In CORBA

1998 CTIT, Nikolay Diakov

8822

3. Build the server

ClientServerObject

Interface Purchase

- operation ListGoodies

- operation AddGoodytoCart

- operation ListCart

- operation Order

The server will implement the interface. It will provide the code of each operation, in a language that is most suitable and chosen by the developer.

The server will implement the interface. It will provide the code of each operation, in a language that is most suitable and chosen by the developer.

CORBASimple Application In CORBA

1998 CTIT, Nikolay Diakov

8833

4. Build the client

ClientServerObject

Interface Purchase

- operation ListGoodies

- operation AddGoodytoCart

- operation ListCart

- operation Order

The client will include the some code to be able to

locate the Server object, bind to an instance, and to

call operations on it.

The client will include the some code to be able to

locate the Server object, bind to an instance, and to

call operations on it.

CORBASimple Application In CORBA

1998 CTIT, Nikolay Diakov

8844

5. Setup a test session

Client

ServerObject

ORB1. Run the ORB software on a machine connected to the network.

1. Run the ORB software on a machine connected to the network. 2. Run the SERVER

program. If on a remote machine, depending on the implementation the SERVER will find the ORB.

2. Run the SERVER program. If on a remote machine, depending on the implementation the SERVER will find the ORB.

3. Run the Client.3. Run the Client.

CORBAThe Interface Definition Language

1998 CTIT, Nikolay Diakov

8855

CORBAThe Interface Definition Language

1998 CTIT, Nikolay Diakov

8866

Similar to C++• preprocessing• lexical rules• grammar• inheritance

IDL is NOT an implementation language!

CORBAIDL to Programming Language Mapping

1998 CTIT, Nikolay Diakov

8877

CORBAIDL to Programming Language Mapping

1998 CTIT, Nikolay Diakov

8888

• Translates from OMG IDL constructs

to programming language constructs

• Special IDL compiler generate stubs

for the client and skeletons for the

server objects

CORBAIDL to Java Mapping

1998 CTIT, Nikolay Diakov

8899

•IDL Modules map to Java Packages

•Interfaces map to public Java Interfaces + “Helper” and “Holder” Java classes

•IDL Operations map to Java methods

•the integral types (Integer, float) map to the corresponding Java integral types

•exceptions map to Java exceptions

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9900

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9911

1. Callbacks

2. Interface Repository

3. DII

4. DSI

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9922

1. Callbacks

ClientServer

Normally, the communicationbetween clients and serversfollow the request/response scheme. This however, is not sufficient sometimes.

Normally, the communicationbetween clients and serversfollow the request/response scheme. This however, is not sufficient sometimes.

Requestthen

Response

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9933

1. Callbacks

ClientServer

Imagine the server being able to invoke methods on the client.The client becomes a server

Imagine the server being able to invoke methods on the client.The client becomes a server

Requestthen

Response

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9944

1. Callbacks

ClientServer

How is this done on CORBAHow is this done on CORBA

•The client implements an interfacetoo.

•The client implements an interfacetoo.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9955

1. Callbacks

ClientServer

How is this done on CORBAHow is this done on CORBA

•The client invokes an operation on the server passing a reference to its interfaces

•The client invokes an operation on the server passing a reference to its interfaces

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9966

1. Callbacks

ClientServer

How is this done on CORBAHow is this done on CORBA

•The server is now able to invoke operations on the client anytime

•The server is now able to invoke operations on the client anytime

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9977

2. Interface Repository

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9988

2. Interface Repository• Interface Repository allows:

– Implementation of browsers that allow designers to determine what have been defined in a system.

– CASE tools to aid software design, writing and debugging

– Applications to use DII to learn dynamically about objects and interfaces that were not know at compile time.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

9999

3. DII

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110000

3. DII

The Dynamic Invocation Interface (DII) allows clients to dynamically

• discover objects;• discover objects’ interfaces;• create requests;• invoke requests;• receive responses.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110011

3. DII - Features

• requests appear as objects themselves;

• requests are reusable;

• invocation may be synchronous or deferred synchronous

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110022

3. DII

ClientServerServerServer

Using DII the client discoversthe proper server object.

Using DII the client discoversthe proper server object.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110033

3. DII

ClientServer

ServerServer

The client discovers theappropriate interface implemented from this object

The client discovers theappropriate interface implemented from this object

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110044

3. DII

ClientServer

ServerServer

The client creates a request object, which encapsulates a invocation of a operation on the servers interface.

The client creates a request object, which encapsulates a invocation of a operation on the servers interface.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110055

3. DII

ClientServer

ServerServer

The client invokes the request.

The client invokes the request.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110066

3. DII

ClientServer

ServerServer

The client invokes the request.

The client invokes the request.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110077

3. DII

ClientServer

ServerServer

The client invokes the request.

The client invokes the request.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110088

3. DII

ClientServer

ServerServer

The client obtains a resultif necessary.

The client obtains a resultif necessary.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

110099

3. DII

ClientServer

ServerServer

The client obtains a resultif necessary.

The client obtains a resultif necessary.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

111100

3. DII

ClientServer

ServerServer

The client obtains a resultif necessary.

The client obtains a resultif necessary.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

111111

3. DII

ClientServerServerServer

This scenario can be usedas many times as necessary.The request object and all other object can be reused.This has potential to boost upperformance.

This scenario can be usedas many times as necessary.The request object and all other object can be reused.This has potential to boost upperformance.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

111122

3. DII

ClientServerServerServer

Requests can be sent in a deferred style. These request does not block the client in expectation for a result. The result can be obtained later, when ready and/or when needed.

Requests can be sent in a deferred style. These request does not block the client in expectation for a result. The result can be obtained later, when ready and/or when needed.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

111133

3. DII

ClientServerServerServer

Requests can be sent in a oneway style. These request does not block the client in expectation for a result. There is no result.These invocation are very useful sometimes when the clientwants to announce something tothe server object but no result and no waiting for completionof the invocation is needed.

Requests can be sent in a oneway style. These request does not block the client in expectation for a result. There is no result.These invocation are very useful sometimes when the clientwants to announce something tothe server object but no result and no waiting for completionof the invocation is needed.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

111144

4. DSI

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

111155

4. DSI

Client

Server

Dynamic Skeleton Interface is the Server side analog ofthe DII scheme.

Dynamic Skeleton Interface is the Server side analog ofthe DII scheme.

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

111166

4. DSI

Client

Server

Each DSI request enters the particular interface the same wayas the static. The difference is that the implementation has to dynamically determine which operation has been invokedand demarshal the parameters.

Each DSI request enters the particular interface the same wayas the static. The difference is that the implementation has to dynamically determine which operation has been invokedand demarshal the parameters.

Request

IR

Domain BDomain A

CORBAAdvanced Topics

1998 CTIT, Nikolay Diakov

111177

4. DSI - Usage

The DSI is mainly used in implementation of software bridges for Interoperability. It is naturally and easy through DSI to translate all request of one type to another domain.

The DSI is mainly used in implementation of software bridges for Interoperability. It is naturally and easy through DSI to translate all request of one type to another domain.

ORB1ORB2

Client ServerBridge

DSI