Messaging in TinyOS

At a high level, the idea of how messages work in a sensor network using TinyOS is based on the concept of active message. It's a somewhat vague concept, resembling ideas from object oriented programming and even virus programming. Since the wireless sensor network domain favors in-network processing (aggregating sensor data, etc), there needs to be some way to do flexible processing as messages are received in the network. How to do this? One idea might be to let message carry programs, something like agent-based programming. The practical problem with this is that sensor network messages are very small -- maybe only 28 byte payload per message. Some have argued that we can get around this limitation, to some extent, by using virtual machines in the sensor nodes: application-specific virtual machines. This has actually been implemented, with some success. However, the TinyOS approach is to let each message have a message type (it turns out to be a 1-byte field). When a message is received, the radio stack looks for some wired-in handler for a message of the type received; if found, that handler is signaled (a signal is seen as an event by the handler), passing a pointer to the received message. What does the handler do? It can do anything: it can schedule the sending of new messages, it can accumulate data from the message in some variables, and so on. The task of the programmer is to invent message types, write corresponding handlers, and probably write some base station application, so that all of this conveys sensor data through the network, to the base station, and possible carries commands back to the sensor nodes.

Notice what's missing, from the conventional world of networking. Where are the layers? Where are the routing tables? Who decides which nodes are controlling other nodes, are monitoring progress, and many other tasks? All of these abstractions just don't go away: they become obligations (if needed) for the programmer of the active messages.


Aggregation

The second part of the lecture covered some techniques in aggregation, such as directed diffusion, TAG and CountTorrent.

Mar25Notes (last edited 2014-05-25 18:15:48 by localhost)