Papers
Topics
Authors
Recent
2000 character limit reached

Blackboard Rules for Coordinating Context-aware Applications in Mobile Ad Hoc Networks (1209.1421v1)

Published 6 Sep 2012 in cs.MA

Abstract: Thanks to improvements in wireless communication technologies and increasing computing power in hand-held devices, mobile ad hoc networks are becoming an ever-more present reality. Coordination languages are expected to become important means in supporting this type of interaction. To this extent we argue the interest of the Bach coordination language as a middleware that can handle and react to context changes as well as cope with unpredictable physical interruptions that occur in opportunistic network connections. More concretely, our proposal is based on blackboard rules that model declaratively the actions to be taken once the blackboard content reaches a predefined state, but also that manage the engagement and disengagement of hosts and transient sharing of blackboards. The idea of reactiveness has already been introduced in previous work, but as will be appreciated by the reader, this article presents a new perspective, more focused on a declarative setting.

Citations (8)

Summary

  • 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)in(b_1,t_1),\cdots,in(b_m,t_m),nin(b_{m+1},t_{m+1}),\cdots,nin(b_n,t_n) \longrightarrow in(b_{n+1},t_{n+1}),\cdots,in(b_p,t_p),nin(b_{p+1},t_{p+1}),\cdots,nin(b_q,t_q)

Where:

  • in(b,t)in(b, t) denotes the presence of tuple tt on blackboard bb.
  • nin(b,t)nin(b, t) denotes the absence of tuple tt on blackboard bb.

These rules are interpreted in two operational readings: forward and backward.

Operational Readings

Forward Reading

The forward reading (LHS⟶fRHSLHS \longrightarrow_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

Figure 1

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⟶bRHSLHS \longrightarrow_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 inin or ninnin primitive is permitted in the RHS. Figure 2

Figure 2

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\mathit{tellr}, askr\mathit{askr}, getr\mathit{getr}, and naskr\mathit{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)in_c(b, t) is introduced, specifying that cc instances of tuple tt are required on blackboard bb. 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…mbc_{t_k} \geq c_k, k=1\ldots m and bctk=0,k=m+1…nbc_{t_k} = 0, k=m+1\ldots n

Where bctkbc_{t_k} represents the count of tuples on the blackboard matching the tuples in the rule's LHS.

Performance Analysis

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

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 inin and ninnin 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.

Whiteboard

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.