Wireless Sensor Network Design Patterns

The concept of "patterns" in software development has evolved as a means of documenting and formalizing techniques for solving certain classes of problems. A pattern typically begins with a problem statement and then describes a general solution to the problem. From this, a software developer may apply the pattern to their particular variant of the problem.

Wireless sensor networks, which can consist of hundreds or thousands of low power nodes that must communicate and coordinate in order to achieve a complex task, have their own sets of problems and, increasingly, their own set of applicable design patterns. Some of these patterns have been taken from the library of existing software design patterns and applied to the challenges of constructing wireless sensor networks. For example, the mediator pattern traditionally solves the problem of high coupling between the many classes of a complex system by routing communication between the classes through a mediator class. This decreases the dependencies of each class (since each class only needs to exchange information with one other class, the mediator), leading to a more maintainable and modifiable system.

The mediator pattern can be applied to wireless sensor networks (as described here) when you have a number of different sensor types in the system that must share information and initiate actions. If every sensor was required to know how to communicate with every other sensor in the system, it would soon become extremely difficult to develop new sensor types. By encapsulating the communication and translation logic into a mediator node, adding a new sensor is a simple matter of modifying the mediator to understand the new data types.

This pattern is a natural fit for a Distrix-based system due to the decoupled nature of Distrix agents. One agent acting as the mediator can subscribe to objects published by various sensor nodes, analyze the incoming data, and distribute translated versions of the information and requests for action by publishing new objects or via remote method calls. Because of the publish-subscribe nature of a Distrix system, the mediator or any of the sensor nodes can be modified completely independently of any other part of the system.

In a future blog post we will explore other wireless sensor network design patterns and how Distrix may be used to implement them.