A ToolSuite for Prototyping
Sense-Compute-Control (SCC) Applications
Dimitris Soukaras, Pankesh Patel
(Tool Demo)
Illustrative example: building system
2
Smoke
detector
User interfaces
(e.g., display,
mobile phones)
Fire
alarm
Badge
reader
User with
badge
Data
storage
Light
Temperature
sensor
Heater
• Heterogeneous
• Large number
• Development life cycle
Goal
3
“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.
Commonality
at various levels
4
Functionality
(e.g., home
fire detection
Domain
(e.g., building
HVAC)
(e.g., Inria
Office)
(e.g., Google
Office)
Deployment
Room
temperature
(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 ofThings, 2010]
Building fire
state
“Reusability
across concerns”
5
Domain
Room
temperature
(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
temperature
(e.g. building
automation)
Functionality
Functionality
Home fire
detection
Building
HVAC
Computational
service
Actuator
Sensor
Computational
service
publish/
subscribe
Concepts that are responsible for
- processing data and taking decisions
Building fire
state
command
7
Domain
Room
temperature
(e.g. building
automation)
Deployment
Functionality
Inria
office
Google
office
Deployment
Device
Device
Device
Device
Building fire
state
Concepts to describe various
properties of devices
Home fire
detection
Building
HVAC
Computational
service
Actuator
Sensor
Computational
service
publish/
subscribe
command
8
Room
Controller
Heater
SetTemp()
Temperature
Sensor
temp
Measurement
Hello world application
- smart building
Room
AvgTemp
publish/
subscribe
command
Our
approach
9
Domain
expert
Vocabulary
spec.
Compilation
of vocabulary
Device
developer
Device
driver
Vocabulary
framework
Architecture
spec. Compilation
of architecture
Deployment
spec.
Mapper
Application
developer
Application
logic
Architecture
framework
Software designer
Network
manager
Linker
Android
devices
PC
PC
Mapping
files
Generated code
For Device X
Middleware
Domain
concern
10
Domain
expert
Vocabulary
spec.
Compilation
of vocabulary
Room
Controller
Heater
SetTemp()
Temperature
Sensor
temp
Measurement
Room
AvgTemp
TemperatureSensor
generate tempMeasurement:TempStruct;
Heater
action SetTemp(temp:TempStruct);
TempStruct
tempValue: double;
unitofMeasurement : String;
Functional
concern
11
Domain
expert
Vocabulary
spec.
Compilation
of vocabulary
Architecture
spec.
Software designer
Heater
SetTemp()
Temperature
Sensor
temp
Measurement
Room
AvgTemp
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.
Compilation
of 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 for
Subscription
request
Concrete
method for
Receiving
notifications
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.
Compilation
of vocabulary
Deployment
spec.
Mapper
Network
manager
Deployment
concern
Mapping
files
Architecture
spec. Compilation
of architecture
Application
developer
Application
logic
Architecture
framework
Software designer
Device3:
…
Deployment
specification
16
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.
Compilation
of vocabulary
Device
developer
Device
driver
Vocabulary
framework
Deployment
spec.
Mapper
Network
manager
Mapping
files
Platform
concern
Architecture
spec. Compilation
of architecture
Application
developer
Application
logic
Architecture
framework
Software designer
Implementing
device driver
18
public interface ITemperatureSensor {
public TempStruct getTempMeasurement();
public void getTempMeasurement(ListenerTempMeasurement handler);
}
Compiler
generates
TemperatureSensor
generate tempMeasurement:TempStruct;
Implementing
device driver
19
Device
developer
implements
interfaces
public class JavaSETemperatureSensor
implements ITemperatureSensor {
@Override
public TempStruct gettempMeasurement() {
// TODO: Write Device Driver
}
@Override
public void gettempMeasurement(ListenertempMeasurement handler) {
// TODO: Write Device Driver
}
}
20
Domain
expert
Vocabulary
spec.
Compilation
of vocabulary
Device
developer
Device
driver
Vocabulary
framework
Architecture
spec. Compilation
of architecture
Deployment
spec.
Mapper
Application
developer
Application
logic
Architecture
framework
Software designer
Network
manager
Linker
Android
devices
PC
PC
Mapping
files
Generated code
For Device X
Middleware
21
Demo

A tool suite for prototyping internet of things applications