The document discusses using web service gateways and code generation for sustainable IoT system development. It motivates applying IoT in industrial environments using heterogeneous nodes like RFID and wireless sensor networks. It proposes using web services as a common language for the IoT due to benefits like loose coupling, message orientation, and support in many programming languages. The document presents an approach using web service discovery, device profiling, and declarative mappings to generate gateways that integrate different IoT platforms and protocols as web services. This allows capturing IoT applications and enabling different hardware platforms through a common development process.
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Using Web Service Gateways and Code Generation for Sustainable IoT System Development
1. 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
KIT – University of the State of Baden-Wuerttemberg and
National Research Center of the Helmholtz Association www.kit.edu
2. Overview
Motivation
Use Case Driven Analysis
Implementation
Results
Outlook
IoT 2010, IoT Gateways, Till Riedel
Technology for
2 05.12.2010 Pervasive
Computing
4. 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
Technology for
4 05.12.2010 Pervasive
Computing
6. 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 Technology for
6 05.12.2010 Pervasive
Computing
7. 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
Technology for
7 05.12.2010 IoT 2010, IoT Gateways, Till Riedel Pervasive
Computing
8. IoT Platforms: Networked Sensing+ID
32 bit ARM7
256K RAM/2M Flash/80 MHz, 802.15.4, Java
8bit PIC18F6720 MCU
4KB RAM /128KB Flash,5MIPS,
Awarecon, C/Java
SPOTS, Sun
8bit rfPIC 64 Byte RAM/1.4 KB Flash
1MIPS, C/Config only
No MCU, 1bit-4kbyte
EEPROM
Organic Label, PolyIC
Technology for
8 05.12.2010 IoT 2010, IoT Gateways, Till Riedel Pervasive
Computing
9. 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)
Technology for
9 05.12.2010 IoT 2010, IoT Gateways, Till Riedel Pervasive
Computing
10. Device Profile for Web Services
Features:
• Profile of Basic Web Service
functionality Service
• Infrastructureless setup
• Support for “resource constraint “ WS WS WS
device Discovery MEX Eventing
WS-Addressing, WS-Security
Socrades Project
UDP HTTP
http://socrades.eu
Web services in automation and TCP
sensing, realtime IP
WS4D
http://ws4d.org
DPWS implementations for gsoap
(C,C++), AXIS (Java)
IoT 2010, IoT Gateways, Till Riedel
Technology for
10 05.12.2010 Pervasive
Computing
12. 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
Technology for
12 05.12.2010 Pervasive
Computing
13. 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
Technology for
13 05.12.2010 Pervasive
Computing
14. IoT 2010, IoT Gateways, Till Riedel
Technology for
14 05.12.2010 Pervasive
Computing
15. Configuration & Storage
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
IoT 2010, IoT Gateways, Till Riedel
Technology for
15 05.12.2010 Pervasive
Computing
16. IoT 2010, IoT Gateways, Till Riedel
Technology for
16 05.12.2010 Pervasive
Computing
17. IoT 2010, IoT Gateways, Till Riedel
Technology for
17 05.12.2010 Pervasive
Computing
18. 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
Technology for
18 05.12.2010 Pervasive
Computing
20. Mapping Web Services to IoT
Client C WebService Service Proxy S'
Technology for
20 05.12.2010 Pervasive
Computing
21. Mapping Web Services to IoT
Client C WebService Service Proxy S'
GW
GW
GW
GW
Technology for
21 05.12.2010 Pervasive
Computing
22. Mapping Web Services to IoT
Client C WebService Service Proxy S'
GW
The question will not be how to
write a single gateway but
GW
how to write all the gateways
needed in the future…
GW
GW
Technology for
22 05.12.2010 Pervasive
Computing
23. 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
Technology for
23 05.12.2010 Pervasive
Computing
24. Syntactic Transformation
Gateway WS/WSN
TransportA WS Comm. Transport
Transformation Transformation
<sample> ….</sample>
Platform X Transport
111|101001011|1011
How to write transformations
• Manual Proxies
• Declarative Mapping (uMiddle, Transport
• CoBIS) Transformation
• Implicit Mapping!
Platform Y
IoT 2010, IoT Gateways, Till Riedel
Technology for
24 05.12.2010 Pervasive
Computing
25. Model driven development process
WSDL/XSL,
ASN.1, IDL
Ecore Meta Model
Communication via
Common Models
Generated
Middleware Akzeptor
Efficient Generated
Code
Transformation DSL
Available as
eclipse plug-in
Client Gateway SensorNode
IoT 2010, IoT Gateways, Till Riedel
Technology for
25 05.12.2010 Pervasive
Computing
26. The nice things about talking XML
Lots of tools available!
But also theory available!
Representation R Hedge Grammars, nested word Representation R’
languages
Structure best available compromise
between expressiveness and
complexity?
Can be accepted via automata!
bisimulate bisimulate
Encoding E’
Encoding E
WS-Client Gateway IoT node
Technology for
26 05.12.2010 IoT 2010, IoT Gateways, Till Riedel Pervasive
Computing
27. Domain specific
Formal
Executable
IoT 2010, IoT Gateways, Till Riedel
Technology for
27 05.12.2010 Pervasive
Computing
28. Aspect oriented Code Generation
Java-Code
C-Code
SAX Reader
Bin Reader
Automata generator DOM struct Writer
DOM struct Writer
templates
software product line implementation
(Voelter, et.al)
Eclipse Modeling Framework
Xpand based model to text
Technology for
28 05.12.2010 IoT 2010, IoT Gateways, Till Riedel Pervasive
Computing
30. Human resources
C# Mobile WCF Client
pPart Sensornode C-Code (DOM based)
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
IoT 2010, IoT Gateways, Till Riedel Technology for
30 05.12.2010 Pervasive
Computing
31. 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
Technology for
31 05.12.2010 Pervasive
Computing
32. 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
Technology for
32 05.12.2010 Pervasive
Computing
33. 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
Technology for
33 05.12.2010 Pervasive
Computing
35. 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
Technology for
35 05.12.2010 Pervasive
Computing
36. 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
Technology for
36 05.12.2010 Pervasive
Computing