Increased efforts towards device miniaturization have led to the emergence of a new class of ad-hoc networks, the so called wireless sensor networks. Individual devices or nodes are commonly battery-powered, small in size, equipped with a variety of sensors, frugal processing capabilities and a wireless transceiver. Spatially distributed within a deployment area, these nodes are able to autonomously form a network and cooperatively serve a specified task, for instance to acquire environmental data, to detect predefined events and/or to enable direct, physical interaction. Applications that rely on wireless sensor network technology are therefore typically concerned with the investigation of phenomena that either spread over a large area, that demand for autonomous scheduling over a great period of time, that require unobtrusive mechanisms for data collection or immediate reactivity to observed states. A wireless sensor network can hence be understood as an application enabler, a tool which can be utilized to build a specific application rather than having a purpose of its own. Application development for these kinds of networks is however complex, errorprone and tedious: Resource scarcity, timing constraints and a typically asynchronous operational model inherent to embedded devices are directly exposed to a programmer while at the same time, the need to map application semantics to run on a distributed, unreliable network has to be objected. Instead of being able to implement the envisioned application in a problem-oriented manner, the developer is forced to take a system-oriented viewpoint. This circumstance is especially disadvantageous when considering application domain experts and not professional software developers to be prospective users. This thesis proposes a holistic programming model called FACTS that combines two well-known mechanisms for abstracting from low-level challenges into a dedicated framework for wireless sensor network programming: Abstraction through provision of a better conceptual model via a higher-level language at design time, and abstraction due to deliberate support, especially at runtime. First of all, FACTS increases the expressiveness of sensor networking concerns with the help of a domain-specific language. Event-centric, problem-oriented task specification is enabled relying on a rule-based programming paradigm, while at the same time accessible hardware-related functionality is limited to only relevant features. Reactivity is captured at the language level by means of utilizing a natural, declarative yet concise representation. Moreover, application knowledge can be denoted equally well with the help of rules, as has already been proven e.g. in the context of business rule specification, making rules a good choice for non-professional developers. Furthermore, substantial support in terms of runtime support, development toolchain and encapsulation of typical sensor networking routines is provided within the FACTS middleware framework. The developer is empowered with a set of tools that accompany him throughout the development process and allow for simplified programming, debugging and testing. A core element here is the runtime environment that can be utilized on typical, small-scale wireless sensor nodes. It ensures the stable execution of rule-oriented programs by shielding a programmer from concerns such as manual stack management, correct event ordering and timing prerequisites of the underlying hardware. A number of protocols and applications ported to and developed for FACTS validate approach usability and shed a light on its advantages as well as on its bounds.
Die fortschreitende Miniaturisierung technischer Bauteile erlaubt mittlerweile den flächendeckenden Einsatz kleinster Rechner, die sich durch drahtlose Kommunikation miteinander verbinden. Ausgestattet mit einer Vielzahl von Sensoren finden sich diese sogenannten drahtlosen Sensorknoten in ad-hoc Netzen zusammen, und ermöglichen so eine Vielzahl neuartiger Anwendungen. Die Programmierung dieser Sensornetze ist allerdings komplex und sehr fehleranfällig, da viele Faktoren wie die räumliche Verteilung, die unzuverlässige drahtlose Kommunikation und die Programmierung eingebetteter Systeme berücksichtigt werden müssen. Diese Dissertation stellt eine regelbasierte, domänen-spezifische Sprache und ein dazugehöriges Rahmenwerk vor, welches dem Programmierer eine abstrakte, problem-orientierte Sichtweise auf das Sensornetz zur Verfügung stellt. Neu ist, dass der Programmierer mit präzisen, mächtigen Sprachelementen die Reaktionen eines Sensorknotens auf komplexe Ereignisse definieren kann, ohne sich systembedingter Abläufe bewusst sein zu müssen. Verschiedene Optimierungsverfahren wurden vorgestellt, die sowohl die Laufzeit des Systems beschleunigen, als auch den Speicherverbrauch minimieren. Die Evaluation hat nicht nur die Qualität des Ansatzes in unterschiedlichsten Szenarien unter Beweis gestellt, sondern auch quantitativ nachgewiesen, dass die durch die Abstraktion bedingten, durchschnittlichen Verluste in Reaktivität keinen signifikanten Einfluss auf seine Nutzbarkeit haben.