Programming wireless sensor networks is a non-trivial task due to the constraints of the devices and the dynamic nature of the communication medium. Sophisticated middleware infrastructure support is required. The infrastructure should provide various consistency mechanisms and dynamically adapt to failures. It should also be lightweight and should facilitate asynchronous interactions. An event based publish-subscribe style of interaction may be ideally suited for wireless sensor networks. Sophisticated event types and efficient event dispatch mechanisms may also have to be supported. Appropriate language constructs for programming events would have to be invented. Theoretical modelling of sensor networks may also have to be investigated.