| Literature DB >> 31835743 |
Alireza Hassani1, Alexey Medvedev1, Arkady Zaslavsky1, Pari Delir Haghighi2, Prem Prakash Jayaraman3, Sea Ling2.
Abstract
As the Internet of Things (IoT) is evolving at a fast pace, the need for contextual intelligence has become more crucial for delivering IoT intelligence, efficiency, effectiveness, performance, and sustainability. Contextual intelligence enables interactions between IoT devices such as sensors/actuators, smartphones and connected vehicles, to name but a few. Context management platforms (CMP) are emerging as a promising solution to deliver contextual intelligence for IoT. However, the development of a generic solution that allows IoT devices and services to publish, consume, monitor, and share context is still in its infancy. In this paper, we propose, validate and explain the details of a novel mechanism called Context Query Engine (CQE), which is an integral part of a pioneering CMP called Context-as-a-Service (CoaaS). CQE is responsible for efficient execution of context queries in near real-time. We present the architecture of CQE and illuminate its workflows. We also conduct extensive experimental performance and scalability evaluation of the proposed CQE. Results of experimental evaluation convincingly demonstrate that CoaaS outperforms its competitors in executing complex context queries. Moreover, the advanced functionality of the embedded query language makes CoaaS a decent candidate for real-life deployments.Entities:
Keywords: CMP; IoT; complex; context; execution; query
Year: 2019 PMID: 31835743 PMCID: PMC6960719 DOI: 10.3390/s19245457
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1Overview of the Context-as-a-Service platform in the IoT ecosystem.
Figure 2CoaaS Blueprint Architecture.
CoaaS major components.
| Component | Responsibilities |
|---|---|
|
| (iv) Privacy, security and access control |
|
| (i) Sensor data acquisition |
|
| (i) Sensor data acquisition |
|
| (i) Sensor data acquisition |
|
| (v) Context processing and reasoning |
Figure 3CQL Production Rule.
Figure 4Context Query Engine Architecture.
Figure 5CDQL Execution Plan Generator.
Figure 6Query execution plan graph.
Example of execution plan
| Execution Order | Entities |
|---|---|
| Execution Order 1 | vehicleA |
| Execution Order 2 | weatherCondition |
| Execution Order 3 | (i) Sensor data acquisition |
Figure 7CDQL execution workflow.
RPN condition reformulation strategies.
| Usage Type | Strategy | Example * | |
|---|---|---|---|
| Original Condition | Reformulated Condition | ||
|
| No changes required. | e1.a1 containsAll e2.a1 | e1.a1 containsAll [ |
|
| The equality operator will be replaced by containsAny. | e1.a1 = e2.a1 | e1.a1 containsAny [ |
|
| The inequality will be broken down into several inequality conditions (one for each instance of dependent entity) that are connected with | e1.a1 < e2.a1 | (e1.a1 < 1 or e1.a1 < 2 or e1.a1 < 3 or e1.a1 < 4) |
|
| The function call will be broken down into several function calls (one for each instance of dependent entity) that are connected with | F1 (e1.a1, e2.a1) < 12 | (F1 (e1.a1, 1) = true or F1 (e1.a1, 2) = true or F1 (e1.a1, 3) = true or F1 (e1.a1, 4) = true) |
|
| For each instance of dependent entity, one entityMatch statement will be generated. The | entityMatch(e1.a1 = e2.a1 and e1.a2 < e2.a2) | ((e1.a1 = 1 and e1.a2 < 10) or |
* assume the context response for entity e2 contains the following entity instances: e21: {a1:1, a2:10}, e22: {a1:2, a2:8}, e23: {a1:3, a2:4}, e24: {a1:4, a2:6}, where a1 and a2 are context attributes of entity e2.
Example of execution plan
| Execution Order | Entities |
|---|---|
| Execution Order 1 |
|
| Execution Order 2 |
|
Figure 8Architecture of the CoaaS platform prototype implementation.
Figure 9Authentication and authorisation mechanism.
CoaaS interface endpoints.
| Address/Method | Short Description | Accepts |
|---|---|---|
|
| Authentication API | Username and Password |
|
| CDQL query API | • CDQL query CQL CDL |
|
| Context Service registration API | CSDL Service description |
|
| Context update API | Context update |
Figure 10CoaaS IDE.
Context attributes of the simulated context entities for the first set of experiments.
| Name | Type | Generation Strategy |
|---|---|---|
|
| String | A string value generated by concatenating “entity” and a unique number between 0 to total number of entities. |
|
| String | A string value generated by contacting “value” and a randomly generated number between 0 to 199. |
|
| Integer | Random Integer between 0 and 99. |
|
| Geo-coordinates (i.e., latitude and longitude) | Randomly generated within a circle where the coordinates of the centre were [−37.8770, 145.0443] and the radius was 1 km. |
Figure 11Impact of increasing number of parallel queries for Q1.
Figure 12Impact of increasing number of parallel queries for Q2.
Figure 13Impact of increasing number of parallel queries for Q3.
Context attributes of the simulated context entities for the second set of experiments.
| Name | Type | Generation Strategy |
|---|---|---|
|
| String | A string value generated by concatenating “entity” and a unique number between 0 to total number of entities. |
|
| String | A string value generated by concatenating “entity” and a randomly generated number between 0 to 199. |
Figure 14Impact of increasing the number of parallel queries for a query with two entity types.
Figure 15Impact of increasing the number of entities in a query.
Figure 16Network Load.