Upload
pankesh-patel
View
122
Download
1
Embed Size (px)
DESCRIPTION
Citation preview
A ToolSuite for Prototyping Sense-Compute-Control (SCC) Applications
Dimitris Soukaras, Pankesh Patel
(Tool Demo)
2
Illustrative example: building system
Smoke detector
User interfaces(e.g., display, mobile phones)
Firealarm
Badge reader
User withbadge
Data storage
Light
Temperature
sensorHeater
• Heterogeneous• Large number• Development life
cycle
3
Goal
“Enable development** of SCC applications with minimal effort by various stakeholders* involved in
development process”
**Development -- “a set of related activities that leads to a production of a software product.’’ [Ian Sommerville, Software Engineering (9th edition) , 2010]
*Stakeholders in software engineering to mean – people, who are involved in the application development. Examples of stakeholders defined in [Taylor et al., Software Architecture, 2009] are software designer, developer, domain expert, technologist, etc.
4
Commonality at various levels
Functionality (e.g., home
fire detection
Domain
(e.g., building HVAC)
(e.g., Inria Office)
(e.g., GoogleOffice)
Deployment
Room temperatur
e
(e.g. building automation)
“Entities of Interest (EoI) is an object, including the attributes that describes
it, and its state that is relevant from a user or an application perspective.” [Stephan Haller, Internet of Things,
2010]
Building fire state
“Reusabilityacross concerns”
5
Domain
Room temperatur
e
(e.g. building automation)
Domain
Concepts that are responsible for interacting with EoI of a domain- sensor, actuator
Building fire state
Actuator
Sensor
6
Domain
Room temperatur
e
(e.g. building automation)
Functionality
FunctionalityHome fire detection
Building HVAC
Computationalservice
Actuator
Sensor
Computationalservice
publish/subscribe
Concepts that are responsible for - processing data and taking decisions
Building fire state
command
7
Domain
Room temperatur
e
(e.g. building automation)
Deployment
Functionality
Inria office
Googleoffice
Deployment
Device
Device
Device
Device
Building fire state
Concepts to describe various
properties of devices
Home fire detection
Building HVAC
Computationalservice
Actuator
Sensor
Computationalservice
publish/subscribe
command
8
Room Controller
Heater
SetTemp()
TemperatureSensor
tempMeasurement
Hello world application - smart building
RoomAvgTemp
publish/subscribe
command
9
Our approach
Domain expert
Vocabulary
spec.
Compilationof
vocabulary
Device develop
er
Device driver
Vocabulary
framework
Architecture
spec.Compilation
of architecture
Deployment spec.
Mapper
Application developer
Application logic
Architecture
framework
Software designer
Networkmanager
Linker
Android devices
PC
PC
Mapping
files
Generated codeFor Device X
Middleware
10
Domain concern
Domain expert
Vocabulary
spec.
Compilationof
vocabulary
Room Controller
Heater
SetTemp()
TemperatureSensor
tempMeasurement
RoomAvgTemp
TemperatureSensor generate tempMeasurement:TempStruct;
Heater action SetTemp(temp:TempStruct);
TempStruct tempValue: double; unitofMeasurement : String;
11
Functional concern
Domain expert
Vocabulary
spec.
Compilationof
vocabulary
Architecture
spec.
Software designer
Heater
SetTemp()
TemperatureSensor
tempMeasurement
RoomAvgTemp
Room Controller
RoomAvgTemp consume tempMeasurement from hops:0:Room; generate roomAvgTemp:TempStruct; in-region:Room;
Scope of consuming data.Scope of
Deployment
12
Domain expert
Vocabulary
spec.
Compilationof
vocabulary
Architecture
spec.Compilation
of architecture
Application developer
Architecture
framework
Software designer
Functional concern
Application logic
13
RoomAvgTemp consume tempMeasurement from hops:0:Room; generate roomAvgTemp:TempStruct; in-region:Room; Compiler
generates
private String partitionAttribute = "Room"; public void subscribeTempMeasurement() {
PubSubMiddleware.subscribe(this, “tempMeasurement", subscriptionCondition);} public void notifiedReceived (String event Name, Object arg, Device deviceInfo) { if (eventName.equals(“tempMeasurement”) { onNewTempMeasurement((TempStruct) arg) ; }}
public abstract void onNewTempMeasurement(TempStruct arg);
Implementing application logic
Concrete method
forSubscripti
onrequest Concrete method
forReceivingnotificatio
ns
14
public abstract void onNewTempMeasurement(TempStruct arg);
Implementing application logic
public void onNewtempMeasurement(TempStruct arg) { // Write here Application Logic of Calculating Average Temperature}
Application
developer
Implement abstract method to write application logic
15
Domain expert
Vocabulary
spec.
Compilationof
vocabulary
Deployment spec.
MapperNetworkmanager
Deployment concern
Mapping
files
Architecture
spec.Compilation
of architecture
Application developer
Application logic
Architecture
framework
Software designer
Device3:…
16
Deployment specification
Device1: region: Building:15 ; Floor:11; Room:1; resources: TemperatureSensor; type:JavaSE;
Device3:…
Location of device
Type platform a device runs on
Device2: region: Building:15 ; Floor:11; Room:1; resources: Heater; type:JavaSE;
17
Domain expert
Vocabulary
spec.
Compilationof
vocabulary
Device develop
er
Device driver
Vocabulary
framework
Deployment spec.
MapperNetworkmanager
Mapping
files
Platformconcern
Architecture
spec.Compilation
of architecture
Application developer
Application logic
Architecture
framework
Software designer
18
Implementing device driver
public interface ITemperatureSensor { public TempStruct getTempMeasurement(); public void getTempMeasurement(ListenerTempMeasurement handler);}
Compiler
generates
TemperatureSensor generate tempMeasurement:TempStruct;
19
Implementing device driver
Device develope
r
implements
interfaces
public class JavaSETemperatureSensor implements ITemperatureSensor {
@Overridepublic TempStruct gettempMeasurement() { // TODO: Write Device Driver}
@Overridepublic void gettempMeasurement(ListenertempMeasurement handler) {
// TODO: Write Device Driver }}
20
Domain expert
Vocabulary
spec.
Compilationof
vocabulary
Device develop
er
Device driver
Vocabulary
framework
Architecture
spec.Compilation
of architecture
Deployment spec.
Mapper
Application developer
Application logic
Architecture
framework
Software designer
Networkmanager
Linker
Android devices
PC
PC
Mapping
files
Generated codeFor Device X
Middleware
21
Demo