This is an old revision of the document!

Reactive Context-Aware Programming

Stijn Mostinckx

This page is under construction, some sections are not yet completed. Please refer to the further reading section for a full text.

Reactive Context-Aware Programming (ReCAP) extends the ambient-oriented programming paradigm to tailor it for the Internet of Things (IoT): a network environment in which physical objects are given an embedded digital representation.

This enables IoT applications to detect the proximity and/or availability of physical objects and use this information to provide context-sentive services and information. The ReCAP paradigm supports the development of such application as follows.

Causally Connected Applications

† Quick-link: Reactive programming

IoT applications are causally connected to their environment; the presence, proximity and current state of nearby devices and physical objects is used to customize the services and information offered by the application.

Reacting to changes in the environment requires registering one or more event handlers. For instance, if an AmbientTalk application wants to respond to the appearance and disappearance of nearby devices, it has to register whenever:discovered and whenever:disconnected event handlers.

The use of such event handlers introduces an inversion of control, where the control flow of the application is scattered across a number of event handlers. This inversion of control is particularly jarring if the application logic demands the use of additional event handlers to propagate environmental changes to modules which are only indirectly affected by them.

Note that it is often possible to avoid the inversion of control altogether. For instance, to abstract over (dis)appearing communication partners, one can use an ambient reference. In the general case, the inversion of control can often be removed through the use of reactive values.

Window on the World

research/recap.1280589574.txt.gz · Last modified: 2010/07/31 18:23 by stijnm
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki