21
DOPSY DOPSY group group Prof. Dr. R. Kröger Prof. Dr. R. Kröger Kai Beckmann Kai Beckmann Marcus Thoss Marcus Thoss {first.surname}@hs-rm.de {first.surname}@hs-rm.de Labor für Verteilte Systeme Labor für Verteilte Systeme Distributed Systems Lab Distributed Systems Lab http://wwwvs.cs.hs-rm.de http://wwwvs.cs.hs-rm.de sDDS An adaptable DDS Solution for Wireless Sensor Networks Kai Beckmann Distributed Systems Lab RheinMain University of Applied Sciences RTI Connext Conference, London, 08.10.2014

sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

Embed Size (px)

DESCRIPTION

sDDS: An Adaptable DDS Solution for Wireless Sensor Networks – Presentation by Kai Beckmen, RheinMain University - London Connext Conference 2014

Citation preview

Page 1: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

DOPSYDOPSYgroupgroup

Prof. Dr. R. KrögerProf. Dr. R. KrögerKai BeckmannKai BeckmannMarcus ThossMarcus Thoss{first.surname}@hs-rm.de{first.surname}@hs-rm.de

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

http://wwwvs.cs.hs-rm.dehttp://wwwvs.cs.hs-rm.de

sDDS

An adaptable DDS Solutionfor Wireless Sensor Networks

Kai Beckmann

Distributed Systems Lab

RheinMain University of Applied Sciences

RTI Connext Conference, London, 08.10.2014

Page 2: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 22 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Personal Introduction

● RheinMain University of Applied Sciences, Wiesbaden, Germany

● Distributed Systems Lab (headed by Prof. Dr. Kröger)– Management of Distributed Applications– Embedded Systems, Industrial automation

● 2010 M.Sc. in computer sciences● Research associate, Ph.D. student and assistant lecturer● Interests:

● Application of distributed and embedded systems● Middleware (esp. OMG Data Distribution Service)● Wireless sensor networks● Application of model-driven software development in

embedded systems● Model-based software testing

Page 3: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 33 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Motivation

Wireless Sensor NetworksSensor-Actor-NetworksAutomation

Often Data-Centric

QoS?

Page 4: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 44 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Problems with WSN

● Requirements● Cheap● Limited resources● Low energy consumption

● Heterogeneity ● Hardware architectures● Network technologies / protocols / standards● Software / middleware

● Interoperability● Proprietary products, different standards● No consolidation so far● Often IP as compromise

● DDS an approach?

Page 5: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 55 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

DDS for WSN - problems

● Need for customised DDS functionality

8 bit uC8 kB RAM128 kB FlashFinite energy source

Wireless transportIEEE 802.15.4127 byte frame size

32 bit ARM64 kB RAM4 GB FlashWall-Socket

32 bit ARM2 GB RAM*nix OS

Temperatur sensor➔ publisher

Switch sensor➔ publisher

Movement sensor➔ publisher➔ router

Controllable Socket➔ publisher➔ subscriber➔ router

static link

dynamic node

Page 6: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 66 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Our Approach: sDDS

● sensornetwork DDS (sDDS)● Minimal individual customisable DDS solution

● DDS API conform● Model-driven Software Development (MDSD) process

● WSN-System / Structure● WSN-DDS-Application● WSN-Node

● DDS middleware adaptation● Tailoring of functionality of modules to be deployed● Supporting heterogeneous middleware nodes● Exploit existing target facilities

● SNPS protocol specialised for WSN environment

Page 7: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 77 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

MDSD Tailoring Process

HWSpec

Deployment

Topics

QoS

ApplicationRequirements

● DDS func.● QoS

DSL

DSML

DSL

DSL

IDL

DSL

DDS UML

Profile

PIM

PSM Opt

imis

atio

n

Templates

Code

Page 8: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 88 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

sDDS - Features

● Extensible MDSD process● Eclipse environment (EMF, Xtext), with alternative

lightweight python scripts● Proof-of-concept realisation● Many optimisations, customisations possible● Integration of other models, specifications

● Platform independent, easy to port● Plain C● Abstract interfaces for system and network● Fast integration of new platforms (Contiki: 2 weeks only, by

undergrad student)● Small footprint

● 20 kB for static routing with 2 - 4 topics

Page 9: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 99 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Problem - Network

● Heterogeneity● Different Subsets of DDS● Still need for cooperation

● Special layer 1-3 protocols● Frame sizes● Routing

● Energy consumption● Transmitting data

expensive – Amount of data– Transceiver on/of

● Natural Broadcast● Limited resources on

nodes● Best Effort● Only Publish

● Reliable Transport● Dynamic Discovery

● Reliable Transport● Static link

● Reliable Transport● Static link

Page 10: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1010 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Protocol SNPS

● Sensor-Network Publish-Subscribe (SNPS)● Influenced by RTPS● Small footprint, small frame sizes, limited bandwidth● Aim: Low average protocol overhead● Data aggregation even for different receivers

● Utilises radio network features

WSN

Enterprise DDS RTPS

sDDS SNPS

system protocol

Page 11: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1111 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

SNPS - Structure

VersionVersion

SubMsgCountSubMsgCount

1

1

1...*

MessageMessage

SubMessageSubMessage

parameter: 4bittype: 4bit

ExtendedSubMessageExtendedSubMessageextType: 4bittype = extSubMsg_t

SupplementSubMessageSupplementSubMessage

● Small atomic information units

● Submessage● Sequential processing

● Self-description and implicit structure

● Skipping unknown parts● Small protocol footprint

● Different classes of sizes● From frequency of use

● “Squeeze” as much information into a byte as possible

Page 12: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1212 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

SNPS – Data transmission

● Addressing => Domain, Topic ● Data => header for payload● Handshaking => Ack, Nack, SeqNr (different sizes)● Sequentially assembled state used for interpretation

SubMessageSubMessage

DomainDomain

TopicTopic DataData

PayloadPayload

ExtendedSubMessageExtendedSubMessage

SeqNrSeqNrAckAckNackNack

Handshaking

Data Addressing

ExtTopicExtTopic

Page 13: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1313 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Example – Data Transmission

● SNPS protocol semantics limited to data transmission● Subscription etc. handled at DDS level

– BuiltIn-Topics● Realisation is the task of the middleware

Global data space (domain α)

Publisher

Datawriter

Subscriber

Datareader

Publisher

Datawriter

Subscriber

Datareader

Topic B Topic C

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Node1 Node2 Node3

Datareader

Datawriter

Topic A

Page 14: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1414 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Example – Data Transmission

● Node 1 publishes data for topic A and B● Node 2 needs reliable transmission, node 3 does not

● SNPS message of node 1:

Global data space (domain α)

Publisher

Datawriter

Subscriber

Datareader

Publisher

Datawriter

Subscriber

Datareader

Topic B Topic C

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Node1 Node2 Node3

Datareader

Datawriter

Topic A

Version No. ofSubMsgs

Domainα

TopicA

Data1

Payload1

TopicB

Data2

Payload2

SeqNr

Page 15: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1515 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Example – Data Transmission

● Node 3 needs only topic B● Skipping part related to topic A

● Processing data of topic B, skipping SeqNr and done

Global data space (domain α)

Publisher

Datawriter

Subscriber

Datareader

Publisher

Datawriter

Subscriber

Datareader

Topic B Topic C

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Node1 Node2 Node3

Datareader

Datawriter

Topic A

Version No. ofSubMsgs

Domainα

TopicA

Data1

Payload1

TopicB

Data2

Payload2

SeqNr

Page 16: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1616 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Example – Data Transmission

● Node 2 needs only topic B as well● Node 2 processes data of topic B

● Acknowledgement required

Global data space (domain α)

Publisher

Datawriter

Subscriber

Datareader

Publisher

Datawriter

Subscriber

Datareader

Topic B Topic C

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Node1 Node2 Node3

Datareader

Datawriter

Topic A

Version No. ofSubMsgs

Domainα

TopicA

Data1

Payload1

TopicB

Data2

Payload2

SeqNr

Page 17: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1717 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Example – Data Transmission

● Node 2 publishes data for topic C ● And an acknowledgement for topic B

● Node 1 ignores topic C and processes the Ack

Global data space (domain α)

Publisher

Datawriter

Subscriber

Datareader

Publisher

Datawriter

Subscriber

Datareader

Topic B Topic C

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Dom

ain

part

icip

ant

Node1 Node2 Node3

Datareader

Datawriter

Topic A

Version No. ofSubMsgs

Domainα

TopicC

Data1

Payload1

TopicB

ACK SeqNr

Page 18: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1818 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

SNPS – Message Sizes

Version No. ofSubMsgs

Domainα

TopicA

Data1

Payload1

Data2

Payload2

TopicB

Data3

Payload3

HeaderMinimum Submessage Sequence

Size: 5 + [payload] Bytes Same Topic: 1 + [payload] Bytes

Different Topic: 2 + [payload] Bytes

● Minimum: Header, Domain, Topic, Data● Data aggregation in one message adds little overhead● Assumption:

● Switching transceiver on and off => base cost of energy● Protocol layer 1, 2 and 3 overhead is significant too● The overhead of the additional data is acceptable

Page 19: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 1919 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

sDDS - Status

● Development system: Linux and UDP/IP● Target systems

● TI SoC CC2430● Atmel Atmega128 platform

● Transports● UDP/IP● 6LoWPAN (on Contiki OS)● ZigBee Layer 3 (TI zStack)● First concepts for CAN

● Work in Progress -> limited support of DDS functionality● Used in an Ambient Assisted Living (AAL) research

project and university courses

Page 20: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 2020 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

sDDS - Future Work

● Currently funded by small internal research project● Clean up, documentation, integration of functionality● Aim: Publish as Open Source within next year

● Rework MDSD process● Functionality

● Dynamic discovery● QoS● History on qualified nodes

● Connect WSN to “normal” DDS● SNPS integration in RTI Connext DDS● Vertical integration

● New application fields: Industry 4.0, IoT● Base for new research projects

Page 21: sDDS: An Adaptable DDS Solution for Wireless Sensor Networks

08.10.2014, RTI Connext Conference08.10.2014, RTI Connext Conference Kai BeckmannKai Beckmann 2121 DOPSYDOPSYgroupgroup

Labor für Verteilte SystemeLabor für Verteilte SystemeDistributed Systems LabDistributed Systems Lab

Questions ?