The PerIDL Specification Defining a Pervasive Computing Area The

Command. Renderer. SessionInput. Audio audioCapacities. PDA. PlasmaScreen. Domain Expert. Service class name. Semantic properties.
12MB taille 3 téléchargements 314 vues
Motivations

Contributions

• Pervasive computing applications need robustness • Current approaches: • Middleware are too generic • There is a lack of programming support

• PerIDL: Declarative support for characterizing pervasive computing areas • PerGen: A PerIDL compiler to generate area-specific programming frameworks • Programming support for developing pervasive computing services • Consistency verifications from design to compile time, to run time • PerGen middleware: run time support for pervasive computing applications

The PerIDL Specification Defining a Pervasive Computing Area Service class name

A PerIDL specification for the Building Surveillance Area

- describe non functional variations of a class of services Semantic properties - defined by data types - used by the service discovery mechanism - describe how services interacts with each other - Specify the interaction mode (command | event | session) - Specify the control flow (input | output) - Specify the exchanged data types

Functionalities

• PerIDL specifications define • A taxonomy of service classes relevant to a given area

Domain Expert Device

DataCenter

Location location Command

interface Webcam : Device { attribute Video videoCapacities; SessionInput(Video video); }

interface MotionDetectingWebcam : ZoomingWebcam { EventOutput(Motion motion); }

Declarative support for consively characterizing a pervasive area

Service Command

interface ZoomingWebcam : Webcam { attribute boolean isOpticalZoom; void rotate(int angle); void tilt(int angle); void zoom(Region region); }

PerIDL: Domain-specific Interface Definition Language (IDL)

Webcam Video videoCapacities SessionInput

Manager Priority priority

Command

Actuator

Contact

Renderer

Command

Agenda

MotionDetection Manager

EventOutput

Command

EventInput SessionBinder

PTZWebcam bool hasOpticalZoom int zoomPower Command

Light

MotionDetecting Webcam

• PerIDL specifications are • Used by programmers as a high-level reference model • Checked for consistency at both area and application levels

Screen Video videoCapacities SessionInput

Command

• Functionalities and properties of each service class

• Passed to a compiler that generates programming frameworks PlasmaScreen

PDA Audio audioCapacities SessionInput

EventOutput

The PerGen Compiler Generating the Programming Framework

Example: framework for MotionDetectionManager

PerGen Compiler

interface

functionality

"interface" IManager

"interface" StartStop + start() + stop()

PerGen Compiler

"interface" IVideoSessionBinder + bridge(1: IMotionVideoSessionInput, s2: IMotionVideoSessionInput): int + disconnect(int) + disconnect(s: VideoSession)

• Checks PerIDL consistency • Generates an Area-Specific Programming Framework

"interface" IMotionDetection Manager

PerGen Compiler

PerGen Middleware

abstract service

• Adressing pervasive computing environments • Generic Service Broker • Customized w.r.t. the target application area • PerGen Programming Framework • Supporting 3 Interaction Modes

Event Notification

Service Broker

}

Generic

• Session (Parameter negotiation)

The PerGen Programming Framework Supporting Pervasive Computing Applications Development • Defining a service by extending its corresponding abstract class • Service registration by calling the parent constructor • Semantic property (e.g., priority) • Abstract methods (e.g., receive) • Provided methods (e.g., bridge)

public class HallMotionDetectionManager extends MotionDetectionManager { private MotionDetectingWebcam myWebcam; public HallMotionDetectionManager(String uri) { super(uri); priority.set(Priority.HIGH);

public class HallMotionDetectionManager extends MotionDetectionManager {

MotionDetectingWebcamFilter filter = MotionDetectingWebcam.getFilter(); filter.location.set(Location.HALL); filter.hasOpticalZoom.set(true); myWebcam = MotionDetectingWebcam.getService(filter);

public HallMotionDetectionManager(String uri) { super(uri); // TODO Auto-generated constructor stub } public void receive(Motion event, Service source) { // TODO Auto-generated method stub }

}

public void start() { // TODO Auto-generated method stub }

Class skeleton as generated by an IDE (e.g., Eclipse)

2. Refining the filter by specifying semantic properties

}

# bridge(s1: IMotionVideoSessionInput, s2: IMotionVideoSessionInput): int # disconnect(int) + getService(MotionDetectionManagerFilter): MotionDetectionManager + getServices(MotionDetectionManagerFilter) : LinkedList + getFilter(): MotionDetectionManagerFilter

+ receive(event: Event) + disconnect(s: VideoSession)

MotionDetectionManagerFilter

• Command: Abstract methods (e.g., zoom) • Event consumer • Abstract receive method for each event type • Event producer • Provided publish method for each event type • Subscriptions handled by the middleware • Session Invitee • Abstract connect and disconnect methods for each data type • Session Binder • Provided bridge and disconnect methods for each data type

• Service Registration Verifications (compile time) • Semantic property values (e.g., priority) • Service Discovery Verifications (compile time) • Service class filtering (e.g., PDA) • Semantic property values (e.g., location)

int idSession = bridge(myPDA, myWebcam); [...]

1. Selecting a filter to select a node in the PerIDL hierarchy

MotionDetectionManager

Verifications

PDAFilter filter = PDA.getFilter(); filter.owner.set(People.GUARD); PDA myPDA = PDA.getService(filter);

Service Discovery Support

MotionDetectionManager

myWebcam.subscribe(this);

public void receive(Motion event, Service source) { Region region = event.getRegion(); myWebcam.zoom(region);

public void stop() { // TODO Auto-generated method stub }

ManagerFilter + priority: Priority

Service Invocation Support

Application developers

Service Definition Support

Manager

• Abstract service classes support Service Definition • Concrete and abstract methods corresponding to functionalities • Instance variables corresponding to semantic properties • Filter classes support Service Discovery • Proxy classes support Remote Service Invocation

Middleware

• Event (Typed publish-subscribe)

ServiceFilter +uri: URI

+ start() + stop()

PerGen Programming Framework

• Command (RPC-like)

}

Manager + priority: Priority

Driver developers

Service Invocation

Service

Application developers

Applications

{

filter

proxy

Service + uri: URI

• Generic Service Invocation • Generic Event Notification

"interface" IMotionEventInput + receive(event: Motion)

• Service Invocation Verifications • Direction of interaction modes (compile time)

} [...]

• Connectivity of services (run time) • Typed service interaction (compile time)

3. Getting one or all services matching this filter

*

+

Wilfried Jouve , Julien Lancia , Nicolas Palix*, Charles Consel*, Julia Lawall§ *

{jouve, palix, consel}@inria.fr INRIA, Phoenix Research Group

+

[email protected] Thales / INRIA

§

[email protected] DIKU, Denmark