150 likes | 288 Views
Middleware for Cooperative Computing on Large Ad-hoc Networks of Embedded Systems*. Cristian Borcea, Deepa Iyer, Porlin Kang, Akhilesh Saxena and Liviu Iftode Division of Computer and Information Sciences Rutgers University http://discolab.rutgers.edu/sm/
E N D
Middleware for Cooperative Computing on Large Ad-hoc Networks of Embedded Systems* Cristian Borcea, Deepa Iyer, Porlin Kang, Akhilesh Saxena and Liviu Iftode Division of Computer and Information Sciences Rutgers University http://discolab.rutgers.edu/sm/ *This work is supported in part by NSF Grant ANI-0121416
Motivation • Pervasive Computing = Large Ad-hoc Networks of Embedded Systems • Examples: sensor networks, car networking on a highway, network of appliances at home • How to perform distributed tasks on these networks ? • Simple tasks: data collection, data dissemination • How to program these networks to execute user-defined distributed tasks ?
Example of a Distributed Task 75 F 85 F 75 F 95 F 75 F 85 F 0 F 70 F 80 F 80 F 80 F Determine average temperature in town
Traditional Message-Passing Distributed Computing Does Not Work • Number of nodes is extremely large • how to name nodes ? • Only selected nodes are of interest • how to find them ? • Dynamic configuration • nodes come and go, or become inaccessible • No routing support • end-to-end semantics hard to provide
Our Solution: Cooperative Computing • Cooperative node middleware • an architecture-independent execution environment: VM • a name-based global memory space: Tag Space • simple admission control, scheduling and synchronization • Smart Messages (SM): migratory execution units • multiple code and data bricks plus execution state • handler for content-based addressing • migrate through the network and execute on each hop • self-routing
Node Architecture Virtual Machine Admission Manager Tag Space Incoming SM Outgoing SM Embedded System
Tag Space Name ACL Lifetime Data Temperature TempACL 7200 80 Image ImgACL 300 Img.jpg • Named data persistent across SM execution • Protected • Limited lifetime • Operations: create, delete, read(get), write(put)
Smart Message Execution Cycle SM2 Tag Space SM1 d2 c2 d2 d1 c2 c1 VM SM1 d2 d1 c2 c1 Node • Admission (SM presents a resource table to node) • Conditional arrival (use handler to check for tags of interest) • Execution (possible blocking on tags to be updated) • Spawning new SM • Migration or exit
Smart Message Primitives • construct_SM(code_bricks, data_bricks, handler) • send(sm, destination) • send_myself(destination) • returns 0 in the SM that was sent • returns SM id in the sender SM • migrate(destination) • SM continues at destination • block(tag, count, timeout) • SM blocks waiting for count writes on tag or timeout
Proof of Concept • Implement two simple applications for sensor networks using SM • data collection: Directed Diffusion [ESTRIN ’99] • data propagation: SPIN [HEINZELMAN ’99] • Evaluate their performance using an SM network simulator
Directed Diffusion – Explore Mobile SM.data, SM.sender; /* Exploration Phase */ while (!get_tag(DATA_RATE)) { /* flood to source; wait for rate */ if (send_myself(forward_neighbors)) block(DATA_RATE, count(forward_neighbors), timeout) } if (SM.sender) { /* send rate back, if not sink*/ SM.data = get_tag(DATA_RATE); migrate(SM.sender); tempData = get_Tag(DATA_RATE); if (SM.data > tempData) { put_tag(SM.sender, BEST_ROUTE); put_tag(SM.data, DATA_RATE); } else { put_tag(tempData, DATA_RATE); /* increments count for block */ } exit(); }
Directed Diffusion - Reinforce /* Reinforcement Phase */ while (!get_tag(DATA_VALUE)) /* send to source; wait for data*/ if (send_myself(get_tag(BEST_ROUTE)) block(DATA_VALUE, 1, timeout); for(;;) { SM.data = get_tag(DATA_VALUE); if (SM.sender){ /* send data back, if not sink */ if (send_myself(SM.sender)==0) { put_tag(SM.data, DATA_VALUE); exit(); } } else /* output of the sink */ output (DATA_VALUE) block(DATA_VALUE, 1, timeout); /* wait for new data */ }
SPIN for(;;) { block(DATA_VALUE,1, timeout); /* wait new data */ SM.data = get_tag(DATA_TIME); if (send_myself(all_neighbors)==0) { /* send ad */ if (get_tag(DATA_TIMESTAMP)>=SM.data) exit(); put_tag(DATA_TIME, SM.data) /* ad update time and */ if (send_myself(SM_sender)==0) { /* request data */ SM.data = get_tag(DATA_VALUE); migrate(SM.sender); put_tag(DATA_VALUE, SM.data); /* bring data */ exit(); } /* go to wait for data */ } else if (SM_sender) /* if not source */ exit(); /* exit after sending ad */ }
Status and Future Plans • Prototype using iPAQs and Bluetooth under development • Design advanced ad-hoc routing algorithms using SM • Develop distributed applications for networks of embedded systems using SM