1 Louis St. , y Universit ashington W

patterns and onents, comp

E E R R O O T T S S

E E G G A A M M I I ) ) , , , , ( ( R R C C R R M M T T C

rks, o framew re, a Middlew { C

L L A A R R T T N N E E C C

S S E E I I T T I I L L A A D D O O M M

Solutions 

E E R R O O T T S S

N N A A L

y complexit L

E E G G A A M M I I M M T T A A

R R E E T T S S U U L L C C

inherent and Accidental {

N N A A M M

M M T T A A

rits Culp 

S S N N O O I I T T A A T T S

x ensive exp re mo S

C C I I T T S S O O N N G G A A I I D D

er, w slo rger, la gets re a w Soft { N N A A L L

M M T T A A

ha er cheap faster,

smaller, gets re a rdw Ha {

E E R R O O T T S S

E E G G A A M M I I

X X D D

Symptoms 

Crisis re a w Soft Distributed the Motivation:

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

rint Sp and ZT, Siemens MED, Siemens SCR, Siemens

SAIC, OTI, NSF, rola, Moto Lucent,

odak, Ko A, ARP D CDI, eing, Bo re, Bellco

rs onso Sp

O4.ps.gz A schmidt/T  www.cs.wustl.edu/

Louis St. , y Universit ashington W

[email protected]

Schmidt C. Douglas

ers Brok Request Object CORBA Real-time

Using and Developing r fo atterns P Design 3 Louis St. , y Universit ashington W

oponents comp and ARCHITECTURE ARCHITECTURE

) ) ( ( APPLICATION FRAMEWORK FRAMEWORK APPLICATION APPLICATION B B

patterns related of amilies F 

DATABASE DATABASE

ADT ADT S Architecture { S

LOOP LOOP

context

LOGIC LOGIC EVENT EVENT

BACKS BACKS

SPECIFIC SPECIFIC

INVOKES INVOKES CALL CALL

APPLICATION a in pairs Problem/solution  APPLICATION

INTERFACE INTERFACE

MATH

atterns P { MATH

USER USER NETWORKING NETWORKING

applications

ARCHITECTURE ARCHITECTURE

\semi-complete" Reusable,  ) ) ( ( CLASS LIBRARY LIBRARY CLASS CLASS A A

rks o ramew F {

BASE BASE

LOOP LOOP

INTERFACE INTERFACE

DATA ADTs DATA

EVENT EVENT USER USER

\pluggable" Self-contained, 

ADT ADT S S

INVOKES INVOKES

MATH MATH LOGIC LOGIC

SPECIFIC oponents Comp { SPECIFIC

APPLICATION APPLICATION

NETWORKING NETWORKING

solutions Proven 

y ductivit Pro and y Qualit

re a w Soft roving Imp r fo echniques T

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

2 Louis St. , y Universit ashington W

ARCHITECTURE ARCHITECTURE APPLICATION APPLICATION DISTRIBUTED DISTRIBUTED (2) (2)

YSTEM S FILE PRINTER

re-invention Continuous { CD ROM CD

eoposition decomp

SERVICE

PRINT

rithmic Algo {

SERVICE ools to debugging r oo P { NETWORK FI LE FI

APIs w-level Lo {

SERVICE

DISPLAY

SERVICE

y Complexit Accidental  SERVICE

SERVICE

CYCLE NAME TIME

Ordering {

ARCHITECTURE ARCHITECTURE APPLICATION APPLICATION STAND-ALONE STAND-ALONE (1) (1)

rtitioning a P {

CD ROM CD

y Reliabilit { SYSTEM FILE

Latency {

COMPUTER COMPUTER

y complexit Inherent  PRINTER

Applications Distributed r fo y Complexit of Sources

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 5 Louis St. , y Universit ashington W

services

rba.html schmidt/co  www.cs.wustl.edu/

higher-level r fo

ORB- STANDARD PROTOCOL STANDARD INTERFACE SPECIFIC

foundation Provide {

MAPPING

STANDARD INTERFACE STANDARD LANGUAGE STANDARD INTERFACE STANDARD

handling r Erro 

Demultiplexing  CORE / IIOP GIOP ORB

rshaling ma

rameter a P 

ADAPTER INTERFACE

STUBS

DII ORB OBJECT

activation and IDL

SKELETON

DSI ocation lo Object  IDL

automating y b

distribution Simplify { value return + args out

SERVANT CLIENT operation()

CORBA of Goals  in args in

CORBA Solution: Candidate

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

4 Louis St. , y Universit ashington W

PEERS

STATION

GROUND LOCAL AREA NETWORK AREA LOCAL

rizontally ho and ertically V {

integrated be must Solutions  GATEWAY

DCE DCOM, CORBA, , e.g. { TRANSFER

COMMANDS

BULK DATA BULK

e ectively QoS rt o supp NETWORK WIDE AREA WIDE

oesn't do re a middlew Existing  STATUS INFO STATUS

WWW

avionics, telecom, , e.g. {

PEERS PEERS

rantees gua QoS

STATION STATION SATELLITES SATELLITES

TRACKING TRACKING

require applications Many 

re a Middlew Real-time r fo Motivation

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 7 Louis St. , y Universit ashington W

Mich.

O.html A schmidt/T  www.cs.wustl.edu/

U. at A ARMAD {

NETWORK NETWORK

NETWORK ADAPTERS NETWORK ADAPTERS ADAPTERS NETWORK NETWORK BBN at QuO { ADAPTERS NETWORK

- - - - SPEED SPEED HIGH HIGH SPEED SPEED HIGH HIGH

SUBSYSTEM SUBSYSTEM SUBSYSTEM SUBSYSTEM

rk o w Related  / / - - / / - - O O I I TIME TIME REAL REAL O O I I TIME TIME REAL REAL

OS KERNEL KERNEL OS OS OS KERNEL KERNEL OS OS

Win32 and POSIX,

CORE CORE ORB ORB

RIOP RTOSs, on Runs  RIOP

TIME -TIME REAL REAL-

rk o framew

ADAPTER ADAPTER

CE A the Leverages {

INTERFACE INTERFACE

STUBS STUBS

OBJECT OBJECT

S S Q Q ORB ORB

O O

RIDL RIDL

- - TIME TIME REAL

ocus fo avionics REAL

SKELETON SKELETON

RIDL RIDL

and elecom T 

ORB real-time

out args + return value return + args out

rmance, erfo high-p A { value return + args out

SERVANT SERVANT

CLIENT CLIENT

operation() operation()

in args in Overview O A T  args in

O A T ORB CE A The

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

6 Louis St. , y Universit ashington W

endsystem.ps.gz

schmidt/ORB-  www.cs.wustl.edu/

ORB- STANDARD PROTOCOL STANDARD INTERFACE SPECIFIC

optimizations

MAPPING

STANDARD INTERFACE STANDARD LANGUAGE STANDARD INTERFACE STANDARD

rmance erfo p of Lack {

features CORE / IIOP GIOP ORB

rogramming p

real-time of Lack {

ADAPTER INTERFACE

STUBS

DII ORB OBJECT

rcement enfo IDL

SKELETON

DSI QoS of Lack { IDL

peci cations sp

QoS of Lack { value return + args out

SERVANT CLIENT operation()

Limitations  in args in

Systems Real-time r fo CORBA of Limitations

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 9 Louis St. , y Universit ashington W

users.html

CE- schmidt/A  www.cs.wustl.edu/ {

www.riverace.com {

y communit user rge La 

commercially rted o Supp 

pSoS

etc. ek, rT Sto

LynxOS, rus, Cho rks, o VxW , e.g. {

Siemens, SAIC,

rola, Moto Lucent,

rms platfo edded emb

odak, Ko Ericsson,

and MVS, Win32, UNIX, to rted o P 

oeing, Bo re, Bellco {

rt e o of rs ea erson-y p 10 Over {

companies of

dozens y b used Currently  C++ of lines 125,000 > contain CE A 

Statistics CE A

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

8 Louis St. , y Universit ashington W

CE.html schmidt/A  www.cs.wustl.edu/

STREAMS SysV {

32 W POSIX SERVICES IN AND GENERAL

x-Kernel {

SUBSYSTEM SUBSYSTEM SUBSYSTEM SUBSYSTEM SUBSYSTEM SUBSYSTEM

/ / VIRTUAL MEMORY MEMORY VIRTUAL VIRTUAL COMMUNICATION COMMUNICATION THREAD THREAD PROCESS PROCESS

rk o w Related 

TLI TLI IPC IPC V V

THREADS THREADS PIPES PIPES

IO COMP COMP IO IO PIPES PIPES MAPPING MAPPING LINKING LINKING API S

/ / / / / / SYSTEM SYSTEM SOCKETS SOCKETS STREAM STREAM PROCESSES PROCESSES SELECT SELECT NAMED NAMED MEMORY MEMORY DYNAMIC DYNAMIC C

OS ADAPTATION LAYER ADAPTATION

Win32

_ _ SAP SAP TLI TLI SAP SAP WRAPPERS WRAPPERS MAP MAP SAP SAP WRAPPERS WRAPPERS

/ / _ _ SYSV SYSV SAP SAP SOCK SOCK SPIPE SPIPE

MEM MEM FIFO FIFO SYNCH SYNCH

PROACTOR

and POSIX, PROACTOR

URATOR URATOR

/ /

REACTOR REACTOR

WRAPPERS

- - MSG MSG MALLOC MALLOC CONFIG CONFIG MANAGERS MANAGERS

C++

LOG LOG SHARED SHARED SERVICE SERVICE THREAD RTOSs, on Runs { THREAD

/ / PROCESS PROCESS

(ASX) (ASX)

ADAPTIVE SERVICE EXECUTIVE EXECUTIVE SERVICE ADAPTIVE Java and EXECUTIVE SERVICE ADAPTIVE

HANDLER HANDLER HANDLER HANDLER

FRAMEWORKS

CONNECTOR CONNECTOR ACCEPTOR ACCEPTOR

C++ to rted o P { CORBA CORBA SERVICE SERVICE

rk o framew

SERVER SERVER SERVER SERVER SERVER SERVER

TIME TIME NAME NAME LOGGING LOGGING

rking o w net

SERVER SERVER SERVER SERVER

) ) ( ( TAO TAO

COMPONENTS

GATEWAY GATEWAY TOKEN

OO Concurrent { TOKEN THE ACE ORB ORB ACE ACE THE THE

WEB SERVER SERVER WEB WEB SERVICE

JAWS ADAPTIVE ADAPTIVE JAWS JAWS APPLICATIONS DISTRIBUTED

Overview CE A  - MIDDLEWARE CONTAINED SELF

CE A Environment Communication APTIVE AD The

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 11 Louis St. , y Universit ashington W

perations Op Avionics r fo ds erio P Visualizing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

10 Louis St. , y Universit ashington W

DATA

GENERATE

1: SENSORS

BROKER BROKER REQUEST REQUEST OBJECT OBJECT

proxy proxy proxy

Sensor Sensor Sensor

) ( 2: EVENTS PUSH

systems en Op {

infrastructure COTS {

CHANNEL

deadlines real-time EVENT

) ( 3: DEMARSHALED DATA DEMARSHALED deterministic PUSH

rodic erio P {

Frame

Nav

Air HUD

Challenges Domain 

Avionics Real-time to ORBs Applying

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 13 Louis St. , y Universit ashington W

servants also re a clients Most {

deadlines dic erio p and requirements

}; };

CPU , e.g.  resource publish Servants { sequence dependencies_; dependencies_; sequence sequence

Importance importance_; importance_; Importance Importance

Period_t period_; period_; Period_t Period_t

roach app Solution  Time_t cached_exec_time_; cached_exec_time_; Time_t Time_t

Time_t worstcase_exec_time_; worstcase_exec_time_; Time_t Time_t

{ {

Static {

struct RT_Info RT_Info struct struct

deadlines Determinisitic {

Operation Operation

RT ocus fo Initial  RT

threads/synchronization r o channels

C: C: REQUEST COMPUTATION TIME TIME COMPUTATION COMPUTATION REQUEST REQUEST

P: P: PERIOD PERIOD

communication on than Rather 

+ + + + 2 2 P P T P PT T T TT

Objects on up erations Op on cus o F { C C C C

requirements QoS rcing ecifying/enfo Sp {

TIME TIME

P P

PERIODIC SCHEDULING AND DISPATCHING DISPATCHING AND AND SCHEDULING SCHEDULING PERIODIC PERIODIC

Challenges Design 

perations Op CORBA to QoS Providing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

12 Louis St. , y Universit ashington W

OPTIMIZATIONS

NETWORK NETWORK

ADAPTER

NETWORK NETWORK ADAPTERS ADAPTERS NETWORK NETWORK ADAPTERS ADAPTERS NETWORK NETWORK

OPTIMIZATIONS

OPTIMIZATIONS

/ / / / O SUBSYSTEM SUBSYSTEM O O I I OS OS SUBSYSTEM SUBSYSTEM O O I I OS OS

MANAGEMENT

I/O SUBSYSTEM

CONNECTION

OS KERNEL KERNEL OS OS KERNEL KERNEL OS OS

OPTIMIZATIONS

PROTOCOL

CORE CORE

GIOP GIOP

ORB ORB OPTIMIZATIONS

THREADING

OPTIMIZATIONS

INTERFACE INTERFACE ADAPTER ADAPTER STUBS STUBS

DISPATCHING ORB ORB OBJECT OBJECT IDL IDL

DEMUXING AND DEMUXING

SKELETON SKELETON

REQUEST

IDL IDL

OPTIMIZATIONS

DATA COPYING DATA

OPTIMIZATIONS out args + return value value return return + + args args out out

SERVANT SERVANT CLIENT CLIENT

LAYER

operation() operation()

PRESENTATION

in args args in in

O A T in Optimizations and eatures F Real-time

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 15 Louis St. , y Universit ashington W

rtance o imp and endencies dep

data on based rities rio p (APIC) CONTROLLER ATM PORT INTERFACE PORT ATM

within rdered o Requests {

R R

S S

SUBSYSTEM

dispatcher SUBSYSTEM

E E

R R

O /O I I/

L L

DEMUXER DEMUXER QUEUE QUEUE SOCKET

OS y b rities rio p thread SOCKET E E

U U

F F

across rdered o Requests {

D D

F F

E E

EDF U U

H H

) HZ HZ) (1 (1 ) HZ HZ) (5 (5 ) HZ HZ) (10 (10 ) HZ HZ) (20 (20

B B

REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR and Preemption, Deferred REACTOR C C

S S

Y with RMS RMS, , e.g.  Y

CORE CORE ORB ORB P P

E strategies scheduling E

O O

ADAPTER ADAPTER

M M

C

request multiple rt o Supp { C

API API

OBJECT OBJECT

I I

O O

S oS Q Qo

T

endsystem ORB T

R R

DEMUXER DEMUXER SERVANT SERVANT

N N

E

into dispatcher RT Integrate { E

U U

SKELETONS SKELETONS STUBS STUBS Z Z

SERVANTS SERVANTS CLIENTS CLIENTS R R

roach App Solution  U

Architecture Endsystem ORB Real-time O's A T

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

14 Louis St. , y Universit ashington W

ch d TA.p .gz ps AO. /T idt hm sc  / www.cs.wustl.edu

ookup lo table I/O SUBSYSTEM I/O

SELECTOR SELECTOR

3 3 MODE MODE MODE

MODE

1 O via dispatcher MODE

Mode Mode

2 2 MODE MODE MODE CURRENT CURRENT

Table Per Per Table Table

1 1 MODE MODE MODE

Subpriority endsystem ORB Subpriority

ORB CORE ORB

0 0

MODE MODE MODE Priority/ Priority/

TO ORB TO to rities rio p Supply  ADAPTER OBJECT SCHEDULER SCHEDULER

PRIORITIES

SUBPRIORITIES

- -

TIME TIME RUN RUN

Operation Operation Operation Operation Operation

6:

Online { SUPPLY

ORDERING RT RT RT RT RT DISPATCH QUEUE DISPATCH

rities rio p queue AND PRIORITIES

2: 2: IDENTIFY THREADS THREADS IDENTIFY IDENTIFY

EXECUTES AFTER AFTER EXECUTES EXECUTES

5:

ASSIGN OS THREAD OS ASSIGN

_ _ = = OPERATIONS OPERATIONS CHAINS OF RT RT OF OF CHAINS CHAINS DEPENDS UPON UPON UPON DEPENDS DEPENDS

and thread Assign  SCHEDULABILITY

1: 1: CONSTRUCT CALL CALL CONSTRUCT CONSTRUCT

4: ASSESS

y feasibilit

}; };

REPOSITORY REPOSITORY dependencies_; dependencies_;

_ _ INFO INFO RT schedule Assess  RT

importance_; importance_;

period_; period_;

Oine { REPOSITORY cached_exec_time_; cached_exec_time_;

_ INFO RT

wc_exec_time_; wc_exec_time_;

SCHEDULER SCHEDULER

3:

POPULATE

{ {

- - LINE LINE OFF OFF

struct RT_Info struct oponents Comp  RT_Info struct

Service Scheduling Real-time O's A T

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 17 Louis St. , y Universit ashington W

Inversion y rit Prio O A T and rus, Cho MT-Orbix, Number of Low Priority Clients Priority Low of Number

latency est w lo has ys a alw

01 02 03 04 50 45 40 35 30 25 20 15 10 5 1 0

client y rit rio p high , i.e. 

inversion 2

y rit rio p avoids O A T {

Latency per Twoway Request in Milliseconds 4

14.1msec  vs.

7.6msec  vs. 2.3msec   6

clients of  rge la r fo er w lo 8

much is latency O's A T { 2.0sec  10

vs. 1.4sec  vs. 1.2msec  

12

TAO Low-Priority TAO

clients of  small High-Priority TAO

Sun COOL Low-Priority COOL Sun

Sun COOL High-Priority COOL Sun

14

r fo er w lo is latency rus' Cho {

MT-Orbix Low-Priority MT-Orbix

MT-Orbix High-Priority MT-Orbix 16

results of Synopsis 

Results eriment Exp Inversion y rit Prio

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

16 Louis St. , y Universit ashington W

cmd/Tperf.ps.gz schmidt/RT-p  www.cs.wustl.edu/

clients

Ultra 2 Ultra 2 Ultra 2 Ultra

y rit rio p w lo r fo y rit rio p 2

 

ATM Switch ATM         real-time est w Lo {

client

y rit rio p high r fo y rit rio p

Server

real-time Highest { Client

I/O SUBSYSTEM I/O

hedper-rate thread-p Requests

implements ry facto Server  Core ORB ... n 1 0 C C C

clients y rit rio p w lo 1..n  ... Object Adapter Object Servants RUNTIME SCHEDULER

client y rit rio p high One 

x eriments Exp Inversion y rit Prio

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

19 Louis St. , y Universit ashington W

SUBSYSTEM SUBSYSTEM O /O I I/

2: recv() recv() 2: 2:

odel mo concurrency over

CORE CORE ORB ORB

control application of Lack { 3: enqueue(data) enqueue(data) 3: 3:

rities rio p thread er rop Imp 

FILTER FILTER

DEMUXER DEMUXER SERVANT SERVANT

queueing request O FIF 

FILTER FILTER ADAPTER ADAPTER

enqueue enqueue

OBJECT OBJECT

request & request

inversions y rit Prio { & request FILTER FILTER

4: filter filter 4: 4:

method()

Synchronization  method() FILTER FILTER

5: dispatch dispatch 5: 5:

THREAD THREAD

switching Context 

SKELETONS SKELETONS

1: impl_is_ready() impl_is_ready() 1: 1:

overhead High { U

SERVANT SERVANT

SKELETONS SKELETONS

U

SERVANT Problems Common  SERVANT

odel Mo Concurrency ORB er rop Imp Problem:

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

18 Louis St. , y Universit ashington W

riable va

Jitter O A T and rus, Cho MT-Orbix,

re mo and highest

Number of Low Priority Clients Priority Low of Number

is jitter MT-Orbix's { 50

45

40

35

30

25

20

15

10

5 1

consistent Jitter Priority High TAO

TAO Low Priority Jitter Priority Low TAO

0

most and est w lo Jitter Priority High COOL Sun

10 Sun COOL Low Priority Jitter Priority Low COOL Sun

Orbix High Priority Jitter Priority High Orbix 20

is jitter O's A T {

Orbix Low Priority Jitter Priority Low Orbix

30 Jitter (milli

40

results of Synopsis  50

60

sec) 70

latency average 80 90

the from riance va 100

the is Jitter {

De nition 

Results eriment Exp Jitter

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 21 Louis St. , y Universit ashington W

ch d RTmi l ar.p .gz ps re. wa dle id T-m /R idt hm sc  / www.cs.wustl.edu

COMMUNICATION LINK COMMUNICATION

SUBSYSTEM SUBSYSTEM O /O I I/ SUBSYSTEM I/O

) HZ HZ) (1 (1 ) HZ HZ) (5 (5 ) HZ HZ) (10 (10 ) HZ HZ) (20 (20 HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ

REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR 20 10 5 1 1 5 5 10 10 20 20 1 1 5 5 10 10 20 20 1 1 5 5 10 10 20 20

R 3 2 1 R 3 2 1 R 3 2 1 R R 3 3 2 2 1 1 CONNECTOR CONNECTOR CONNECTOR CONNECTOR CONNECTOR CONNECTOR

O T T T O T T T O T T T O O T T T T T T

T C C C T C C C T C C C T T C C C C C C

CORE CORE ORB ORB CLIENT CLIENT

P E E E P E E E P E E E P P E E E E E E

E N N N E N N N E N N N E E N N N N N N

C N N N C N N N C N N N C C N N N N N N

C O O O C O O O C O O O C C O O O O O O

STUB STUB STUB

A C C C A C C C A C C C A A C C C C C C

CORE CORE ORB ORB SERVER SERVER CLIENT APPLICATION CLIENT

pology op T Connection Inter-ORB O's A T

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

20 Louis St. , y Universit ashington W

SUBSYSTEM SUBSYSTEM O /O I I/

overhead

LINK LINK COMMUNICATION Synchronization { COMMUNICATION

SUBSYSTEM SUBSYSTEM O /O I I/ SUBSYSTEM SUBSYSTEM O /O I/ multiplexing I

CONNECTION CONNECTION

TCP TCP ONE connection ONE

2: select() select() 2: 2:

Complex { release() 4:

CORE CORE ORB ORB SEMAPHORES SEMAPHORES

BORROWED THREAD

connection single SERVER SERVER

3: read() 3:

a on rities rio p

SERVANTS SERVANTS

CORE CORE ORB multiple ring Sha  ORB 5: dispatch_return() 5:

inversions y rit Prio {

BORROWED THREADS 1: invoke_twoway() 1: Problems Common  APPLICATION

odel Mo Connection red Sha ORB Problem:

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 23 Louis St. , y Universit ashington W

ch d GLBE M 7.s. z .g .ps 97 OM- EC LOB /G idt hm sc  / www.cs.wustl.edu at Results 

chid g rfps gz s. f.p er /gp dt hmi sc  / www.cs.wustl.edu {

gperf GNU on based hashing erfect P 

strategy demuxing Orbix on based rch sea r Linea 

OBJECT ADAPTER OBJECT OBJECT ADAPTER OBJECT ADAPTER OBJECT

search(object key) search(object index(object key/operation) index(object key) hash(object

SERVANT

SERVANT SERVANT SERVANT ...... SERVANT SERVANT ... 500 500 2 2 1 1 500 2 2 1 1 SERVANT SERVANT 500 SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT

2 2 1 1

SKEL N N SKEL SKEL SKEL SKEL SKEL SKEL

...... 2 2 1 1

SKEL N N SKEL SKEL SKEL SKEL SKEL

500:: SKEL 500::

500:: 1:: 500:: 1::

...... 1:: 1:: ... 1:: 1::

...... IDL IDL IDL IDL IDL IDL

IDL IDL IDL IDL IDL IDL

OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION

search(operation) OPERATION hash(operation) OPERATION OPERATION

OPERATION

...... OPERATION ... OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION PERFECT HASHING PERFECT

......

, (C)

LAYERED DEMUXING LAYERED

100 100 2 1 2 1

LINEAR SEARCH LINEAR 100 SEARCH LINEAR 100 1 1 DYNAMIC HASHING DYNAMIC

, , (A) (A)

LAYERED DEMUXING DEMUXING LAYERED LAYERED

, (B) LAYERED DEMUXING LAYERED 2 1 2 1 2 1 2 1 100 100 100 100

- (D) LAYERED ACTIVE DEMUXING ACTIVE LAYERED DE

x eriments Exp rmance erfo P Demultiplexing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

22 Louis St. , y Universit ashington W

NETWORK ADAPTERS ADAPTERS NETWORK NETWORK PROTOCOL STACK STACK PROTOCOL PROTOCOL

1: 1:

DEMUX THRU THRU DEMUX DEMUX

/ / O SUBSYSTEM SUBSYSTEM O O I I OS OS

I/O I/O HANDLE HANDLE

OS KERNEL KERNEL OS OS

2: 2: DEMUX TO TO DEMUX DEMUX

ORB CORE CORE ORB ORB

OBJECT ADAPTER ADAPTER OBJECT OBJECT

3: 3: DEMUX TO TO DEMUX DEMUX

CORBA-compliant ADAPTER OBJECT

SERVANT SERVANT

Remain { 4: 4: DEMUX TO TO DEMUX DEMUX

...... N N 2 2 1 inversions y rit rio p Avoid { 1 SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT

SKELETON SKELETON

demuxing 5: 5: DEMUX TO TO DEMUX DEMUX

M M 2 2 1 SKEL SKEL SKEL SKEL SKEL SKEL

......

peration op 1 O Provide { ...

IDL IDL IDL IDL IDL

OPERATION OPERATION

ers y la 6: 6: DEMUX TO TO DEMUX DEMUX

OPERATION OPERATION

OPERATION OPERATION OPERATION OPERATION

demuxing Minimize { DEMUXING

...... LAYERED

Challenges Design  K K 2 1 2 1

Latency Demultiplexing Reducing Problem:

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

25 Louis St. , y Universit ashington W

SUBSYSTEM SUBSYSTEM S S

O /O I I/ R R

E E

F F

QUEUES QUEUES DRIVER DRIVER ATM ATM APIC APIC

F F

PACING PACING APIC pacing APIC

U U

cell r fo features APIC Leverages { B B

end-to-end

QUEUES QUEUES

Y Y

SOCKET SOCKET

QoS rate-based Provides { VC -VC PER PER- P P

O O

rk o w net

C C

TM A and OS, ORB, through

O O ) HZ HZ) (1 (1 ) HZ HZ) (5 (5 ) HZ HZ) (10 (10 ) HZ HZ) (20 (20

REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR

R R

QoS of integration ertical V {

E E

Z Z CORE CORE ORB ORB

eatures F Key 

TM A and Subsystem I/O RT with O A T Integrating

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

24 Louis St. , y Universit ashington W Demultiplexing scheme Demultiplexing Method) (1 Demux Active

Active Demux (10 Methods) (10 Demux Active

Active Demux (100 Methods) (100 Demux Active Number of Objects of Number GPERF (1 Method) (1 GPERF

GPERF (10 Methods) (10 GPERF Dynamic Hash (10 Methods) (10 Hash Dynamic Dynamic Hash (1 Method) (1 Hash Dynamic

GPERF (100 Methods) (100 GPERF Dynamic Hash (100 Methods) (100 Hash Dynamic

1

dynamic 100 200

300

400 500

is but compatible, Linear (10 methods) (10 Linear Linear (1 method) (1 Linear Linear (100 methods) (100 Linear 0

100 be not 20 Latency in microseconds in Latency

y ma demuxing Active { 40

static but compatible, 60

100 is solution gperf { 80

erratic 100

oo to is hashing Dynamic { 120

costly 140

oo to r fa is rch sea r Linea {

Synopsis 

Results rmance erfo P Demultiplexing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 27 Louis St. , y Universit ashington W

patterns.ps.gz

schmidt/ORB-  www.cs.wustl.edu/

pitfalls and traps

common cument Do {

choices design Guide {

OS KERNEL OS KERNEL OS

rmation info

WRAPPER FACADES FACADES WRAPPER WRAPPER

design crucial Preserve {

REACTOR REACTOR

reuse design acilitate F {

CONNECTOR ACCEPTOR

STORAGE

-

SPECIFIC atterns P of Bene ts  THREAD

OBJECT

STRATEGY

context" r rticula pa a ACTIVE

in roblem p design a to FACTORY ABSTRACT

solution recurring \A {

CONFIGURATOR

SERVANT CLIENT De nition  SERVICE

ORBs Extensible Develop to atterns P Applying

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

26 Louis St. , y Universit ashington W

strategies custom of con guration dynamic via Extensible 

strategies implementation custom via Extensible 

rms platfo new on rget reta to Extensible 

1 MVS MVS , , RTOS RTOS 32, 32, W W POSIX, POSIX, S S IN IN

2

4 profile

3 profile

2

3 profile strategy

1

2 profile strategy

1

strategy

3 DLL DLL S S

y Extensibilit ORB of Dimensions

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 29 Louis St. , y Universit ashington W

abstractions

cohesive Create {

APIs

system rtable o non-p and

rone, r-p erro tedious, Avoid { specific_request()

Resolved rces o F  :Wrappee :Wrappee

interfaces class rtable po

and r, dula mo e-safe, yp t 2: specific_request() 2:

within mechanisms

system stand-alone

w-level, lo Encapsulates { request()

1: request () request 1:

client client

:Wrapper Intent  :Wrapper

attern P acade F

aper rapp W the with y esafet yp T and y rtabilit o P Enhancing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

28 Louis St. , y Universit ashington W

details rogramming p

OS w-level lo encapsulate to pattern acade F er rapp W the Apply {

Solution 

rtable o non-p re a APIs w-level Lo {

rone r-p erro re a APIs w-level Lo {

rogram p to tedious re a APIs w-level Lo {

rces o F 

rd ha is APIs system w-level lo using ORB an Building {

Problem 

Challenges y esafet yp T and y rtabilit o P ORB Addressing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 31 Louis St. , y Universit ashington W

ocessing ro p eci c ORB-sp

from cessing ro p event generic decouple to pattern r Reacto the Use {

Solution 

in exible

is logic eci c ORB-sp with cessing ro p event general coupling Tightly {

ecient ys a alw not is Multi-threading {

available ys a alw not is Multi-threading {

rces o F 

simultaneously events of es yp t di erent many cess ro p must ORBs {

Problem 

Challenges Dispatching and Demuxing ORB Addressing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

30 Louis St. , y Universit ashington W

ode co c ho ad of amount the reduced

and y rtabilit po increased substantially pattern acade F er rapp W The 

CE A on based re a facades er wrapp O's A T 

O A T IOP I SunSoft

 &  &

SERVICES SERVICES SERVICES SERVICES WinSock WinSock

SUBSYSTEM SUBSYSTEM SUBSYSTEM SUBSYSTEM

Sockets Sockets Pthreads Pthreads System Calls Calls System System

32 32 W W IN IN

32 32 W W SUBSYSTEM SUBSYSTEM IN IN

THREAD THREAD MEMORY MEMORY

Macros Macros

BSD BSD POSIX POSIX Other OS OS Other Other

& & POSIX POSIX

COMMUNICATION COMMUNICATION

& & POSIX POSIX

/ /

Socket Socket

PROCESS PROCESS VIRTUAL VIRTUAL

GENERAL GENERAL

GENERAL GENERAL

TLI

IO COMP IO

LINKING WRAPPERS WRAPPERS

pthread_mutex_* pthread_mutex_* recv(), send() send() recv(), recv(),

select(), etc. etc. select(), select(),

FACADES

/ /

SELECT SOCKETS DYNAMIC THREAD THREAD

socket(), bind(), bind(), socket(), socket(),

gettimeofday(), gettimeofday(),

pthread_create() pthread_create() WRAPPER

recv(), send() send() recv(), recv(), ACE

acquire() acquire() handle_events()

SunSoft IIOP's ORB Core Core ORB ORB IIOP's IIOP's SunSoft SunSoft

dlsym() dlsym() close(), close(),

dlopen() dlopen() open(), open(), spawn() spawn()

TAO's ORB Core ORB TAO's TAO's ORB Core ORB TAO's '

$

'

$

O A T in attern P acade F er rapp W the Using

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 33 Louis St. , y Universit ashington W

industry y b used widely is pattern r Reacto CE A The 

O A T IOP I SunSoft

 &  &

3: handle_input() 3:

Handler Handler 4: select() 4:

Engine Engine Connection Connection 2: select() 2:

GIOP GIOP Handler Handler

endpoints endpoints Reactor Reactor Connection Connection

server server

Handler Handler

MESSAGE

Connection Connection

6: INCOMING 3: BLOCK FOR CONNECTION FOR BLOCK

ORB CORE CORE ORB ORB ORB CORE CORE ORB ORB

ADAPTER ADAPTER 2: GET REQUEST GET ADAPTER ADAPTER 4: DISPATCH

5:

DISPATCH

OBJECT OBJECT OBJECT OBJECT MAP MAP OBJECT OBJECT ACTIVE ACTIVE

7: 5: UPCALL

UPCALL

1: 1: RUN EVENT LOOP EVENT RUN LOOP EVENT RUN

APPLICATION APPLICATION SERVANT SERVANT APPLICATION APPLICATION SERVANT SERVANT

' '

$ $

O A T in attern P r Reacto the Using

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

32 Louis St. , y Universit ashington W

infrastructure demux

changing without

applications Extending {

thread

one within eciently

Handler Handler

select()

events Demuxing {

Event Event

Demultiplexer Demultiplexer

Concrete Concrete

Synchronous Event Event Synchronous Synchronous

Resolved rces o F  notifies

handling event from get_handle()

handle_event(type) Handle Handle

demuxing/dispatching owns uses

N

1 Event Handler Handler Event Event

event synchronous

remove_handler(h) handlers

end loop end

Decouples { register_handler(h)

h.handle_event(type)

handle_events()

foreach h in handlers loop handlers in h foreach

Initiation Dispatcher Dispatcher Initiation Initiation Intent  (handlers); select

attern P r Reacto the with Demuxing Enhancing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 35 Louis St. , y Universit ashington W

ocessing ro p service subsequent from

initialization handler service and establishment connection Decouple {

Intent 

Structure r Connecto Structure r Accepto

 &  &

Dispatcher Dispatcher Dispatcher Dispatcher

:Event :Event :Event :Event NOTIFIES NOTIFIES

CONNECTION COMPLETION COMPLETION CONNECTION CONNECTION

HANDLE ASYNC ASYNC HANDLE HANDLE

ACTIVATE ACTIVATE

ACTIVATE ACTIVATE

handle_input()

complete() open()

open()

& & CREATE CREATE CREATE & & CREATE CREATE CREATE

connect(sh, addr) connect(sh, peer_stream_ peer_acceptor_ peer_stream_

Connector Connector Handler Handler Acceptor Acceptor Handler Handler

: Strategy Strategy : : :Connection :Connection : Strategy Strategy : : :Connection :Connection

Connection Handler Handler Connection Connection Connection Handler Handler Connection Connection

' '

$

$

attern P r r-Connecto Accepto

the with Initialization oint Endp Enhancing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

34 Louis St. , y Universit ashington W

IOP I , e.g.  col roto p y erabilit interop ORB subsequent the from

initialization handler connection GIOP and establishment connection

passive/active decouple to pattern r r-Connecto Accepto the Use {

Solution 

re a w soft communication of es yp t many r fo reuse

re a w soft increases cessing ro p subsequent from initialization rating Sepa {

rtable o non-p and rone r-p erro re a APIs connection w-level Lo {

rces o F 

oocol roto p

initialization handler service and establishment connection its to

rthogonal o often is ORBs een w bet used col roto p communication The {

Problem 

Challenges Initialization oint Endp ORB Addressing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 37 Louis St. , y Universit ashington W

yle st rogramming p OO an using erations op

server concurrent multiple w allo to pattern Object Active the Use {

Solution 

optimal ys a alw is del mo multi-threading single No {

rogram p to rd ha very be can Multi-threading {

rces o F 

non-robust and non-scalable, inecient,

often re a ORBs Reactive since needed re a ORBs Multi-threaded {

Problem 

Challenges Concurrency ORB Addressing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

36 Louis St. , y Universit ashington W

es mistak common avoid 2 and reuse and y rtabilit po rove Imp 1 {

Resolved rces o F 

O A T IOP I SunSoft

 &  &

SERVER SERVER CLIENT CLIENT SERVER CLIENT

4: accept() 4: Reactor Reactor 2: connect() 2:

Connector Connector

endpoint endpoint

endpoint endpoint Strategy Strategy

client client

listener listener

3: accept() accept() 3: 3: 2: connect() connect() 2: 2:

Acceptor

Strategy Strategy

Strategy

3: select() select() 3: 3:

endpoint endpoint Connect Connect

endpoint endpoint Cached Cached Strategy

client client

Concurrency server server

5: read()/write() 5:

Handler Handler ACTIVATE

GIOP GIOP & 4: CREATE CREATE 0..N

endpoint endpoint endpoint endpoint

client client Handler

Handler

server server

Handler

RESPONSE RESPONSE

5: read()/write() 5: Connection Handler Handler Connection

Connection

/ / 5: 5: REQUEST REQUEST Connection Connection 1: lookup() 1:

ORB CORE CORE ORB ORB

CORE CORE ORB ORB () 6: 1: operation() 1: DISPATCH

'

'

$

$

O A T in attern P r r-Connecto Accepto the Using

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 39 Louis St. , y Universit ashington W

etc. er-Rate, Thread-p ol, o P Thread er-Request, Thread-p Connection,

hedper- Thread-p , e.g.  Objects Active of riants va several rts o supp O A T 

O A T IOP I SunSoft

 &  &

CONNECTION

REACTIVE

THREAD-PER

3: 3: SERVICE REQUEST REQUEST SERVICE SERVICE

1: ARRIVAL 1: ARRIVAL 1:

Reactor Reactor

1: handle_input() handle_input() 1: 1:

3: READ 3: 3: READ 3:

endpoint endpoint

endpoint endpoint

Handler Handler ? ? 2: 2:

ACTIVE OR PASSIVE PASSIVE OR OR ACTIVE ACTIVE server server

server server

Connection Connection

Strategy Strategy

2: NOTIFY 2: NOTIFY 2: Concurrency Concurrency

select() select() select() 2a: Task::activate() Task::activate() 2a: 2a:

ORB CORE CORE ORB ORB ORB CORE ORB CORE ORB

' '

$ $

O A T in attern P Object Active the Using

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

38 Louis St. , y Universit ashington W

strategies concurrency

exible ermit P {

perations op

CLIENTS CLIENTS remove() Representation Representation

FROM FROM

insert()

Resource

l cking blo w Allo { Resource

IDDEN IDDEN H H

Queue Queue

Activation Activation

Resolved rces o F 

m3'()

CLIENTS CLIENTS 1

2: insert(m1') 2:

m2'() TO TO

n

m1'()

VISIBLE

reception request VISIBLE

dispatch() Method Objects Objects Method Method

of thread the from Scheduler Scheduler

m3() ResultHandle 3: dispatch() 3:

execution request of m2() ResultHandle

m1() ResultHandle

1: m1() 1:

thread the Decouples { }

Interface Interface

resource_rep) m', ( dispatch

Client Client = actQueue.remove() = m' Intent  { loop

attern P

Object Active the with Concurrency ORB Enhancing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 41 Louis St. , y Universit ashington W

inversion y rit rio p and overhead Minimizes {

access

Resolved rces o F 

each r fo overhead

ocking lo incurring

Connector Connector TATE S SPECIFIC

without data THREAD- ORB

Acceptor Acceptor

heds eci c thread-sp Reactor Reactor

POA ORB POA 2: get_state(key) 2:

retrieve to oint p

access global

INDEXED BY KEY BY INDEXED

logically one TABLES OBJECT THREAD-SPECIFIC

use to threads

1: ACE_OS::thr_getspecific(key) 1:

multiple ws Allo {

THREAD B B THREAD THREAD THREAD A A THREAD THREAD

Intent 

attern P rage Sto

hedS eci c Thread-Sp the with cking Lo ORB Minimizing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

40 Louis St. , y Universit ashington W

inversion y rit rio p and contention ck lo minimize and y exibilit

hedn-odel threading-mo maximize to pattern rage Sto eci c Thread-Sp the Use {

Solution 

costs cking lo di erent yield schemes concurrency Di erent {

inversion y rit rio p r fo otential p increase cks Lo {

overhead rmance erfo p increase cks Lo {

rces o F 

ORB an y b red sha resources to access

serialize to required cking lo of amount the minimize to rtant o imp is It {

Problem 

attern P rage Sto eci c Thread-Sp the

with Inversions y rit Prio and Contention ck Lo Reducing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 43 Louis St. , y Universit ashington W

strategies ORB

\pluggable" rently transpa multiple rt o supp to pattern Strategy the Use {

Solution 

dimensions related many has often y Flexibilit {

non-extensible and static o to re a y exibilit ORB r fo schemes c ho Ad {

rces o F 

applications and end-users of es yp t di erent

many of requirements the satisfy to exible be must ORBs rld o Real-w {

Problem 

Challenges y Flexibilit ORB Addressing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

42 Louis St. , y Universit ashington W

COMMUNICATION LINK COMMUNICATION

SUBSYSTEM SUBSYSTEM O /O I I/ SUBSYSTEM I/O

) HZ HZ) (1 (1 ) HZ HZ) (5 (5 ) HZ HZ) (10 (10 ) HZ HZ) (20 (20 HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ HZ

REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR REACTOR 20 10 5 1 1 5 5 10 10 20 20 1 1 5 5 10 10 20 20 1 1 5 5 10 10 20 20

R 3 2 1 R 3 2 1 R 3 2 1 R R 3 3 2 2 1 1 CONNECTOR CONNECTOR CONNECTOR CONNECTOR CONNECTOR CONNECTOR

O T T T O T T T O T T T O O T T T T T T

T C C C T C C C T C C C T T C C C C C C

CORE CORE ORB ORB CLIENT CLIENT

P E E E P E E E P E E E P P E E E E E E

E N N N E N N N E N N N E E N N N N N N

C N N N C N N N C N N N C C N N N N N N

C O O O C O O O C O O O C C O O O O O O

STUB STUB STUB

A C C C A C C C A C C C A A C C C C C C

CORE CORE ORB ORB SERVER SERVER CLIENT APPLICATION CLIENT

O A T in rage Sto eci c Thread-Sp Using

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 45 Louis St. , y Universit ashington W

O A T IOP I SunSoft

 &  &

SERVER SERVER CLIENT CLIENT

...

CODE // release //

if (do_thread) if Acceptor Acceptor

Connector Connector MANAGEMENT

Strategy Strategy Strategy Strategy

... CONNECTION

// take lock... take // Strategy Strategy

Strategy Strategy

Strategy Strategy Strategy Strategy if (do_thread) if

CODE Connect Connect

Connect Connect

Concurrency Concurrency Concurrency Concurrency

Specific Specific

CONCURRENCY

Cached Cached

Threaded Threaded Reactive Reactive Thread- Thread-

ORB CORE CORE ORB ORB ORB CORE ORB

ADAPTER ADAPTER ORB CORE CORE ORB ORB

// single-threaded //

OBJECT OBJECT ORB CORE CORE ORB ORB

hash(object key) hash(object CODE

else

index(object key) index(object

// thread... //

DEMUXING

...... 2 2 1 1 SERVANT N N SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT

SERVANT SERVANT SERVANT (do_thread) if SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT

OBJECT ADAPTER OBJECT

2 2 1 1

SKEL N N SKEL SKEL SKEL SKEL SKEL SKEL

......

IDL IDL IDL IDL IDL N:: IDL N:: N:: N:: 1:: 1:: 1:: 1:: 1:: 1::

OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION

OPERATION OPERATION OPERATION OPERATION hash(operation) ......

OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION

' STRATEGY $

DEMUXING

... K ... K 2 1 2 1

K K 1 1

(A) PERFECT HASHING PERFECT

(B) ACTIVE DEMUXING STRATEGY DEMUXING ACTIVE K K 2 1 2 1

'

$

O A T in attern P Strategy the Using

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

44 Louis St. , y Universit ashington W algorithm_interface()

rithm algo an

Strategy B Strategy

with state ciating Asso { Concrete

rently transpa

algorithm_interface() subsets ral ehavio b algorithm_interface()

Strategy C Strategy replace Orthogonally { A Strategy

Concrete Concrete

Resolved rces o F 

alternatives

rithmic algo among

y rit simila out r acto F { context_interface() algorithm_interface()

Context

Strategy Strategy Intent  STRATEGY

attern P Strategy the with y Flexibilit ORB Enhancing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 47 Louis St. , y Universit ashington W

strategies

of y compatibilit

semantic Ensures {

Product_B

strategies Product_B

Abstract Abstract Product_B2 Product_B2 Product_B1 Product_B1

many of customization

Consolidates {

make_product_B() make_product_B() make_product_B()

Resolved rces o F  make_product_A() make_product_A() make_product_A()

Factory_2 Factory_2 Factory Factory Factory_1 Factory_1

Concrete Concrete Abstract Concrete Concrete ORB Abstract

an con gure to used

strategies all Integrate {

Product_A2 Product_A2 Product_A1 Product_A1

Product_A Product_A

Abstract Abstract

Intent 

attern P ry acto F

Abstract the with y Con gurabilit ORB Centralizing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

46 Louis St. , y Universit ashington W

con gurations compatible semantically into strategies

ORB multiple consolidate to pattern ry acto F Abstract the Use {

Solution 

con gured re a

strategies compatible semantically of groups that ensure to rd ha It's {

strategies con gured individually of ers numb rge la manage to rd ha It's {

rces o F 

re nightma

con guration a create can pattern Strategy the of use Agressive {

Problem 

Challenges y Con gurabilit ORB Addressing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 49 Louis St. , y Universit ashington W

dynamically onents comp

ORB desired the assemble to pattern r Con gurato Service the Use {

Solution 

undesirable is use don't they onents comp r fo y pa to users rcing o F {

run-time

until eciently made be can't decisions con guration ORB Certain {

rces o F 

inecient and in exible is

con guration ORB r rticula pa a to ourselves committing Prematurely {

Problem 

Challenges y Con gurabilit Dynamic ORB Addressing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

48 Louis St. , y Universit ashington W

Dispatching Dispatching Demuxing Demuxing

Rate-based Rate-based Active Active

Strategy Strategy Strategy Strategy

Demuxing Demuxing Dispatching Dispatching

Factory Factory

Hashing Hashing Dispatching Dispatching

Factory Factory

Factory Factory

Concrete Concrete

Perfect Perfect FIFO FIFO

Concrete Concrete Abstract Abstract

Imaging Imaging

Avionics Avionics Server Server

Medical Medical

ORB ORB

Rate Rate Connection Connection

per- per- per- per- Strategy Strategy

Thread- Thread- Thread- Thread- Concurrency Concurrency

O A T in attern P ry acto F Abstract the Using

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 51 Louis St. , y Universit ashington W

Con guration Run-time

Concurrency Concurrency

Factory Factory Repository Repository Connection Connection

Concrete Concrete Service Service Thread-per Thread-per

Avionics Avionics

Dispatching Dispatching Demuxing Demuxing Concurrency Concurrency

FIFO FIFO Active Active Rate Rate

Hashing Hashing Thread-per Thread-per

Perfect Perfect

Factory Factory

Concrete Concrete

Dispatching Dispatching

PROCESS PROCESS

DLL DLL S S

Imaging Imaging Rate-based Rate-based TAO TAO

Medical Medical

O A T in attern P r Con gurato Service the Using

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

50 Louis St. , y Universit ashington W

}

initialization... Perform //

recon guration

dynamic rt o Supp {

argv; argc, tao Service_Config

ORB. the Configure //

utilization

{

resource Reduce {

*argv[] char &argc, int CORBA::ORB_init

Service Service Service Service Service Resolved rces o F  Service

Dispatching Dispatching Demuxing Demuxing Concurrency Concurrency

con gured

re a they when

info()

time from strategies resume() suspend()

ORB Decouples { fini()

init() Repository Repository

services Service Service Service Intent  Service

attern P r Con gurato

Service the with y Extensibilit ORB Dynamic Enhancing

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 53 Louis St. , y Universit ashington W

 &  &

CLIENT CLIENT SERVER SERVER

ORB CORE ORB CORE ORB

OBJECT ADAPTER OBJECT OBJECT ADAPTER OBJECT

Reactor Reactor Reactor Reactor

Connector Connector

index(object key/operation) index(object key) hash(object

Strategy Strategy

3: accept() accept() 3: 3: connect() connect() 2: 2:

SERVANT

SERVANT

Acceptor SERVANT SERVANT Acceptor SERVANT SERVANT ...... N N 2 2 1 SERVANT SERVANT 1 SERVANT SERVANT

SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT SERVANT

Strategy Strategy Acceptor Acceptor

Strategy Strategy

Connect Connect

Strategy Strategy

Cached Cached

K K 2 2 1 1

SKEL SKEL SKEL SKEL SKEL SKEL N:: SKEL N:: N:: 1::

N:: 1:: ...... 1:: 1:: ... 1:: 1::

......

ACTIVATE ACTIVATE IDL IDL IDL IDL IDL

OPERATION IDL OPERATION

OPERATION OPERATION OPERATION OPERATION OPERATION OPERATION

OPERATION OPERATION

& & 4: 4: CREATE CREATE CREATE

0..N

hash(operation)

Handler Handler

RESPONSE RESPONSE

GIOP GIOP

...... OPERATION ... OPERATION OPERATION OPERATION OPERATION OPERATION

Handler Handler

Handler Handler

/ / 5: 5: REQUEST REQUEST DYNAMIC HASHING DYNAMIC Handler Handler

Handler Handler

Connection Connection

Connection

M Connection , M (B)

M 2 1 DEMUXING LAYERED M 2 1 Connection 1 Connection 1 Connection Connection

PERFECT HASHING PERFECT

DEMUXING M 2 1 M 2 1

ORB CORE CORE ORB ORB

, (A) () () 6: 6: operation() operation() 1: 1:

LAYERED DEMUXING LAYERED DISPATCH DISPATCH

- (C) LAYERED ACTIVE LAYERED DE

ADAPTER ADAPTER

INTERFACE INTERFACE

CORE CORE

OBJECT OBJECT

STUBS STUBS

ORB ORB

/ /

IIOP IIOP GIOP GIOP

DII DII - -

TIME TIME REAL REAL

IDL IDL ORB ORB

SKELETON SKELETON

DSI DSI

IDL IDL

ADAPTER ADAPTER INTERFACE INTERFACE

STUBS STUBS

ORB ORB

OBJECT OBJECT DII DII

IDL IDL

out args + return value value return return + + args args out out

SKELETON SKELETON

DSI DSI

SERVANT SERVANT CLIENT CLIENT

IDL IDL operation() operation()

in args args in in

'

$ out args + return value value return return + + args args out out

SERVANT SERVANT CLIENT CLIENT

operation() operation()

in args args in in

'

$

O A T of Status Current

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

52 Louis St. , y Universit ashington W

IOP I SunSoft and

5 of

O A T r fo res Sco Metric y Complexit e Macab

r facto a y b reduced

management

MVG Range MVG

connection , e.g.  10 > 10 − 6 5 − 1 0.0

IOP I SunSoft than 10.0

smaller substantially re a onents comp O A T { 20.0 % Methods in Range

10 <  G  v 30.0

have onents comp 40.0

O A T Most , e.g. 

y complexit 50.0

ode co reduce

60.0 TAO

greatly atterns P { IIOP SunSoft 70.0

Statistics 

atterns P of Bene ts the Quantifying

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas 55 Louis St. , y Universit ashington W

rt o supp QoS etter b much rovide p will ORBs of next-generation The 

oponents comp

re a w soft distributed of reuse achieve to y a w e ective an re a ORBs 

components and rks o framew communication create to patterns design

riate rop app applying y b challenges these resolve ers develop Successful 

tolerance

fault ersistence, p control, concurrency demultiplexing, event control,

w o handling, r erro distribution, and initialization service , e.g. {

plcto-ne endent application-indep rgely la re a

that challenges recurring confront applications distributed of ers Develop 

rks Rema Concluding

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas

54 Louis St. , y Universit ashington W

optimizations compiler de eCo yp T {

generation stub optimized and compiler IDL {

Subsystem I/O RT with integration and QoS Distributed {

requests of scheduling Dynamic {

ORBs in inversions y rit rio p and non-determinism oint Pinp {

rk o W uture F 

er y la resentation p to rinciples p optimization Applying {

requests CORBA r fo scheduling static rt o supp i.e., 

endystem ORB Real-time via deadlines dic erio p rcing Enfo {

reter interp de eCo yp T to rinciples p optimization Applying {

demuxing active ered y de-la via latency Reducing {

ORBs Real-time rmance, erfo High-p cus: o F Current 

ry Summa Project O A T

ORBs Real-time rmance, erfo High-p Schmidt C. Douglas