You are on page 1of 55

CORBA Asynchronous

Messaging

Bill
Bill Binko
Binko
The
The Technical
Technical Resource
Resource Connection
Connection
cwbinko@trcinc.com
cwbinko@trcinc.com

Presentation Preview
The Technical Resource Connection
www.trcinc.com

CORBA Messaging
Messaging Overview
Overview
CORBA

Asynchronous Method
Method Invocation
Invocation (AMI)
(AMI)
Asynchronous

Time Independent
Independent Invocation
Invocation (TII)
(TII)
Time

QoS Framework
Framework Overview
Overview
QoS

MOM
MOM

Product
Product Integration
Integration Strategies
Strategies

Miscellaneous Issues
Issues
Miscellaneous

Open Discussion
Discussion and
and Q/A
Q/A
Open

Messaging Overview
The Technical Resource Connection
www.trcinc.com

CORBA Messaging
Messaging isis an
an integral
integral part
part ofof
CORBA

version
version 2.4
2.4 ofof CORBA
CORBA

Provides strongly
strongly typed
typed asynchronous
asynchronous
Provides
communications
communications

Adds support
support for
for such
such QoS
QoS as
as store-andstore-and Adds
forward
forward and
and priority
priority delivery
delivery

Allows administrative
administrative routing
routing ofof requests
requests
Allows

The Technical Resource Connection


www.trcinc.com

Background
RPC Vs. MOM

CORBA originally
originally based
based on
on RPC
RPC systems
systems
CORBA
Generated
GeneratedStubs/Skeletons
Stubs/Skeletonsprovide
providenetworking
networkingsupport
support
IDL
IDLCompiler
Compilerhandles
handlesconverting
convertingthe
theinvocations
invocations
parameters
parametersand
andreturn
returnvalue
valueinto
intoremote
remoterequest/reply
request/reply
messages
messages

Remote calls
calls look
look like
like local
local calls
calls (Location
(Location
Remote

Transparency)
Transparency)

Provides Compile-Time
Compile-Time Error
Error Checking
Checking
Provides

Request
Requestand
andReply
ReplyMessages
Messageswill
willalways
alwaysbe
beinincorrect
correct
form
form(syntax,
(syntax,not
notsemantics)
semantics)

The Technical Resource Connection


www.trcinc.com

Background
RPC Vs. MOM

CORBAs RPC
RPC Issues
Issues
CORBAs
Forces
Forcesaastrict
strictrequest/reply
request/replysequence
sequence(Blocking)
(Blocking)
Very
VeryConnection-oriented
Connection-oriented
Tight
TightCoupling
Coupling(At
(Atseveral
severallevels)
levels)
Client
Application

Implementation
(Servant)

Client ORB

Server
ORB
REQUEST
(GIOP) Connection
REPLY

The Technical Resource Connection


www.trcinc.com

Background
RPC Vs. MOM

Message Oriented
Oriented Middleware
Middleware products
products use
use
Message

messages
messages and
and queues
queues

Allows
Allowsdecoupling
decouplingofofsender/receiver
sender/receiver
Allows
Allowsadministration
administrationofofrouting
routingand
andQoS
QoS
Provides
Provideslittle/no
little/notype
typesafety
safety

Request and
and Replies
Replies are
are independently
independently
Request

targeted
targeted

Messages are
are self-contained
self-contained
Messages

Contain
Containall
allinformation
informationneeded
neededfor
fordeliver
deliverand
andexecution
execution
Are
Areoften
oftenmeaningful
meaningfulwithout
withoutthe
theoriginators
originatorspresence
presence

The Technical Resource Connection


www.trcinc.com

Background
RPC Vs. MOM

Does NOT
NOT look
look like
like local
local calls
calls
Does
Messages
Messagesare
arebuilt
builtby
byhand
handand
andgiven
giventotothe
theMOM
MOM
interface
interface
XML
XMLBecoming
Becomingstandard
standardformat
formatfor
forMessages
Messages(JAXM,
(JAXM,
BizTalk,
BizTalk,etc.)
etc.)
Client
Application
Read/
Receive

Server
Application
Read/
Recieve

Send
Request

MOM Interface

MOM Interface

MOM Product
Queue
4

Send
Reply

Connection

Queue

Queue

Connection

Queue

The Technical Resource Connection


www.trcinc.com

Background
RPC Vs. MOM

Typing discussion
discussion
Typing

The Technical Resource Connection


www.trcinc.com

Background Messaging
Goals

Provide some
some ofof the
the benefits
benefits ofof MOM
MOM
Provide
QoS
QoSsuch
suchas
asstore/forward,
store/forward,priority,
priority,etc.
etc.
Administrative
Administrativerouting
routing
Disconnected
Disconnectedclients/servers
clients/servers
No
NoP&S
P&Setc.
etc.(Notification
(Notificationcovers
coversthat)
that)

Maintain type-safety
type-safety
Maintain

Interoperate with
with existing
existing CORBA
CORBA servers
servers
Interoperate

Client-only changes
changes (except
(except for
for OTS
OTS Calls)
Calls)
Client-only

The Technical Resource Connection


www.trcinc.com

Background:
Messaging QoS

Priority:
Priority:Controls
Controlsthe
theRequest
RequestPriority
Prioritywhile
whileininQueues
Queues
Timing:
Timing:Controls
Controlsvarious
varioustimeout
timeoutaspects
aspects
Request
RequestStart
StartTime,
Time,Timeout
Timeout
Reply
ReplyStart
StartTime,
Time,Timeout
Timeout
Round-Trip
Round-TripTimeout,
Timeout,etc.
etc.
Routing:
Routing:Controls
ControlsForwarding
Forwardingor
orStore/Forwarding
Store/Forwarding
Max
MaxHops:
Hops:Sets
Setsmax
maxhops
hopsbefore
beforerequest
requestdies
dies
Ordering:
Ordering:Sets
Setspriority/temporal/deadline
priority/temporal/deadlinesorting
sortinginin
queue
queue

The Technical Resource Connection


www.trcinc.com

Usage Scenario:
Client Disconnection
Find
FindItem
Item
MarketOrder
MarketOrder

Buyers
Buyers

Price,
Price,etc.
etc.

Exchange
Exchange

The Technical Resource Connection


www.trcinc.com

Usage Scenario:
Client Disconnection
Order
OrderEntry
Entry
File
View
File View Options
Options Window
Window Help
Help
NYSE
NYSE
AMZN
AMZN
DELL
DELL
GE
GE
IBM
IBM
ETC
ETC

CBOE
CBOE NASD
NASD

134
134
76
763/4
3/4
80
80
83
83
10
101/2
1/2

Symbol: AMZN
Symbol: AMZN
Quantity: 1000
Quantity: 1000
Price/Share 135
Price/Share 135
Order
Order Type Limit
Order Type Limit Order

Submit
Submit
Order Id
Order Id
OID3958
OID3958
OID35682
OID35682

Security
Security
ORCL
ORCL
MSFT
MSFT

Req. Qty/$
Req. Qty/$
100/$5
100/$5
500/$52
500/$52

Qty/$
Qty/$
N/A
N/A
500/$52 1/2
500/$52 1/2

Status
Status
Pending
Pending
Complete
Complete

The Technical Resource Connection


www.trcinc.com

Usage Scenario:
Client Disconnection
Find
FindItem
Item
MarketOrder
MarketOrder
Queue
Queue

Exchange
Exchange
Queue
Queue

Price,
Price,etc.
etc.

Buyers
Storage
BuyersPersistent
Persistent Storage

Persistent Storage
Persistent Storage

The Technical Resource Connection


www.trcinc.com

Usage Scenario:
Enhanced QoS
Find
FindItem
Item
MarketOrder
MarketOrder
Queue
Queue

Exchange
Exchange
Queue
Queue

Price,
Price,etc.
etc.

Buyers
Storage
BuyersPersistent
Persistent Storage

Delivery Window
Delivery Window
Persistent Storage
Persistent Storage

The Technical Resource Connection


www.trcinc.com

Usage Scenario:
Routing Negotiations
Seller
Seller

Exchange
Exchange
Secure Link
Secure Link

Secure Link
Secure Link
Negotiate
Negotiate

Buyers
Buyers

The Technical Resource Connection


www.trcinc.com

Usage Scenario:
Routing Negotiations
Seller
Seller

B-B
B-BParts
PartsExchange
Exchange
Secure Link
Secure Link
Negotiate
Negotiate
Queue
Queue

Secure Link
Secure Link
Negotiate
Negotiate

Buyers
Buyers

The Technical Resource Connection


www.trcinc.com

HTTP
HTTP

SMTP
SMTP

Usage Scenario:
Registration (AMI)
Registration
Registration
Servlet
Servlet

Notification
Notification
System
System

register
register

Verify
Verify
Info
Info
Credit
Credit
Check
Check

result
result
Certificate
Certificate
Authority
Authority

Database
Database

Background Problems
The Technical Resource Connection
www.trcinc.com

GIOP (CORBAs
(CORBAs transport
transport protocol)
protocol) isis very
very
GIOP

request/reply
request/reply oriented
oriented

GIOP Reply
Reply message
message has
has no
no destination
destination field
field
GIOP
(cannot
(cannot be
be routed)
routed)

Clients have
have no
no identity
identity inin CORBA
CORBA
Clients

Users need
need an
an alternative
alternative toto normal
normal call
call
Users
semantics
semantics

Background Problems
The Technical Resource Connection
www.trcinc.com

Blocking Calls

IDL
IDL
interface
interface AA {{
long
long f(in
f(in float
float a,
a, out
out float
float b,
b, inout
inout float
float c);
c);
};
};

Java
Java
AA ref
ref == AHelper.narrow(someObjRef);
AHelper.narrow(someObjRef);
FloatHolder
FloatHolder bH
bH == new
new FloatHolder();
FloatHolder();
FloatHolder
FloatHolder cH
cH == new
new FloatHolder(1.2);
FloatHolder(1.2);
int
int result
result == ref.f(2.0,bH,cH);
ref.f(2.0,bH,cH);
//use
//use result,
result, bH,
bH, cH
cH

Background Approach
The Technical Resource Connection
www.trcinc.com

Decouple Request/Reply
Request/Reply atat App
App Level
Level
Decouple
AMI:
AMI:New
Newinvocation
invocationinterface
interface(peer
(peertotoSII
SIIand
andDII)
DII)
Allows
Allowstyped
typedasynchronous
asynchronouscalls
calls(via
(viaCallbacks/Polling)
Callbacks/Polling)

Decouple Request/Reply
Request/Reply atat Wire
Wire Level
Level
Decouple
Specify
SpecifyRouter
RouterInterfaces
Interfaces(TII)
(TII)
Wraps
WrapsGIOP
GIOPRequest/Reply
Request/ReplyininRoutable
RoutableMessages
Messages
Allows
AllowsMOM-type
MOM-typequeuing/routing
queuing/routingofofGIOP-level
GIOP-level
messages
messages

Extensible QoS
QoS Policy
Policy Framework
Framework
Extensible
Provides
Providescontrol
controlover
overthe
thesystem
system

The Technical Resource Connection


www.trcinc.com

AMI: Asynchronous
Method Invocation

Allows the
the ORB
ORB toto separate
separate aa request
request from
from its
its
Allows

reply
reply inin aa type-safe
type-safe manner
manner

Two models:
models: Callback
Callback and
and Polling
Polling
Two

Both rely
rely on
on the
the IDL
IDL compiler
compiler for
for support
support
Both
(special
(special AMI
AMI stubs)
stubs)

Like SII/DII
SII/DII client-side
client-side only:
only: server
server cant
cant tell
tell
Like
which
which interface
interface isis used
used
When
Whenused
usedwith
withTII,
TII,Transactional
TransactionalServers
Serversmust
mustknow
know
about
aboutitit(more
(moreon
onthat
thatlater)
later)

AMI Comparison
The Technical Resource Connection
www.trcinc.com

For comparison,
comparison, we
we will
will go
go over
over all
all ofof the
the
For

available
available invocation
invocation interfaces:
interfaces:
(Normal)
(Normal)Synchronous
SynchronousCall
Call
Oneway
OnewayCall
Call
Deferred
DeferredSynchronous
SynchronousCall
Call
Asynchronous
AsynchronousCall
Call(new)
(new)

Disclaimer:
Disclaimer:These
Theseare
aretypical
typicalcall-paths
call-pathsand
andare
arenot
not

complete.
complete.They
Theyare
aresolely
solelyfor
forillustration.
illustration.

The Technical Resource Connection


www.trcinc.com

AMI Comparison: SII


Synchronous Call

IDL
IDL
interface
interface AA {{
long
long f(in
f(in float
float a,
a, out
out float
float b,
b, inout
inout float
float c);
c);
};
};

Java (C++,
Java
(C++,C,
C,Smalltalk,
Smalltalk,Perl,
Perl,COBOL,
COBOL,Others
OthersAvailable)
Available)
AA ref
ref == AHelper.narrow(someObjRef);
AHelper.narrow(someObjRef);
FloatHolder
FloatHolder bH
bH == new
new FloatHolder();
FloatHolder();
FloatHolder
FloatHolder cH
cH == new
new FloatHolder(1.2);
FloatHolder(1.2);
int
int result
result == ref.f(2.0,bH,cH);
ref.f(2.0,bH,cH);
//use
//use result,
result, bH,
bH, cH
cH

AMI Comparison: SII


Synchronous Call

The Technical Resource Connection


www.trcinc.com

Cli en t
Code

16: Return

Servant

10: Normal Call


1: Normal Call (wait)
3: Ma rs hal Param s

Generated
Stub

8: invo ke

Request

Generated
Skeleton

Obj Adap ter


(POA)

15: Unmarshal Results

9: Unmarshal Params

4: Send Request (wait)

11: Marshal Results

7: Deliver

2: Crea te Req ues t

12: Send Reply

Server
Request

14: Update w/Results (#4 wakes)


6: Crea te

5: Send Data (IIOP/GIOP/other) (wait)


C

l ie
O

Server
ORB

n t
B

13: Send Reply Data (#5 wakes)

The Technical Resource Connection


www.trcinc.com

AMI Comparison:
Oneway Call

IDL
IDL
interface
interface AA {{
oneway
oneway void
void g(in
g(in float
float a);
a);
};
};

Java
Java
AA ref
ref == AHelper.narrow(someObjRef);
AHelper.narrow(someObjRef);
//
// maybe
maybe set
set SYNC_SCOPE
SYNC_SCOPE on
on ref
ref
ref.g(2.0);
ref.g(2.0);

AMI Comparison: SII


Oneway Call

The Technical Resource Connection


www.trcinc.com

Servant
Client
Code
1: Normal Call (wait)

10: Normal Call


SYNC_TARGET

Generated
Stub

8: invoke
3: Marshal Params
R

q u e

Obj Adapter
(POA)

9: Unmarshal Params

2: Create Request
4: Send Request (wait?)

Server
Request

7: Deliver

SYNC_SERVER

6: Create

SYNC_NONE

5: Send Dat a (IIOP/GIOP/ other)


C

l ie
O

n t
B

Generat ed
Skeleton

SYNC_TRANSPORT

e
O

r ve
R

The Technical Resource Connection


www.trcinc.com

AMI Comparison: DII


Deferred Sync Call

IDL
IDL
interface
interface AA {{
long
long h(in
h(in float
float a);
a);
};
};

Java
Java
org.omg.CORBA.Request
org.omg.CORBA.Request rr == someObjRef._request(h);
someObjRef._request(h);
r.set_return_type(
r.set_return_type(
_orb().get_primitive_tc(TCKind.tk_long));
_orb().get_primitive_tc(TCKind.tk_long));
Any
Any ss == r.add_in_arg();
r.add_in_arg();
s.insert_float(2.0);
s.insert_float(2.0);
r.send_deferred();
r.send_deferred(); //Can
//Can do
do other
other stuff
stuff here
here
r.get_response();
r.get_response(); //will
//will wait
wait for
for result
result
int
int result
result == r.return_value().extract_long();
r.return_value().extract_long();
//use
//use result
result

The Technical Resource Connection


www.trcinc.com

AMI Comparison: DII


Deferred Sync Call
User DII
Code

Servant
2: Marshal Params
9: Normal Call
7: invoke

14: (opt.)Get Results


Request

1: Create Request

Generated
Skeleton
8: Unmarshal Params

Obj Adapter
(POA)

10: Marshal Results

3: Send Request (Don't Wait)


6: Deliver

11: Send Reply

13: Update w/Results

5: Create

4: Send Data (IIOP/GIOP/other) (wait)


Client
ORB

Server
ORB
12: Send Reply Dat a (#5 wakes)

Server
Request

The Technical Resource Connection


www.trcinc.com

AMI Comparison: Async


Polling Model (new)

IDL
IDL
interface
interface AA {{
long
long f(in
f(in float
float a,
a, out
out float
float b,
b, inout
inout float
float c);
c);
};
};

Java
Java
AA ref
ref == AHelper.narrow(someObjRef);
AHelper.narrow(someObjRef);
//ref
//ref is
is actually
actually aa stub
stub
//only
//only pass
pass in/inout
in/inout params
params
AMI_APoller
AMI_APoller poller
poller == ref.sendp_f(2.0,1.2);
ref.sendp_f(2.0,1.2);
//Can
//Can do
do other
other stuff
stuff
FloatHolder
FloatHolder bh
bh == new
new FloatHolder();
FloatHolder();
FloatHolder
FloatHolder ch
ch == new
new FloatHolder();
FloatHolder();
int
int result
result == poller.f(/*timeout*/-1,bh,ch);
poller.f(/*timeout*/-1,bh,ch);
//Can
//Can use
use result,
result, b,
b, cc

The Technical Resource Connection


www.trcinc.com

AMI Comparison: Async


Polling Model (new)
Client
Code
1: Sendp call

11: get result s


Type Specific
Poller

13: return results/error

5: create wrapper for request


6: return poller
12: unmarshal results
Generated
AMI Stub

3: Marshal Params
Request
8: Normal Server Processing

2: Create Request
4: Send Request

10: update w/results


7: Send GIOP Request

e
O

Client
ORB

9: Send GIOP Reply

r v e
R

The Technical Resource Connection


www.trcinc.com

AMI Comparison: Async


Callback (new)

IDL
IDL
interface
interface AA {{
long
long f(in
f(in float
float a,
a, out
out float
float b,
b, inout
inout float
float c);
c);
};
};

Java
Java
AA ref
ref == AHelper.narrow(someObjRef);
AHelper.narrow(someObjRef);
//ref
//ref is
is actually
actually aa stub
stub
//create
//create handler
handler (implicit
(implicit act.
act. On
On root
root POA)
POA)
AHandler_impl
AHandler_impl handler
handler == new
new AHandler_Impl();
AHandler_Impl();
//only
//only pass
pass in/inout
in/inout params
params
ref.sendc_f(handler._this(),
ref.sendc_f(handler._this(), 2.0,1.2);
2.0,1.2);
//handlers
//handlers f()
f() method
method will
will be
be called
called
//back
//back w/
w/ inout/out/retval
inout/out/retval

The Technical Resource Connection


www.trcinc.com

AMI Comparison: AMI


Callback Implied IDL

IDL
IDL
interface
interface AA {{
long
long f(in
f(in float
float a,
a, out
out float
float b,
b, inout
inout float
float c);
c);
};
};

Implied Callback
Callback IDL
IDL
Implied
interface
interface AMI_AHandler
AMI_AHandler {{
f(in
f(in int
int retVal,
retVal, in
in float
float b,
b, in
in float
float c);
c);
f_excep(in
f_excep(in AMI_AExceptionHolder
AMI_AExceptionHolder holder);
holder);
};
};

The Technical Resource Connection


www.trcinc.com

AMI Comparison: AMI


Callback Implementation

Java Callback
Callback Implementation
Implementation
Java
public
public class
class AHandler_Impl
AHandler_Impl extends
extends
POA_AMI_AReplyHandler
{
POA_AMI_AReplyHandler {
public
public void
void f(int
f(int retVal,
retVal, float
float b,
b, float
float c){
c){
//use
//use values
values
};
};
public
public void
void f_excep(AMI_AExceptionHolder
f_excep(AMI_AExceptionHolder holder)
holder)
{{
//handle
//handle exception
exception on
on f()
f() call
call
System.err.println(It
System.err.println(It Failed:
Failed: ++ holder);
holder);
};
};
};
};

The Technical Resource Connection


www.trcinc.com

AMI Comparison: Async


Callback (new)
Client
Code

Reply
Handler

1: Sendc call with RH Reference


Generated
AMI Stub

10: invoke RH Method

3: Marshal Params

Unmarshalling
not shown

Request
Note client continues
execution here

2: Create Request

Obj Adapter
(POA)

4: Send Request as Async w/RH

8: Convert Reply to RH Request

9: deliver

6: Normal Server Processing

5: Send GIOP Request


C

l ie

Server
ORB

7: Send GIOP Reply

Results of AMI?
The Technical Resource Connection
www.trcinc.com

Part One
One Complete:
Complete: Application
Application Code
Code now
now
Part

uses
uses decoupled
decoupled requests
requests and
and replies
replies

Users ofof Deferred


Deferred Sync
Sync now
now have
have aa typed
typed
Users
interface
interface (actually
(actually two
two polling/callback)
polling/callback)

Callbacks can
can be
be used
used on
on existing
existing servers
servers
Callbacks
(a
(a big
big plus!)
plus!) without
without IDL
IDL change
change

Ready toto decouple


decouple the
the wire
wire protocol
protocol via
via
Ready
Routers
Routers

AMI Questions?
The Technical Resource Connection
www.trcinc.com

AMI Review
The Technical Resource Connection
www.trcinc.com

Part One
One Complete:
Complete: Application
Application Code
Code now
now
Part

uses
uses decoupled
decoupled requests
requests and
and replies
replies

Users ofof Deferred


Deferred Sync
Sync now
now have
have aa typed
typed
Users
interface
interface (actually
(actually two
two polling/callback)
polling/callback)

Callbacks can
can be
be used
used on
on existing
existing servers
servers
Callbacks
(a
(a big
big plus!)
plus!) without
without IDL
IDL change
change

Ready toto decouple


decouple the
the wire
wire protocol
protocol via
via
Ready
Routers
Routers

TII & Routers Overview


The Technical Resource Connection
www.trcinc.com

TII == Time
Time Independent
Independent Invocation
Invocation
TII
Second
Second(Optional)
(Optional)section
sectionofofMessaging
Messaging
Consists
ConsistsofofInteroperable
InteroperableRouting
RoutingProtocol
Protocol
Defines
DefinesCORBA
CORBAMessaging
MessagingRouter
RouterInterfaces
Interfacesfor
forMOM
MOM
Products
Products(or
(ornative
nativeMOM
MOMimplementations)
implementations)

Even with
with AMI,
AMI, connections
connections between
between Clients
Clients
Even

and
and Servers
Servers must
must be
be maintained
maintained due
due toto the
the
RPC
RPC nature
nature ofof CORBAs
CORBAs transport
transport (GIOP)
(GIOP)

TII Overview
The Technical Resource Connection
www.trcinc.com

Messaging uses
uses Routers
Routers toto move
move
Messaging

Requests/Replies
Requests/Replies as
as first-class
first-class messages
messages
Client
ClientORB
ORBwraps
wrapsRequest
RequestininaaMessage
Messageand
andsends
sendsitittoto
the
theInitial
InitialRouter
Router
Target
TargetRouter
Routermakes
makesGIOP
GIOPcall
callon
onserver
server
Reply
Replyisisrouted
routedas
asaawrapped
wrappedRequest
Request

TII - The Initial Router


The Technical Resource Connection
www.trcinc.com

(Callback Interface)

Initial Routers
Routers Accept
Accept wrapped
wrapped Requests
Requests
Initial
Client
ClientORB
ORBdetermines
determinesInit.
Init.Router
Routerand
andwhether
whethertotouse
use
TII
TIIfrom
fromIOR
IORand
andPolicies
Policies
Client
ClientORB
ORBpasses
passesReplyHandler
ReplyHandlerfor
forreturn
returncall
call
Client
Application

Checks Policies:
determines to use
TII

sendc_f(ReplyHandler, params)

Stub

sendc(ReplyHandler, Request)

Client ORB

send_request(RequestInfo)

Initial Router

TII - The Initial Router


The Technical Resource Connection
www.trcinc.com

(Polling Interface)

Initial Routers
Routers Hold
Hold ReplyHandlers
ReplyHandlers For
For Pollers
Pollers
Initial
Client
ClientORB
ORBcreates
createsPollers
Pollersthat
thatquery
queryPersistentRequest
PersistentRequest
interface
interfacefor
forresults
results
Client
Clientcan
candisconnect
disconnectsince
sinceReplyHander
ReplyHanderisisininRouter
Router
Client
Application

poller = sendp_f(params)

result = f()
getReply()

PersistentRequest/
ReplyHandler

Initial Router

Poller
creates

Stub

Client ORB
poller = sendp(Request)

create_persistent_request()

TII: Simplest Case


The Technical Resource Connection
www.trcinc.com

One Router
Router isis Initial
Initial and
and Target
Target Router
Router
One
Accepts
AcceptsWrapped
WrappedRequests
Requests
Invokes
InvokesServer
Server
Converts
ConvertsReply
ReplytotoRequest
Request
Invokes
InvokesReplyHandler
ReplyHandler
Client
Application

Implementation
(Servant)

Client ORB

Server
ORB

RequestInfo

ReplyHandler
Request

Initial/Target
Router

REQUEST

GIOP Connection
REPLY

TII RequestInfo Structs


The Technical Resource Connection
www.trcinc.com

RequestInfo structs
structs holds:
holds:
RequestInfo
Original
OriginalRequest
RequestInfo
Info(needed
(neededtotoinvoke
invokethe
therequest)
request)
QoS
QoSinfo
info
ReplyHandler
ReplyHandler
QoS Info
Routing Info
ReplyHandler IOR
GIOP Request

RequestInfo Message is
passed among Routers until
Target is invoked

TII Benefits
The Technical Resource Connection
www.trcinc.com

With Request/Reply
Request/Reply as
as First
First Class
Class Messages,
Messages,
With

most
most MOM
MOM QoS
QoS can
can work.
work.

Administrators can
can modify
modify routing,
routing, etc.
etc.
Administrators
Client
Application

Implementation
(Servant)

Client ORB
RequestInfo

Standard GIOP
calls between
Routers

Server
ORB
REQUEST

Router 1

Router 2

Router 3

GIOP Connection
REPLY

ReplyHandler
Request

Persistent Storage

Persistent Storage

Persistent Storage

The Technical Resource Connection


www.trcinc.com

AMI TII:
Changes Needed

Almost none!
none!
Almost

Only need
need toto set
set the
the Routing
Routing Policy
Policy from
from
Only
ROUTE_NONE
to ROUTE_FORWARD
or
ROUTE_NONE to
ROUTE_FORWARD or
ROUTE_STORE_FORWARD
ROUTE_STORE_FORWARD

Configure Client
Client ORB
ORB toto use
use Init.
Init. Router
Router
Configure

Optionally set
set RoutingList
RoutingList hints
hints on
on server
server
Optionally

No other
other changes
changes toto code
code are
are necessary.
necessary.
No

TII: TII Call Processing


The Technical Resource Connection
www.trcinc.com
Client
Cod e

Reply
Handler

9: Norm al Server Processing


1: Sendc call with RH Reference

16: in voke RH me thod


Unmarshalling
not shown

3: Marshal P arams
Ge nerat ed
AMI Stub

RH Obj Adapter
(POA)

Reques t

r v e

8: Send GIOP Request

Note client continues


execution here

2: Create Request

10: Send GIOP Reply


4: Send Request as Async w/RH

15: deliver

11: Convert Reply to RequestMessage

Client
ORB

RH ORB

Router n

14: Send GIOP Request


5: Send RequestMessage

7: Send RequestMessage
12: Send RequestMessage
6: Send RM
Router 1

Router 2
13: SendRM

The Technical Resource Connection


www.trcinc.com

QoS Framework:
Overview

Provides mechanism
mechanism for
for application
application toto control
control
Provides

the
the Messaging
Messaging System
System

Uses Policy
Policy interface
interface already
already inin place
place
Uses

Is set
set atat various
various points:
points:
Is
Default
DefaultatatPOA
POA(Server
(ServerSide)
Side)
Client
ClientORB
ORB(Client
(ClientSide)
Side)
Current
CurrentThread
Thread(Client
(ClientSide)
Side)
Object
ObjectRef
Ref(Client
(ClientSide)
Side)

The Technical Resource Connection


www.trcinc.com

QoS Framework:
Messaging QoS Menu

Priority:
Priority:Controls
Controlsthe
theRequest
RequestPriority
Prioritywhile
whileininQueues
Queues
Timing:
Timing:Controls
Controlsvarious
varioustimeout
timeoutaspects
aspects
Request
RequestStart
StartTime,
Time,Timeout
Timeout
Reply
ReplyStart
StartTime,
Time,Timeout
Timeout
Round-Trip
Round-TripTimeout,
Timeout,etc.
etc.
Routing:
Routing:Controls
ControlsForwarding
ForwardingororStore/Forwarding
Store/Forwarding
Max
MaxHops:
Hops:Sets
Setsmax
maxhops
hopsbefore
beforerequest
requestdies
dies
Ordering:
Ordering:Sets
Setspriority/temporal/deadline
priority/temporal/deadlinesorting
sortinginin
queue
queue

MOM Integration:
Wrapping MOM Product

The Technical Resource Connection


www.trcinc.com

Client
Application

Implementation
(Servant)

MOM-Specific
Interface

Client ORB

Server
ORB

RequestInfo

Router 1
ReplyHandler
Request

Persistent Storage

MOM
Product

REQUEST

Router 3

GIOP Connection
REPLY

Persistent Storage

MOM Integration:
Wrapping JMS Product

The Technical Resource Connection


www.trcinc.com

Client
Application

Implementation
(Servant)

JMS Interface

Client ORB

Server
ORB

RequestInfo

Router 1
ReplyHandler
Request

Persistent Storage

JMS
Product

REQUEST

Router 3

GIOP Connection
REPLY

Persistent Storage

The Technical Resource Connection


www.trcinc.com

MOM Integration:
MOM Supports TII

Client
Application

Standard GIOP
calls into Router
Interface

Client ORB

Implementation
(Servant)
Standard GIOP
calls into Server
Server
ORB

MOM
Product

IIOP
Invoker

Router

RequestInfo
REQUEST
GIOP Connection
REPLY

ReplyHandler
Request

MOM Product
MOM Queue

MOM
Protocol

MOM Queue

MOM
Protocol

MOM Queue

Internal Routing
MOM-Specific

The Technical Resource Connection


www.trcinc.com

MOM Integration:
MOM Bridges TII

Client
Application

Standard GIOP
calls into Router
Interface

Client ORB

Implementation
Standard SOAP
calls into Server
SOAP SERVER

MOM
Product

XML/
SOAP
Invoker

Router

RequestInfo
REQUEST

HTTP Connection
REPLY

ReplyHandler
Request

MOM Product
MOM Queue

MOM
Protocol

GIOP/SOAP
Converter

MOM
Protocol

MOM Queue
Internal Routing
MOM-Specific

Misc Issues
The Technical Resource Connection
www.trcinc.com

AMI does
does not
not effect
effect OTS:
OTS: ItIt works
works fine
fine
AMI

TII inherently
inherently breaks
breaks OTS
OTS
TII

Disconnected client
client cannot
cannot participate
participate inin 2PC
2PC
Disconnected

New Transaction
Transaction Mode:
Mode: Unshared
Unshared
New
New
NewTransaction
TransactionEach
EachHop
Hop
Used
Usedfor
forSTORE_AND_FORWARD
STORE_AND_FORWARDand
andexisting
existingservers
servers
that
thatrequire
requireaatransaction
transactioncontext
context
OTS-aware
OTS-awareServers
Serverscan
cansay
saywhether
whetherthey
theywill
willparticipate
participate
ininUnshared
UnsharedTransaction
Transaction

The Technical Resource Connection


www.trcinc.com

Unshared Transaction
Example

Client
Application

Implementation
(Servant)

Client ORB
RequestInfo

Standard GIOP
calls between
Routers

Server
ORB
REQUEST

Router 1

Router 2

Router 3

GIOP Connection
REPLY

ReplyHandler
Request

Persistent Storage

Persistent Storage

Persistent Storage

Availability
The Technical Resource Connection
www.trcinc.com

Part ofof CORBA


CORBA 2.4
2.4
Part

Currently inin development


development by
by major
major vendors
vendors
Currently

and
and third
third parties
parties

RTF complete:
complete: issues
issues rolled
rolled into
into ORB
ORB
RTF
Revision
Revision
Specification
SpecificationDoc:
Doc:orbos/98-05-06
orbos/98-05-06
RTF
RTFOutput
Outputisisavailable
available

You might also like