Top Banner
KIT University of the State of Baden-Wuerttemberg and National Research Center of the Helmholtz Association www.kit.edu Technology for Pervasive Computing Using Web Service Gateways and Code Generation for Sustainable IoT System Development T. Riedel, N.L. Fantana*, A. Genaid, D. Yordanov, H. Schmidtke, M. Beigl, KIT Pervasive Computing Systems Group, * ABB Corporate Research
37

Using Web Service Gateways and Code Generation for Sustainable IoT System Development

May 06, 2015

Download

Technology

Till Riedel
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

KIT – University of the State of Baden-Wuerttemberg and

National Research Center of the Helmholtz Association www.kit.edu

Technology for

Pervasive Computing

Using Web Service Gateways and Code Generation

for Sustainable IoT System Development

T. Riedel, N.L. Fantana*, A. Genaid, D. Yordanov, H. Schmidtke, M. Beigl,

KIT Pervasive Computing Systems Group, * ABB Corporate Research

Page 2: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

2 05.12.2010

Overview

Motivation

Use Case Driven Analysis

Implementation

Results

Outlook

IoT 2010, IoT Gateways, Till Riedel

Page 3: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

3 05.12.2010

Page 4: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

4 05.12.2010

Motivation

How to apply IoT in industrial environments

RFID, most often in logistics, first steps/islands

in industrial environment

WSN, most often in special applications

No real internet

Can IoT technolgies bring benefit in

industrial ad-hoc service case?

How can we be future proof and adaptive to

new developments? IoT 2010, IoT Gateways, Till Riedel

Page 5: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

5 05.12.2010

Page 6: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

6 05.12.2010

Internet of Things

Federating data from objects, machines, devices

Closing the reality gap business value

Technology available and installed: RFID, WSN, automation systems, external data

internet of Things

==

Network of

Networks of

Things

IoT 2010, IoT Gateways, Till Riedel

Page 7: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

7 05.12.2010

Why proprietary nodes and protocols?

Heterogeneous IoT Nodes

Market quickly evolving

application specific node development

Topologies and Infrastructure: RFID vs. WSN

Sensing the reality everywhere size/energy

Resource optimized IoT protocols

Enable the effective use of WSN/RFID

Lot of research in MAC-Layers, routing etc.

Low overhead by using implicit information

IoT 2010, IoT Gateways, Till Riedel

Page 8: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

8 05.12.2010

32 bit ARM7 256K RAM/2M Flash/80 MHz, 802.15.4, Java

8bit PIC18F6720 MCU 4KB RAM /128KB Flash,5MIPS, Awarecon, C/Java

8bit rfPIC 64 Byte RAM/1.4 KB Flash 1MIPS, C/Config only

Organic Label, PolyIC

SPOTS, Sun

IoT Platforms: Networked Sensing+ID

No MCU, 1bit-4kbyte EEPROM

IoT 2010, IoT Gateways, Till Riedel

Page 9: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

9 05.12.2010

Why Web Services?

Document oriented Web Service

Loose coupling

Message oriented communication

State less

Not (only) RPC! (see Saif, Greaves: Communication Primitives for Ubiquitous Systems or RPC Considered Harmful)

Typing

Integration into many programming languages

Well-defined Interfaces

Long term documentation (one the ideas behind SGML)

IoT 2010, IoT Gateways, Till Riedel

Page 10: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

10 05.12.2010

Device Profile for Web Services

Features:

• Profile of Basic Web Service

functionality

• Infrastructureless setup

• Support for “resource constraint “

device

Socrades Project

http://socrades.eu

Web services in automation and

sensing, realtime

WS4D

http://ws4d.org

DPWS implementations for gsoap

(C,C++), AXIS (Java)

WS

Discovery

WS

Eventing

WS

MEX

WS-Addressing, WS-Security

UDP HTTP

TCP

IP

Service

IoT 2010, IoT Gateways, Till Riedel

Page 11: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

11 05.12.2010

Page 12: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

12 05.12.2010

Are Web Services really the tool for IoT?

Cannot answer this generally!

Other approaches: see other talks in this

session!!!

Use case/requirement driven analysis:

1) Identification

2) Placement

3) Configuration

4) Measurement

5) Storage IoT 2010, IoT Gateways, Till Riedel

Page 13: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

13 05.12.2010

Identification and placement unambiguous association of data to data sources (measurement units or RFID name

plates)

scan the landscape for existing IoT

WS-Discovery

works infrastructure-less and ad-hoc

custom search criteria (type of node, location, measurement grouping)

RFID batch readings EPC over the air protocol

protocols in wireless sensor networks.

URI

Device Profile Metadata

Simple abstraction on Hosting and Hosted Service

Device and Functionality

But also group of devices, networlk and gateway services

Adds services to “things”

WS-MetadataExchange

Extend using context information location information

Identification is not only a machine to machine problem!!

IoT 2010, IoT Gateways, Till Riedel

Page 14: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

14 05.12.2010 IoT 2010, IoT Gateways, Till Riedel

Page 15: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

15 05.12.2010

Configuration & Storage

IoT 2010, IoT Gateways, Till Riedel

Need to archive configuration and data formats with the

document: See e.g. IEEE COMTRADE Format (3 text files)

Not only understand live data

Find out what the capabilities/interfaces are of a sensor WSDL is very expressive

Can easily extended semantically: We started using e.g. UnitsML

Easy to put in text documentation

Configure dynamic capabilities via document oriented

interfaces Clearly communicate and document the state!

Serialize data as XML along with static and dynamic

configuration and context information

Page 16: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

16 05.12.2010

IoT 2010, IoT Gateways, Till Riedel

Page 17: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

17 05.12.2010 IoT 2010, IoT Gateways, Till Riedel

Page 18: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

18 05.12.2010

Measurement

Again: do not use RPCs

Publish/Subscribe patterns are much more natural to the domain

WS-Eventing provides simple/extensible semantics

Industrial application need to support high data rates:

E.g. 2kHz continues sensor signal

250kHz transient

Do you want to use XML for this: yes

Can we use XML over a IoT network: no

IoT 2010, IoT Gateways, Till Riedel

Page 19: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

19 05.12.2010

Page 20: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

20 05.12.2010

Mapping Web Services to IoT

Client C Service Proxy S' WebService

Page 21: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

21 05.12.2010

GW

GW

GW

GW

Mapping Web Services to IoT

Client C Service Proxy S' WebService

Page 22: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

22 05.12.2010

GW

GW

GW

GW

Mapping Web Services to IoT

Client C Service Proxy S' WebService

The question will not be how to

write a single gateway but

how to write all the gateways

needed in the future…

Page 23: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

23 05.12.2010

Mapping IoT Nodes to Web Services

We will need

gateways? But how

many?

Can we afford map

every service by

hand?

Is there a way to do

it once and for all?

IoT 2010, IoT Gateways, Till Riedel

Page 24: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

24 05.12.2010

Gateway WS/WSN

Syntactic Transformation

Platform X

WS Comm.

Transformation

Transport

How to write transformations

• Manual Proxies

• Declarative Mapping (uMiddle,

• CoBIS)

• Implicit Mapping!

TransportA

Transformation

Transformation

Platform Y

Transport

Transport

<sample> ….</sample>

111|101001011|1011

IoT 2010, IoT Gateways, Till Riedel

Page 25: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

25 05.12.2010

Communication via

Common Models

Generated

Middleware

Efficient Generated

Code

Available as

eclipse plug-in

Ecore Meta Model

Akzeptor

Transformation DSL

SensorNode Gateway

WSDL/XSL,

ASN.1, IDL

Model driven development process

Client

IoT 2010, IoT Gateways, Till Riedel

Page 26: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

26 05.12.2010

The nice things about talking XML

bisimulate

Representation R

Encoding E

Representation R’

bisimulate

Encoding E’

WS-Client IoT node Gateway IoT 2010, IoT Gateways, Till Riedel

Lots of tools available!

But also theory available!

Hedge Grammars, nested word languages

Structure best available compromise between expressiveness and complexity?

Can be accepted via automata!

Page 27: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

27 05.12.2010

Domain specific

IoT 2010, IoT Gateways, Till Riedel

Formal

Executable

Page 28: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

28 05.12.2010

Aspect oriented Code Generation

Automata generator

templates

C-Code

Eclipse Modeling Framework

Xpand based model to text

DOM struct Writer

Bin Reader

Java-Code

DOM struct Writer

SAX Reader

software product line implementation

(Voelter, et.al)

IoT 2010, IoT Gateways, Till Riedel

Page 29: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

29 05.12.2010

Page 30: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

30 05.12.2010

Human resources

C# Mobile WCF Client

pPart Sensornode C-Code (DOM based)

IoT 2010, IoT Gateways, Till Riedel

Easy new platform adaption:

• Particle (binary encoding, AwareCon MAC, DOM-based code, existing pPart node)

• 6LoWPAN (binary encoding, 6lowpan/802.15.4 MAC,event-based code, Contiki Node)

• “Dummynode” (various encodings, IPv4, dom-based, PC basedtest environment)

Prototypes we are currently working on:

• RFID • Microstrain • Java Nodes

Difference between a Java SAX based implementation and a C proto-thread implementation:

approx. 150 lines of code for all possible service/gateway combinations

Page 31: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

31 05.12.2010

Network resources

using different encoding

allows high data rates/less

energy consumption

Event multiplexing offloads

load from sensor network

WS-Eventing requires

scalable client IoT 2010, IoT Gateways, Till Riedel

Page 32: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

32 05.12.2010

General Issues of Web Services

Web-Service client implementations are often not scalable

Other event delivery modes relax this situation: WS-Management

Discovery is not scalable for the real IoT

Custom scoping is important.

Moving away from the standards again:

Difficult to adapt clients!

You have to make it work once at least

Support for IoT Web Sevice standards is weak and often

incomplete and complicated

IoT 2010, IoT Gateways, Till Riedel

Page 33: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

33 05.12.2010

Reason for using Web Services

But:

Interaction patterns from web service community apply

to IoT!

Flexibility needed for IoT deployment

Interacting with things and not aggregating their data

Proprietary, incomplete, non-standardized solution will

give quicker success, but can they really be

sustainable?

Complexity is not an argument just an excuse!

Performance is not an argument either!

A common language for the IoT is needed:

Use (Web) Services for devices !!

IoT 2010, IoT Gateways, Till Riedel

Page 34: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

34 05.12.2010

Page 35: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

35 05.12.2010

Conclusion

We have show how Web Services can provide a

clean semantic abstraction to an IoT use case.

We can functionally fully capture an industrial service

IoT application with heterogeneous devices using

Web Services

We developed a way to develop a product line of

gateways for Web Services

We functionally enabled a number of IoT platforms

to be used in our application. IoT 2010, IoT Gateways, Till Riedel

Page 36: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

36 05.12.2010

Outlook

We only told you half of the story

The Internet of Things not only about

homogeneity but is also about the differences

of real things (and thus technologies)

How can we translate non-functional behavior to a

technology agnostic client application and eventually

user?

time synchronization for high speed sampling, calibration

temporary failure, service availability (especially RFID)

robustness, acceptance by user!

IoT 2010, IoT Gateways, Till Riedel

Page 37: Using Web Service Gateways and Code Generation for Sustainable IoT System Development

Technology for Pervasive Computing

37 05.12.2010

Questions?

[email protected]

nicolaie.fantana

@de.abb.com