A Generative Programming Approach to Developing Pervasive Computing Systems
-
Upload
damien-cassou -
Category
Technology
-
view
106 -
download
0
description
Transcript of A Generative Programming Approach to Developing Pervasive Computing Systems
A Generative Programming Approach to Developing Pervasive
Computing Systems
Damien Cassou, Benjamin Bertran, Nicolas Loriant and Charles Consel
GPCE'09
2
Pervasive Computing Systems
3
4
hardware/software
functionalities
interfaces
Pervasive Computing
● heterogeneity● lack of structuring● dynamicity● multiple expertise● testing
5
Pervasive Computing
● heterogeneity● lack of structuring● dynamicity● multiple expertise● testing
implicit interactions
no global reasoning
multi-roles components
6
Pervasive Computing
● heterogeneity● lack of structuring● dynamicity● multiple expertise● testing
incremental deployment
mobility
entity malfunction
7
Pervasive Computing
● heterogeneity● lack of structuring● dynamicity● multiple expertise● testing
hardware
network protocols
middleware
user needs
8
Pervasive Computing
● heterogeneity● lack of structuring● dynamicity● multiple expertise● testing
time consuming
cost ineffective
limited situations
9
Pervasive Computing
● heterogeneity● lack of structuring● dynamicity● multiple expertise● testing
● Existing approaches● general purpose● partial
10
Our approach
11
Our approach
12
Fire managementscenario
13
14
DSL to describe a hierarchy of devices● attributes● data gathered● actions supported
1 Taxonomy
15
1 Taxonomy
device SmokeDetector (Location loc){
source Smoke;
}
struct Smoke {
boolean isDetected;
}
16
device Sprinkler (Location loc) {
action OnOff;
}
action OnOff {
on(); off();
}
1 Taxonomy
17
18
DSL to instantiate a commonpervasive computing architectural pattern
2 Architecture
19
2 Architecture
20
2 Architecture
context SmokeDetected: boolean { source Smoke from SmokeDetector;}
context FireState: boolean { context SmokeDetected; context AverageTemperature;}
21
controller FireController {
context FireState;
action Activation on Alarm;
action OnOff on Sprinkler;
}
2 Architecture
22
3 Generated programming framework
● generated from the description● dedicated to the application
in a GPL!
23
3 Generated programming framework
● guides the implementation● abstracts the distributed back-end● provides high level support
in a GPL!
24
3 Generated programming framework
...
25
3 Generated programming framework
● interfaces● proxies● composites● support
➢ discovery➢ RPC
● and more
26
4 Application development
guided by the descriptionthrough the generated framework
27
4 Application development
class MyFireCtrl extends FireController { @Override void fireStateChanged(boolean fire, Location loc) { if (fire) { discover(sprinklersWhere()…).on(); … } … }}
controller FireController { context FireState; action OnOff on Sprinkler; …} architecture
framework
user code
device discovery remote procedure call
query language
28
5 Generated simulation support
29
5 Generated simulation supportEditor
30
5 Generated simulation supportRuntime platform
no additional code!
31
Conclusion & Future work● From a small description of a
pervasive computing system
● a generated programming framework
– to guide the development– to ensure conformance
● a support for graphical simulation
● a middleware abstraction layer
● Non-functional properties
● security
● fault tolerance
● Further leveraging on existing approaches/tools
● unit testing
● refactoring
● Generalizing our approach to other domains