Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA...

35
Real-Time CORBA Chenyang Lu CSE 520S

Transcript of Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA...

Page 1: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Real-Time CORBA

Chenyang LuCSE 520S

Page 2: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

CORBACommon Object Request Broker Architecture

Ø CORBA specificationsq OMG is the standards body

q Over 800 companiesq CORBA defines interfaces, not implementations

Ø Object Request Brokers (ORB) allow clients to invoke operations on distributed objects transparently ofq object location

q programming language

q operating system

q communication protocols and interconnectq hardware

2

Page 3: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

CORBA Architecture

Ø CORBA: Common Object Request Broker ArchitectureØ Remote Procedure Call (RPC): Client invokes operations on objects.Ø An Object =

q An interface specified by an Interface Definition Language (IDL) q Servant(s) that implements the IDL interface

3

Page 4: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

The ACE ORB (TAO)

4

Source: D.C. Schmidt, http://www.dre.vanderbilt.edu/~schmidt/TAO.html

• Open-source Real-Time CORBA

• >> 1M SLOC

• 100+ person years of effort

• Pioneered R&D on DRE middleware design & optimization

Page 5: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Application Example: Avionics

5

• Deterministic & statistical deadlines• ~20 Hz

• Low latency & jitter • ~250 us

• Periodic & aperiodic processing• Complex dependencies• Continuous platform upgrades

• Test flown at China Lake NAWS by Boeing OSAT II '98• www.cs.wustl.edu/~schmidt/TAO-boeing.html

• Also used on SOFIA project by Raytheon• sofia.arc.nasa.gov

• First use of Real-time CORBA in avionics• Drove Real-time CORBA standardization

• Apply COTS & open systems to mission-critical real-time avionics

Page 6: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Application Example: Hot Rolling Mills

6

• Goals: Control the processing of molten steel moving through a hot rolling mill in real-time

•System Characteristics•Hard real-time process automation requirements• i.e., 250 ms real-time cycles

•System acquires values representing plant’s current state, tracks material flow, calculates new settings for the rolls & devices, & submits new settings back to plant

•Key Software Solution Characteristics

• Affordable, flexible, & COTS• Product-line architecture• Design guided by patterns & frameworks

• Windows NT/2000• Real-time CORBA

•www.siroll.de

Page 7: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Application Example: Image Processing

7

• Goals: Examine glass bottles for defects in real-time

•System Characteristics• Process 20 bottles/sec

• ~50 ms per bottle• Networked configuration• ~10 cameras

•Key Software Solution Characteristics• Affordable, flexible, & COTS• Embedded Linux• Compact PCI bus + Celeron processors

• Remote booted by DHCP/TFTP• Real-time CORBA

•www.krones.com

Page 8: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

RPC in CORBA

Ø CORBA: Common Object Request Broker ArchitectureØ Remote Procedure Call (RPC): Client invokes operations on objects.Ø An Object =

q An interface specified by an Interface Definition Language (IDL) q Servant(s) that implements the IDL interface

8

Page 9: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Limitations of CORBA

Ø Lacks QoS specification interfaces to applicationsq Applications cannot specify rate, deadline or importance

Ø Lacks QoS enforcementq Does not map task QoS specification to priorities of threadsq Contains significant priority inversion

Ø Lacks performance optimizationq Poor worst-case and average latency

9

Page 10: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Latencies and Priority Inversions

10

Page 11: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

The ACE ORB (TAO)

11

• Open-source Real-Time CORBA

• >> 1M SLOC

• 100+ person years of effort

• Pioneered R&D on DRE middleware design & optimization

Page 12: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

TAO Overview

12

• Based on ACE wrapper facades & frameworks

• Available on Unix, Win32, MVS, QNX, VxWorks, LynxOS, VMS...

• Thousands of users around the world

Commercially supportedhttp://www.dre.vanderbilt.edu/~schmidt/commercial-support.html

Container

ClientOBJREF

in argsoperation()out args +

return

DII IDLSTUBS

ORBINTERFACE

IDLSKEL

Object Adapter

ORB CORE GIOP/IIOP/ESIOPS

Component(Servant)

Services

Objective: Simplify the development of distributed real-time & embedded (DRE) systems

Approach: Use standard techology, patterns, & frameworks

Page 13: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

I/O Subsystem: Priority Inversions

Ø Messages are processed in FIFO order regardless of priorities

Ø Kernel has lower priority than real-time prioritiesq Processing of a high priority message in the kernel can be blocked by a

lower priority task at the application level

13

Page 14: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

I/O Subsystem: SolutionsØ Early demultiplexing

Ø Prioritized kernel processingØ Map task priority to kernel thread

Ø Note: This needs kernel support

14

Page 15: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

ORB Core: Priority InversionsØ Communication of different tasks shares a same socket connection.

Ø Incoming requests are demultiplexed to threads in FIFO order.

15

Page 16: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

ORB CorePriority-based Concurrency Architecture

Ø Server sets model: Each priority is processed by a separate thread.

Ø A separate connection is maintained for each priority in the server ORB.q Use buffered connections to reduce run-time overhead.

Ø Suitable for fixed priority scheduling.

16

Page 17: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Object Adapter: Problems

Ø Layered demultiplexing is inefficient in term of q average latency

q worst-case latency

17

Page 18: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Object Adapter: SolutionsØ Perfect hashing

q Generate a hash function offlineq Computational complexity O(1)

Ø De-layered active demultiplexingq Clients obtain index to (servant, operation) ahead of time

18

Page 19: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Reduce Priority Inversion

Conventional ORB TAO

19

Page 20: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Real-Time Event Service

•20

Page 21: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Limitations of RPC

Ø Tight coupling between clients and server

Ø Lacks asynchronous message delivery

Ø Lacks support for group communication

21

Page 22: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Motivating ApplicationsBoeing Bold Stroke Middleware Infrastructure Platform•Operations well defined

•Event-mediated middleware solution

Domain CompanyAvionics mission computing Boeing, RaytheonMass storage devices SUTMYN, StorTekMedical Information Systems Siemens, GESatellite Control LMCO COMSATTelecommunications Motorola, Lucent, Nortel,

Cisco, SiemensMissile & Radar Systems LMCO Sanders, RaytheonSteel Manufacturing Siemens ATDBeverage Bottling Automation Krones AG

Page 23: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

CORBA Event Service

Ø Asynchronous event delivery

Ø Decouples suppliers and consumersØ Support group communication

23

one to many

many to one

one to one

many to many

Page 24: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Event Delivery Models

24

Suppliers push to Event Channel, Event Channel pushes to Consumers

Event Channel pulls from Suppliers, Consumers pull from Event Channel

Suppliers push to Event Channel, Consumers pull from Event Channel

Event Channel pulls from Suppliers, Event Channel pushes to Consumers

Page 25: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

CORBA Event Service Limitations

Ø Broadcasts any supplied event to all consumers

Ø No filtering or correlation

Ø No real-time event dispatching/scheduling

Ø No periodic event

25

X

X X

Page 26: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

TAO Real-Time Event Service

Ø Suppliers specify types of events generated.

Ø Consumers subscribe to interested event types, to events from specific suppliers, or both.

26

event A:S1event B:S2

event C:S3

event B:S4

Page 27: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Event Channel ArchitectureØ Push-push model for real-time delivery

Ø Modularity: features are implemented in pluggable modules

27

Page 28: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Suspend and Resume

Ø Light-weight operations to suspend/resume event delivery

Ø Useful for frequent changes in consumer setsq Mode change

28

Page 29: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Periodic Events

Ø Consumers can register for timeout events provided by Event Service

Ø Timeout events dispatched according to priority of consumer

29

Page 30: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Event Correlation

Ø Provides event correlationq Conjunctive (“AND”)

q Disjunctive (“OR”)

30

Conjunctive correlation

Page 31: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Scheduling Service

Ø Separates dispatching mechanism from scheduling policy

Ø Dispatcher consults run-time scheduler for priorities

Ø Flexibility for different scheduling policies (e.g., RMS, EDF, MUF)

31

Page 32: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Real-Time Event Dispatching

32

Kokyu Dispatching Queue

DispatchingThread

Kokyu Dispatching Queue

Kokyu Dispatching Queue

DispatchingThread

DispatchingThread

High Priority

Low Priority

Page 33: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

CritiquesØ Full compatibility with CORBA

q Too complex and heavy-weight for embedded systems?

Ø Centralized event channelq Scalability for distributed systems à federated event channel

q Single point of failure à fault tolerant event channel

Ø Overhead of redirection

Ø Support for multicore and multiprocessor platforms.

33

Page 34: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

Federated Event ChannelØ Gateway forwards events to remote processors.

Application Processor 1

Application Processor 2

Application Processor 3

T12 T13T11

ECEC EC

GatewayGateway

Page 35: Real-Time CORBAlu/cse520s/slides/event.pdfCORBA Common Object Request Broker Architecture ØCORBA specifications qOMG is the standards body qOver 800 companies qCORBA defines interfaces,

SourceØ Slides partially based on Douglas Schmidt’s TAO tutorial and Joe Hoffert’s

class presentation.

35