Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spatial Programming using Smart Messages: Design and Implementation Cristian Borcea, Chalermek Intanagonwiwat, Porlin Kang, Ulrich Kremer, and Liviu Iftode.

Similar presentations


Presentation on theme: "Spatial Programming using Smart Messages: Design and Implementation Cristian Borcea, Chalermek Intanagonwiwat, Porlin Kang, Ulrich Kremer, and Liviu Iftode."— Presentation transcript:

1 Spatial Programming using Smart Messages: Design and Implementation Cristian Borcea, Chalermek Intanagonwiwat, Porlin Kang, Ulrich Kremer, and Liviu Iftode Department of Computer Science Rutgers University

2 2 Distributed object tracking over a large geographical area Cars collaborating for a safer and more fluid traffic Computers Go Outdoors, Embedded Everywhere in the Physical World

3 3 Traditional (Indoor) Distributed Computing Computation is distributed for performance or fault tolerance Computation is distributed for performance or fault tolerance Relatively easy to program Relatively easy to program –Nodes are computationally equivalent –Networking is robust and has acceptable delays –Configuration is stable

4 4 Outdoor Distributed Computing Computation is physically distributed Computation is physically distributed –Nodes distributed across the physical space –Location-aware computing Hard to program Hard to program –Nodes are functionally heterogeneous and potentially mobile –Ad hoc wireless networks of embedded systems –Volatile configurations

5 5Example Mobile sprinkler with temperature sensor Left Hill Right Hill Hot spot “Water the hottest spot on the Left Hill” “Water the hottest spot on the Left Hill” Number and location of mobile sprinklers are unknown Number and location of mobile sprinklers are unknown Configuration is not stable over time Configuration is not stable over time –Sprinklers move –Temperature changes

6 6 Traditional Distributed Computing Does Not Work Well Outdoors End-to-end data transfers may hardly complete End-to-end data transfers may hardly complete Fixed address naming and routing (e.g., IP) are too rigid Fixed address naming and routing (e.g., IP) are too rigid Difficult to deploy new applications in existing networks Difficult to deploy new applications in existing networks Outdoor distributed computing requires novel abstractions and programming models Outdoor distributed computing requires novel abstractions and programming models –How to write outdoor distributed applications? –How to deploy new applications in existing networks?

7 7Outline Motivation Motivation Spatial Programming (SP) Model Spatial Programming (SP) Model SP Implementation using Smart Messages SP Implementation using Smart Messages SP Application SP Application Conclusions Conclusions

8 8 Traditional (Indoor) Programming Programs access data through variables Programs access data through variables Variables mapped to physical memory locations Variables mapped to physical memory locations Page Table and OS guarantee reference consistency Page Table and OS guarantee reference consistency Access time has an (acceptable) upper bound Access time has an (acceptable) upper bound Program Virtual Address Space Page Table + OS Physical Memory Variable access

9 9 From Indoor to Outdoor Computing Virtual Address Space Space Region Variables Spatial References Variables mapped to physical memory Spatial references mapped to systems embedded in the physical space Reference consistency Bounded access time ? ?

10 10 Spatial Programming (SP) at a Glance Provides a virtual name space over outdoor networks of embedded systems Provides a virtual name space over outdoor networks of embedded systems Embedded systems named by their locations and properties Embedded systems named by their locations and properties Runtime system takes care of name resolution, reference consistency, and networking aspects Runtime system takes care of name resolution, reference consistency, and networking aspects

11 11 radius Hill = new Space({lat, long}, radius); {lat,long} Space Regions Virtual representation of a physical space Virtual representation of a physical space Similar to a virtual address space in a conventional Similar to a virtual address space in a conventional computer system computer system Defined statically or dynamically Defined statically or dynamically

12 12 Spatial References Defined as {space:property} pairs Defined as {space:property} pairs Virtual names for embedded systems Virtual names for embedded systems Similar to variables in conventional programming Similar to variables in conventional programming Indexes used to distinguish among similar systems Indexes used to distinguish among similar systems in the same space region in the same space region {Hill:robot[0]} {Hill:robot[1]} {Hill:motion[0]} Hill r2 r7 m5

13 13 Reference Consistency At first access, a spatial reference is mapped to an embedded system located in the specified space At first access, a spatial reference is mapped to an embedded system located in the specified space Mappings maintained in per-application Mapping Table (MT) – similar to a page table Mappings maintained in per-application Mapping Table (MT) – similar to a page table Subsequent accesses to the same spatial reference will reach the same system (using MT) as long as it is located in the same space region Subsequent accesses to the same spatial reference will reach the same system (using MT) as long as it is located in the same space region {space, property, index} {unique_address, location}

14 14 Reference Consistency Example Left Hill Right Hill {Left_Hill:robot[0]}.move = ON; r2 r7 r5 {Left_Hill:robot[0]}.move = OFF;

15 15 Space Casting {Left_Hill:robot[0]} Left Hill Right Hill {Right_Hill:(Left_Hill:robot[0])}r7

16 16 Bounding the Access Time How to bound the time to access a spatial reference? How to bound the time to access a spatial reference? –Systems may move, go out of space, or disappear Solution: associate an explicit timeout with the spatial reference access Solution: associate an explicit timeout with the spatial reference access try{ {Hill:robot[0], timeout}.move = ON; {Hill:robot[0], timeout}.move = ON; }catch(TimeoutException e){ // the programmer decides the next action // the programmer decides the next action}

17 17 for(i=0; i<1000; i++) for(i=0; i<1000; i++) try{ try{ if ({Left_Hill:Hot[i], timeout}.temp > Max_temp) Max_temp = {Left_Hill:Hot[i], timeout}.temp; Max_id = i; }catch(TimeoutException e) }catch(TimeoutException e) break; break; {Left_Hill:Hot[Max_id], timeout}.water = ON; {Left_Hill:Hot[Max_id], timeout}.water = ON; Spatial Programming Example Water the hottest spot on the Left Hill Mobile sprinkler with temperature sensor Left Hill Right Hill Hot spot

18 18Outline Motivation Motivation Spatial Programming (SP) Model Spatial Programming (SP) Model SP Implementation using Smart Messages SP Implementation using Smart Messages SP Application SP Application Conclusions Conclusions

19 19 Smart Messages at a Glance Smart Message (SM) Smart Message (SM) –User defined distributed application similar to a mobile agent –Executes on nodes of interest named by properties –Migrates between nodes of interest using self-routing Self-Routing Self-Routing –Application-level routing executed at every node –Applications can change routing during execution Cooperative Nodes Cooperative Nodes –Execution environment (Virtual Machine) –Memory addressable by names (Tag Space) –Code cache

20 20 Smart Messages Prototype Modified version of Sun’s Java K Virtual Machine Modified version of Sun’s Java K Virtual Machine –Small memory footprint (160KB) SM and tag space primitives implemented inside virtual machine as native methods (efficiency) SM and tag space primitives implemented inside virtual machine as native methods (efficiency) Implemented I/O tags: GPS location, neighbor discovery, image capture, light sensor, system status Implemented I/O tags: GPS location, neighbor discovery, image capture, light sensor, system status

21 21 Spatial Programming Implementation Using Smart Messages SP application translates into an SM SP application translates into an SM –Spatial reference access translates into an SM migration to the mapped node –Embedded system properties: Tags SM self-routes using geographical routing and content-based routing SM self-routes using geographical routing and content-based routing Reference consistency Reference consistency − Unique addresses (stored in mapping table) are unique tags created at nodes − SM carries the mapping table

22 22 Max_temp = {Left_Hill:Hot[1], timeout}.temp; Max_temp = {Left_Hill:Hot[1], timeout}.temp; SP to SM Translation: Example Left Hill Right Hill Spatial Reference Access Smart Message ret = migrate_geo(location, timeout); if (ret == LocationUnreachable) ret = migrate_tag(yU78GH5, timeout); ret = migrate_tag(yU78GH5, timeout); if ((ret == OK) && (location == Left_Hill)) return readTag(temp); return readTag(temp); else throw TimeoutException {Left_Hill,Hot,1}{yU78GH5,location} MappingTable Code

23 23 SP Application: Intrusion Detection Code Size breakdown for SM (Application + SP Library) Code Size breakdown for SP library Ad hoc network: HP iPAQs with 802.11 cards and GPS devices user node light sensor camera node regular node monitoredspace

24 24 Execution Time Breakdown

25 25Conclusions Spatial Programming makes outdoor distributed computing simple Spatial Programming makes outdoor distributed computing simple –Volatility, mobility, configuration dynamics, ad-hoc networking are hidden from programmer Implementation on top of Smart Messages Implementation on top of Smart Messages –Easy to deploy new applications in the network –Quick adaptation to highly dynamic network configurations

26 26 Thank you! http://discolab.rutgers.edu/sp/


Download ppt "Spatial Programming using Smart Messages: Design and Implementation Cristian Borcea, Chalermek Intanagonwiwat, Porlin Kang, Ulrich Kremer, and Liviu Iftode."

Similar presentations


Ads by Google