Software Architecture
SALES middleware helps application-level designers by transparently handling generic context data dissemination and retrieval, communication interfaces utilization and devices mobility. Even if every node executes a specific SALES middleware instance depending on proper kind, we can highlight a general SALES structure showed in the above figure. Our middleware is mainly divided in two principal layers:
- Mechanisms Layer - This layer addresses low-level mechanisms related to inter-nodes communications and hierarchy formation. Adaptive System Communication offers a generic communication API that allows messages exchange by hiding specific wireless technology details, while each wireless-dependent adapter, such as Bluetooth Adapter and Wi-Fi Adapter, enables the real communication. Communication Primitives realizes one-way and request/response API, while Probing Module periodically monitors available bandwidth on each interface. System Coordination exploits the communication API to support mobility and routing decisions. Mobility Manager uses Localization System to retrieve node localization data and realizes the adaptive mobility management protocols useful to maintain the SALES tree-like structure. Routing Manager enforces context data distribution and uses Query Adaptation Module to adapt context query representation (see the next section).
- Facilities Layer - This layer realizes high-level facilities useful to support context data injection and retrieval. SALES provides a generic framework to define the structure of exchanged data and to tailor distribution according to services needs. Context Data Type Storage permits to register, store, and search for context data types. Each type is univocally associated with a Context Data Module that enables data injection and retrieval by contemporary enforcing specific routing and caching policies. Finally, each context data module contains both a source and a sink: the Context Source allows data creation and injection, while the Context Sink enables context data retrieval by means of context queries.