spatial views: space-aware programming for networks of embedded systems
DESCRIPTION
Spatial Views: Space-aware Programming for Networks of Embedded Systems. Yang Ni, Ulrich Kremer, and Liviu Iftode Rutgers University. This work has been supported by NSF ITR Award ANI-0121416. NES: A New Computing Platform. NES: A New Computing Platform. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/1.jpg)
Spatial Views: Space-aware Programming for Networks of Embedded
Systems
Yang Ni, Ulrich Kremer, and Liviu Iftode
Rutgers University
This work has been supported by NSF ITR Award ANI-0121416.
![Page 2: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/2.jpg)
LCPC 2003 EEL Lab, Rutgers University 2
NES: A New Computing Platform
![Page 3: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/3.jpg)
LCPC 2003 EEL Lab, Rutgers University 3
NES: A New Computing Platform
![Page 4: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/4.jpg)
LCPC 2003 EEL Lab, Rutgers University 4
NES: A New-Generation Computing Platform
(contd.) Many potential applications for NES
What’s the traffic 10 miles ahead? Is there a man in red near Terminal A? Find a cab.
How to program them?Will existing models work?
![Page 5: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/5.jpg)
LCPC 2003 EEL Lab, Rutgers University 5
What’s Special About NES?Location-sensitivity.
A node is interesting because of its location in addition to its functionality.Context-awareness often translates into location-awareness.
Volatility.Nodes join and leave at any time.
Resource-limitation.Execution time and battery life are limited.
![Page 6: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/6.jpg)
LCPC 2003 EEL Lab, Rutgers University 6
How to program NES?Existing programming models do not sufficiently address all those issues specific to NES.We need a high-level programming model with:
Location-awarenessLocation specification at the programming levelLocation-based operation at the programming level
Dynamic integration of servicesDiscover and use services dynamically in an ad-hoc network
Adaptation to resource-limitationsQoR (Quality of Results) and resource tradeoff
![Page 7: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/7.jpg)
LCPC 2003 EEL Lab, Rutgers University 7
MotivationSpatial Views Programming ModelSpatial Views Application Example
ExperimentsRelated WorkConclusions
![Page 8: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/8.jpg)
LCPC 2003 EEL Lab, Rutgers University 8
Basic Programming Abstraction in Spatial Views
Nodes are abstracted as (service, location)
A physical node providing multiple services represent multiple virtual nodesA moving physical node represent multiple virtual nodesTime is an implicit dimension, the value of which is always the time when a node is visited and used
![Page 9: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/9.jpg)
LCPC 2003 EEL Lab, Rutgers University 9
Spatial Views
A dynamic collection of virtual nodes that provide an interesting service and are located in an interesting space.
SV(service,space) {virtual node x | x.ofClass isA service and x.location space}.SV(service) = SV(service, anywhere).
Service: named with interfaces (abstract classes) with agreed-on semantics
![Page 10: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/10.jpg)
LCPC 2003 EEL Lab, Rutgers University 10
Iterators and SelectorsIterators and Selectors instantiate Spatial Views.
Iterators enumerate all possible nodes in a view within a time constraint.Selectors stop after the first successful discovery, or timeout.
Time Constraint is necessary because Spatial Views can be infinite.
![Page 11: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/11.jpg)
LCPC 2003 EEL Lab, Rutgers University 11
Application Example
Find a person in red on the third floor of a building
STARTSTOP
![Page 12: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/12.jpg)
LCPC 2003 EEL Lab, Rutgers University 12
SpatialView cameraView = new SpatialView("Camera", BuschCampus.CoRE.Floor3);
foreach camera in cameraView do within 30000 {
Picture pic = camera.getPicture();
Rectangle redRegion = pic.findRegionInColor(Color.Red);
if (redRegion != null) {
SpatialView detectorView = new SpatialView("FaceDetector");
Rectangle face;
forany detector in detectorView do within 10000
face = detector.detectFaceInPicture(pic);
Location loc = camera.getLocation();
if (face !=null && face.isCloseTo(redRegion))
System.out.println("A person in red is found at " + loc);
else
System.out.println("Something red is found at " + loc);
}
}
![Page 13: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/13.jpg)
LCPC 2003 EEL Lab, Rutgers University 13
MotivationSpatial Views Programming ModelSpatial Views Application Example
ExperimentsRelated WorkConclusions
![Page 14: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/14.jpg)
LCPC 2003 EEL Lab, Rutgers University 14
Experiments: Implementation
Spatial Views Program
Spatial Views Compiler
Java Bytecode
Spatial Views Virtual MachineSpatial Views Library
Modified Sun javac 1.3.1Supporting space definition and Spatial View iteration.
Modified Sun KVM/CLDC 1.3Supporting migration and discovery
![Page 15: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/15.jpg)
LCPC 2003 EEL Lab, Rutgers University 15
Experiment 1: Person Search Application
Execution TimeWith face detection: 23.1 secondsWithout face detection: 10.0 seconds
Routing: gossiping with backtracking
![Page 16: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/16.jpg)
LCPC 2003 EEL Lab, Rutgers University 16
Experiment 2:Quality of Result v.s. Time/Resource Usage
QoR QoR
Resource Resource
![Page 17: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/17.jpg)
LCPC 2003 EEL Lab, Rutgers University 17
Experiment 2:Effects of Time Constraints
Perfect answer: 8 nodes
Perfect Answer: 5 nodes
![Page 18: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/18.jpg)
LCPC 2003 EEL Lab, Rutgers University 18
Execution time v.s. Network Link Failure Rate
(1)
0
2000
4000
6000
8000
10000
12000
60 70 80 90 100
Link Failure Rate (% )
Execu
tion T
ime (
ms)
w/ o constr.w/ constr.timeout
![Page 19: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/19.jpg)
LCPC 2003 EEL Lab, Rutgers University 19
Quality of Result (QoR) v.s.
Network Link Failure Rate
0
1
2
3
4
5
6
7
8
Number of Nodes Visited
60 70 80 82 85 87 90 92 95 97 98
Link Failure Rate (% )
line
![Page 20: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/20.jpg)
LCPC 2003 EEL Lab, Rutgers University 20
Execution time v.s. Network Link Failure Rate
(2)
0500
100015002000250030003500400045005000
60 70 80 90 100
Link Failure Rate (% )
Execu
tion T
ime (
ms)
w/ o constr.w/ constr.timeout
![Page 21: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/21.jpg)
LCPC 2003 EEL Lab, Rutgers University 21
Quality of Result (QoR) v.s.
Network Link Failure Rate
00.5
11.5
22.5
33.5
44.5
5
Number of Nodes Visited
60 70 80 82 85 87 90 92 95 97 98
Link Failure Rate (% )
net
![Page 22: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/22.jpg)
LCPC 2003 EEL Lab, Rutgers University 22
Related WorkLocation technology: GPS, APS(Rutgers), Cricket (MIT), RADAR (Microsoft Research), Active Badges (AT&T), Bats (AT&T).Service discovery: Jini (SUN), INS (MIT), SDS(Berkeley), SLP, Salutation, Bluetooth SDP.Migratory execution: Smart Messages (Rutgers), Active Messages (Berkeley) and Mobile Agents including D’Agent (Dartmouth), Java Aglet (IBM).Sensor Networks: nesC(Berkeley)
![Page 23: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/23.jpg)
LCPC 2003 EEL Lab, Rutgers University 23
ConclusionsSpatial Views is a programming model for dynamic and resource-limited networks of embedded systemsThe first space-aware programming model with best-effort semanticsSimple and expressive, prototype and applications implemented
![Page 24: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/24.jpg)
LCPC 2003 EEL Lab, Rutgers University 24
Thank you!
![Page 25: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/25.jpg)
LCPC 2003 EEL Lab, Rutgers University 25
Experimental Setup
10 iPAQ PDA’sH3800 & H3600 Mercury camera sleeves
802.11b wireless networkFamiliar Linux, Kernel 2.4.18Customized KVM/CLDC 1.0.3Customized Javac 1.3.1
![Page 26: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/26.jpg)
LCPC 2003 EEL Lab, Rutgers University 26
Experiment 2:One-hop Migration Time
050
100150200250300350400450
6928
4
7761
2
8580
8
9400
0
1021
92
1103
84
1185
76
Live data size
Mig
rati
on t
ime
iPAQ-wirelessPC-wired
![Page 27: Spatial Views: Space-aware Programming for Networks of Embedded Systems](https://reader035.vdocuments.mx/reader035/viewer/2022070406/56814122550346895dacf896/html5/thumbnails/27.jpg)
LCPC 2003 EEL Lab, Rutgers University 27
Syntax<SpatialView> <identifier><Iterator> foreach <var> in <SpatialView> do <TimeConstraint> [constraints] <statement><Selector> forany <var> in <SpatialView> do <TimeConstraint> [constraints] <statement><TimeConstraint> within <NumberOfMilliSeconds>