overview of prism-mw

17
Overview of Prism-MW CS 795 / SWE 699 Sam Malek Spring 2010

Upload: astrid

Post on 11-Feb-2016

50 views

Category:

Documents


0 download

DESCRIPTION

Overview of Prism-MW. CS 795 / SWE 699 Sam Malek Spring 2010. Prism-MW - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Overview of Prism-MW

Overview of Prism-MW

CS 795 / SWE 699Sam MalekSpring 2010

Page 2: Overview of Prism-MW

2

Prism-MW

A simple and extensible architectural middleware, i.e., a framework of abstract classes for architectural concepts such as (sub)systems, components, connectors, and events. The middleware supports composition of arbitrarily complex components and connectors.

Objectives

• “Programming”• Architectural abstractions

directly reified in the implementation

• “Small”• Efficiency demanded by

resource constraints• “Many”

• Scalability in the numbers of devices, threads, components, connectors, events

• Extensibility to support awareness, mobility, reconfigurability, security, delivery guarantees

Page 3: Overview of Prism-MW

Prism: Programming-in-the-Small-and-Many

Page 4: Overview of Prism-MW

Prism Challenges Resource constraints

Demand highly efficient computation, communication, and memory footprint

Demand unorthodox solutions e.g., off-loading components

Hardware and software heterogeneity Proprietary operating systems Dialects of programming languages Device-specific data formats Lack of support for inter-device

interaction Lack of support for code mobility

Page 5: Overview of Prism-MW

From architecture to implementation

Architectures provide high-level concepts Components, connectors, ports, events, configurations

Programming languages provide low-level constructs Variables, arrays, pointers, procedures, objects

Bridging the two often is an art-form Middleware can help “split the difference”

Existing middleware technologies Support some architectural concepts (e.g., components,

events) but not others (e.g., configurations) Impose particular architectural styles

End result architectural erosion Architecture does not match the implementationWhat is needed is “architectural middleware”

Page 6: Overview of Prism-MW

Prism-MW An architectural middleware for embedded

systems Supports architecture-based software

development Architecture-based software development is the

implementation of a software system in terms of its architectural elements

Efficient Scalable Flexible and Extensible

Allows us to cope with heterogeneity Supports arbitrary complex architectural styles

Page 7: Overview of Prism-MW

Architectural Middleware

Natively support architectural concepts as middleware constructs

Include system design support Typically via an accompanying ADL and analysis tools

Support round-trip development From architecture to implementation and back

Support automated transformation of architectural models to implementations

i.e., dependable implementation Examples

ArchJava Aura c2.fw Prism-MW

Page 8: Overview of Prism-MW

Prism-MW

IComponentIConnector

AbstractMonitorScaffold

AbstractDispatcher

Round RobinDispatcher

AbstractScheduler

FifoScheduler

Brick

Architecture

AbstractTopology

ExtensibleComponent

Component

Connector

AbstractHandler

ExtensiblePort

ExtensibleEventEvent

Port

IPort

Abstract EventExtensions

...

Abstract PortExtensions

...

ExtensibleConnector

ExtensibleArchitecture

Serializable

AwarenessExtensions

...

IArchitecture

#mutualPort

AbstractImplementation

...Application

Specific Impl.

Abstract ConnBehaviorAbstract

AwarenessAbstract Comp

Behavior

Page 9: Overview of Prism-MW

IComponentIConnector

Scaffold

AbstractDispatcher

Round RobinDispatcher

AbstractScheduler

FifoScheduler

Brick

Architecture

ExtensibleComponent

Component

Connector

Event

Port

IPort

Serializable

IArchitecture

#mutualPort

Prism-MW

Page 10: Overview of Prism-MW

Architecture - DEMO

class DemoArch { static public void main(String argv[]) { Architecture arch = new Architecture ("DEMO");

Using Prism-MW

// create componentsComponentA a = new ComponentA ("A");ComponentB b = new ComponentB ("B");ComponentD d = new ComponentD ("D");

Component BComponent A Component D

// create connectorsConnector conn = new Connector("C");

CConnector C

// add components and connectors arch.addComponent(a);arch.addComponent(b);arch.addComponent(d);arch.addConnector(conn);

Component BComponent A

Component D

CConnector C

// establish the interconnectionsarch.weld(a, conn);arch.weld(b, conn);arch.weld(conn, d)

}}

Page 11: Overview of Prism-MW

Component B handles the event and sends a response

public void handle(Event e){

if (e.equals("Event_D")) {... Event e1= new Event("Response_to_D");e1.addParameter("response", resp);send(e1);}...

}

Send

(e1)

Using Prism-MW

Architecture - DEMO

Component BComponent A

Component D

CConnector C

Component D sends an event

Event e = new Event ("Event_D");e.addParameter("param_1", p1);send (e);

Send (e)

Page 12: Overview of Prism-MW

Event Dispatching

Component BComponent A

Component D

E1

E2 E

3E

4E

5

send

Eve

ntha

ndle

Eve

nt

Thread Pool

E

X E

Component B

Network

Connector C

X

E2

2E

Scaffold Adaptation of an existing worker thread pool technique Topology based routing Single event queue for both

locally and remotely generated events

Easy redeployment and redistribution of applications onto different hardware configurations

Page 13: Overview of Prism-MW

Prism-MW Performance

Efficiency• 1750 SLOC• 4600 B for the core• 160 B per component• 240 B per connector• 70 B per weld• 160 B per event• 240 B per event parameter

100 001 components100 000 connectors

Total event roundtrip time 2.7 sec

Scalability• Numbers of devices, threads and events

not limited by Prism-MW• Numbers of components and connectors

available_memory – middleware_sizeaverage_element_size

Page 14: Overview of Prism-MW

Prism-MW Benchmarks on a PC

1000001000010001001

10050

101

0

500

1000

1500

2000

2500

3000

Time (ms)

Number of events

Number of components

100 2674 300 50 20 20

50 1843 211 40 20 10

10 1222 150 30 11 10

1 1081 131 30 10 1

1E+05 10000 1000 100 1

Page 15: Overview of Prism-MW

Prism-MW has been adopted by several industry partners

Troops Deployment SimulationUS Army

MIDASBosch Research and Technology Center

Page 16: Overview of Prism-MW

Architecture of MIDAS

Legend:

NodeInfoSvc SDEngine

SessionAdministrator

SessionOperator

Component

Request Port Reply Port Distribution Request Port

Distribution Reply Port

SensorProcessor

GwToHubProcessor

GwToGwProcessor

Gateway Architecture Hub Architecture

SDEngine

Hub Operator

EventNotificationSvc

TroubleLogSvc

ServiceMeta-level Comp

PDA Architecture

EventDisplay

DeployerAdmin

Admin

SDEngine

To other gateways

To other PDA

s

Service-OrientedSub-Architecture

Publish-SubscribeSub-Architecture

FileInputSvc

Peer-to-Peer Sub-Architecture

To sensors

To other gateways

Prism-MW Architecture

Pointer

Connector

Pub-Sub Conn

Pub-Sub Conn

Pub-Sub Conn

Pub-Sub Conn

Pub-Sub Conn

Unicast C

onn

TopologyCalculator

Page 17: Overview of Prism-MW

Recent Progress