Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Challenges and Pitfalls
PD Dr. Stefan Bosse
sbosse@uni-bremen.de
University of Bremen, Dept. Mathematics and Computer Science, Bremen, Germany
Introduction Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Introduction Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Ubiquitous and pervasive computing introduces a big amount of visible and non-visible low-resource and mobile devices with an exponentially increasing number of deployed embedded systems.
Introduction Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Ubiquitous and pervasive computing introduces a big amount of visible and non-visible low-resource and mobile devices with an exponentially increasing number of deployed embedded systems.
Short-time and short-range device-to-device and device-to-service communication in ad-hoc mobile networks is still a challenge.
Most Internet-of-Things (IoT) devices and smart sensors are connected via the Internet.
Introduction Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Introduction Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
www.libelium.com/libeliumworld Different data sources and sinks in smart world and city environments - different temporal and spatial scales, different spatial ranges
Introduction Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Dieter Uckelmann et al, 2011 IoT and pervasive/ubiq. computing is closely coupled to humans! Scalability is closely coupled to pervasiveness! Communication is the central issue!
Introduction Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Introduction Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
DaCosta, Francis, 2013 Chirps are typically collected within propagator nodes, bundled and pruned as necessary for transmission, and then typically forwarded over the traditional Internet
Introduction Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Distributed Tuple Spaces and Agents Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
A tuple space is basically a data base containing tuples. A tuple is a poly-typed ordered set of data values. The number of data values specifies the arity of the tuple, i.e., tu=⟨v1,v2,..,vk⟩, |tu|=k.
Distributed Tuple Spaces and Agents Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
A tuple space is basically a data base containing tuples. A tuple is a poly-typed ordered set of data values. The number of data values specifies the arity of the tuple, i.e., tu=⟨v1,v2,..,vk⟩, |tu|=k.
Each tuple space TS can be divided into independent sub-spaces TS= ts1 ∪ ts2 ∪ .. ∪ tsn, with tsi holding only tuples of arity i.
Distributed Tuple Spaces and Agents Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
A tuple space is basically a data base containing tuples. A tuple is a poly-typed ordered set of data values. The number of data values specifies the arity of the tuple, i.e., tu=⟨v1,v2,..,vk⟩, |tu|=k.
Each tuple space TS can be divided into independent sub-spaces TS= ts1 ∪ ts2 ∪ .. ∪ tsn, with tsi holding only tuples of arity i.
The data type of each element of a tuple can be arbitrary, i.e., any scalar value (float, integer, Boolean), or composed values, i.e., arrays or structures. In this work, the data elements are limited to scalar values, more specifically, float32, int16, and short strings (or data bytes).
Distributed Tuple Spaces and Agents Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Vitaly Buravlev et al., 2016 There are producer and consumer operations. Consumer uses pattern to find matching tuples. The consumer can be synchronised by blocking until there is a matching tuple
Distributed Tuple Spaces and Agents Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
┌ var ts1 = TS('udp');│ ts1.start()│ ts1.listen(['ALARM','LIGHT',null],function (t,source,rssi) {│ console.log('ALARM',t,source,rssi,t[2])│ ts1.notify(['IAMHERE']);│ ts1.rd(['SENSOR','LIGHT',null],function (t) { ... });└ })┌ var ts2 = TS('ble',{keys:{private:'cloud1'}});│ ts2.start()│ ts2.listen(['SENSOR','LIGHT',null],function (t,source,rssi) {│ if (t[2]>500) ts1.out(['ALARM','LIGHT',t[2]]);│ })│ ts2.notify(['IAMHERE']);│ ts2.rd(['SENSOR','LIGHT',null],function (t) { ... });│ ts2.host.out(['SENSOR','LIGHT',1000]); // local op└ ts2.out(['SENSOR','LIGHT',1000]); // remote op
Distributed Tuple Spaces and Agents Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Agents are simple functional units providing event handlers, i.e.:
There can be more than one agent. Communication between agents is established via the tuple space, too.
There are agents acting as a bridge between the communication back-end and the tuple space.
They can
Distributed Tuple Spaces and Agents Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Tuple exchange between BLE and UDP tuple spaces is provided by a customisable router controlled by agents. The routers connect local spaces and compose organised global spaces.
Agents create a bridge between tuple spaces with multiple communication devices (Red: Message event agent, Blue: Timer agent, Green: Router agent).
Distributed Tuple Spaces and Agents Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
var agent = {┌ x : 0,│ y : 0,└ ..┌ on : {│ 'ts.udp:(TIME,?)': function (ev) {│ ts.ble.notify(ev.tuple);│ return consumed?;│ },│ 'ts.ble:(SENSOR,?,?,?)':function (ev) {│ log(ev.tuple,ev.from,ev.rssi)│ ts.udp.out(['EVENT',JSON.stringify(ev.tuple),ev.from,ev.time]);│ return consumed?;│ },│ init : function () {│ this.x=random(1,1000);│ },│ 'sensor.light:abs(sensor-sensor0)>50': function (ev) {│ if (ev.sensor>500) ts.ble.notify(['ALARM','LIGHT','HIGH']);│ }└ },}Agent.create(agent);
Distributed Tuple Spaces and Agents Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Communication Technology and Protocols Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Methodologies
Communication Technology and Protocols Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Methodologies
BLE: Short-range Bluetooth Low-energy Communication
Communication Technology and Protocols Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Methodologies
BLE: Short-range Bluetooth Low-energy Communication
UDP: Mid-range UDP-IP Communication
Communication Technology and Protocols Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Methodologies
BLE: Short-range Bluetooth Low-energy Communication
UDP: Mid-range UDP-IP Communication
BLE/UDP: Broadcast Messaging of Packed Tuple Operations
Communication Technology and Protocols Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Both advertisment and scanning modes are used (requires BLE > 4.0)
Data tuples are transferred with advertisment packets
┌─────┬────┬───────────┬────────┐ Op = IAMHERE | WHEREIS | │ 4 │ 4 │ 8 │ 32*8 │ OUT | INP | RD │ TEST |│ Seq │ Op │ Signature │ Data │ TUPLE | NOTIFY │ UPDATE└─────┴────┴───────────┴────────┘
Communication Technology and Protocols Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Principle BLE-based broadcast communication using advertisement packets. The sender and receiver switch their radio channels randomly and periodically. A packet m containing a tuple space request is sent multiple times in t ∈ [ts,te].
Communication Technology and Protocols Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
UDP broadcasting is used to propagate tuple messages in local intra-networks
UDP is basically used to distribute tuples in a larger spatial range, typically covering entire buildings
UDP broadcasting requires wired connections. UDP broadcast packets are not forwarded by WLAN access points (AP) consistently and reliable! This is a result of star-based secured P2P communication in WLAN networks.
Communication Technology and Protocols Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
The hybrid network architecture using BLE and UDP-IP broadcast communication; n: stationary node, b: Stationary beacon, m: Mobile node, TS: Tuple space, R: Rule-based router
Use-case Evaluation Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Proof-of-concept use-case: Decentralised light control in buildings based on user perception and negotiation.
Use-case Evaluation Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Proof-of-concept use-case: Decentralised light control in buildings based on user perception and negotiation.
Ingredentients: Smartphones (mobile devices), Raspberry PI Zero/3 (stationary beacons), servers, WLAN-WiFi AP(s).
Use-case Evaluation Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Different agents negotiate light control in different areas of a building
Agents perform sensing (light intensity, crowd flows, user activity) and mobile surveys via a small chat application
Goal: Optimisation of light illumination with respect to user satisfaction and energy reduction!
Use-case Evaluation Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Experimental Set-up; s: Central server, b: beacon (Raspberry PI 3), m: Mobile device; Central server and beacons communicate via WLAN or LAN
Use-case Evaluation Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Using the light sensors, the mobility assessment using the accelerometer and gyroscope sensors of the mobile devices, and the performed micro-surveys providing user feed-back (satisfaction assessment):
BLE: An average tuple loss of 10% can be achieved within a radius of about 2m, 30% in 5m radius. Some nodes can communicate over larger distances up to 10m.
The tuple message sending time interval has no significant impact on the loss rate within time interval [500s,2000s] and with this (small) set-up. When the number of nodes within the radio range will be increased, the loss rate will increase, too.
Broadcasting from LAN to WLAN did not work reliable (loss up to 50%), and even unicast UDP communication was not reliable via WLAN.
Use-case Evaluation Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Average receptions rate of a sensor tuple (4 elements) in dependence of the distance between sender and receiver (SRD ) and the tuple time interval ∆t . Configuration: 4 beacons at different spatial positions and 4 mobile devices located at the same spatial position
Summary Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Distributed tuple spaces were used to exchange data between devices providing a spatial context.
Smart devices access the tuple spaces by tuple message communication.
The communication is connectionless and ad-hoc by using low-energy Bluetooth broadcasting
Mobile devices act as tuple carriers that can carry tuples between different locations. Additionally, UDP-based Intranet communication can be used to connect tuple spaces.
The Bluetooth Low Energy Tuple Space (BeeTS) service enables opportunistic, ad-hoc and loosely coupled device communication with spatial context. Typical loss-rate < 20%!
Summary Stefan Bosse - Fusion of Distributed Sensor Tuple Spaces and Agents
Questions and Comments are welcome!
Fusion of Distributed Sensor Tuple Spaces and Agents using Broadcast Radio Communication for Mobile Networks
Challenges and Pitfalls
PD Dr. Stefan Bosse
sbosse@uni-bremen.de
University of Bremen, Dept. Mathematics and Computer Science, Bremen, Germany