- The paper presents a rule-based coordination model using forward and backward readings to systematically manage context changes in MANETs.
- It explains how blackboard rules integrate tuple presence and absence conditions to trigger context-aware actions and dynamic sharing.
- Performance tests demonstrate improved scalability and efficiency via incremental computation, supporting robust process synchronization.
Blackboard Rules for Coordinating Context-aware Applications in Mobile Ad Hoc Networks
This paper (1209.1421) introduces a coordination model utilizing blackboard rules to address context awareness and mobility issues in mobile ad hoc networks (MANETs). The approach uses a declarative rule-based system with forward and backward readings to manage context changes and transient sharing of blackboards among mobile devices.
Core Concepts
The central idea revolves around blackboard rules that declaratively model actions triggered by the blackboard's state. These rules, expressed as logical implications, dictate how the system should react to context changes and manage the engagement/disengagement of hosts, facilitating transient blackboard sharing. The general form of these rules is:
in(b1​,t1​),⋯,in(bm​,tm​),nin(bm+1​,tm+1​),⋯,nin(bn​,tn​)⟶in(bn+1​,tn+1​),⋯,in(bp​,tp​),nin(bp+1​,tp+1​),⋯,nin(bq​,tq​)
Where:
- in(b,t) denotes the presence of tuple t on blackboard b.
- nin(b,t) denotes the absence of tuple t on blackboard b.
These rules are interpreted in two operational readings: forward and backward.
Operational Readings
Forward Reading
The forward reading (LHS⟶f​RHS) models the system's reaction to context changes. When the conditions on the left-hand side (LHS) are met, the actions on the right-hand side (RHS) are executed. This reading is used for context awareness, where a blackboard context is defined by the presence or absence of specific information.

Figure 1: Forward reading example.
For instance, a rule might state that if a user is in Brussels and the weather is not sunny, a list of museums should be provided. However, due to the instability of connections in MANETs, the activation condition is restricted to a single blackboard.
Backward Reading
The backward reading (LHS⟶b​RHS) represents the connections between blackboards, modeling the connection state of devices. This reading facilitates transient sharing of blackboards without physically transferring information. For example, when a tourist's mobile device connects to an info post, a backward reading rule is created to link the two blackboards. This enables the tourist's device to access information from the info post as if it were locally available. Restrictions are imposed such that only one in or nin primitive is permitted in the RHS.

Figure 2: Backward reading example.
Language Design and Implementation
The blackboard coordination is integrated into the \ coordination language, which is based on a central blackboard. The language is extended with primitives for handling rules over a network: tellr, askr, getr, and naskr. The implementation, done in Python, uses a client-server architecture, where each device acts independently and is responsible for establishing connections with neighboring devices. The blackboard rules are implemented as structures containing arrays for the LHS and RHS, and a boolean variable indicating the reading direction.
Implementation Details
To manage multiple instances of the same tuple in a rule's condition, the notation inc​(b,t) is introduced, specifying that c instances of tuple t are required on blackboard b. An activation vector tracks the changes on the blackboard, determining when the rule's context is met. The activation condition is formally defined as:
bctk​​≥ck​,k=1…m and bctk​​=0,k=m+1…n
Where bctk​​ represents the count of tuples on the blackboard matching the tuples in the rule's LHS.
The paper presents a comparative performance test against , a reactive rule-based model. The test involves synchronizing multiple processes, where each process places a tuple on the blackboard to signal completion. The results show that the proposed approach outperforms as the number of processes increases. This is attributed to the incremental computation method, which avoids testing the entire rule activation condition after each operation.
Figure 3: Comparative performance result.
Mobile Device Coordination
The rule mechanism models the connection of remote blackboards when a physical connection exists. Events triggered by network activity, such as connection and disconnection events, are used to manage the logical linking of blackboards. Devices discover neighboring devices using network layer functionalities. The Bluetooth technology in RFCOMM mode is used for communication between hosts. A reasonable connection timeout is assumed to prevent blocking the local blackboard due to sudden disconnections.
The paper positions its work within the context of chemical models and reactive models. Chemical models, such as the model and chemical abstract machine (cham), inspire the idea of transforming multi-sets of data using reaction rules. Reactive models, such as MARS and ReSpecT, explore reactive tuple spaces for coordinating mobile agents. The key differences are threefold: (i) the reaction condition is expressed only in terms of data being present on the blackboard, (ii) some reactions are triggered on the execution of primitives, (iii) the reaction rules mostly concern a single blackboard.
The key contribution of this paper is that it provides finer control over reaction conditions by allowing conditions to be defined in terms of both the presence and absence of data using in and nin primitives. This allows the specification of more precise and strict contexts, which is not possible in other works. In addition, the rule mechanism is designed to be used in multi-blackboard systems proper to MANETs.
Conclusion
The paper presents a declarative rule-based solution for coordination in MANETs. By using forward and backward readings, the approach supports context awareness and transient sharing of blackboards. The incremental computation method and fine-grained control over reaction conditions contribute to the efficiency and expressiveness of the model. Future work includes introducing probabilistic reasoning and exploring capabilities for complex event processing.