Kura Wires
Kura Wires
Kura Wires
Ein Internet der Dinge Gateway leitet physikalische Geräte ins Internet über.
Ein solches Gateway isoliert die Entwickler von der Komplexität der Hardware-
Subsysteme. Eclipse Kura ist ein Java- und OSGi-basiertes Open Source Fra-
mework, das eine Plattform für den Aufbau von IoT-Gateways bietet. Es ist
ein Anwendungscontainer, der die Fernverwaltung solcher Gateways ermöglicht
und eine breite Palette an APIs bietet, mit denen Entwickler ihre eigenen IoT-
Anwendungen schreiben und bereitstellen können.
In Fabriken konzentrieren sich Menschen oft auf die Verarbeitung von Daten
physikalischer Geräte und es erfordert eine Arbeitsumgebung um mit den Ge-
räten zu kommunizieren. Gegenwärtig verfügbare Lösungen (OpenMUC, Bosch
ProSyst, Eclipse Kura 1.x) benötigen Kenntnisse über spezifische Framework-
Interna um einen solchen Kommunikationsmechanismus zu entwickeln. Somit
verbringen die Menschen mehr Zeit mit der Programmierung ihrer Service Gate-
ways für bestimmte Gerätekommunikationsszenarien. Dies im Hinterkopf, stellt
Eclipse Kura 2.0 Kura Wires vor um die Entwicklung solcher industriellen An-
wendungen durch visuelles Zusammenfügen von Komponenten zu erleichtern.
Zum Beispiel die Verbindung einer OPC-UA PLC mit Cloud Publisher um die
Verbreitung ihrer Produktionsdaten auf der Cloud-Plattform zu steuern.
Derzeit fehlt Eclipse Kura eine Komponente um einfach mit industriellen Gerä-
ten zu kommunizieren. Eine solche Komponente würde die Kommunikation mit
Geräten ermöglichen, die spezifische Treiber industrieller Protokolle verwen-
den. Das Hauptziel dieser Arbeit ist es Kura Wires zu entwerfen und zu ent-
wickeln, bzw. ein erweiterbares Geräte- und Treiber-Management-Framework
über Eclipse Kura. Der Beitrag beinhaltet auch die Entwicklung von wesentli-
chen logischen Komponenten, logischen Geräten und Treibern für mehrere in-
dustrielle Feldprotokolle (Modbus, OPC-UA und Siemens PROFINET), die in
erster Linie erforderlich für Anwendungen sind um Daten von Industriegeräten
zu verarbeiten. Zum Schluss würden wir gerne den Aufbau einer industriellen
Anwendung demonstrieren um Daten eines industriellen Gerätes durch die vi-
suelle Verbindung von Komponenten unter der Nutzung von Eclipse Kura auf
ReliaGATE Service Gateways zu sammeln.
Abstract
1 Introduction 1
1.1 Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Background 3
2.1 OSGi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Eclipse Kura . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Dataflow Programming . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Visual Programming . . . . . . . . . . . . . . . . . . . . . . . . 6
2.5 Edge Computing . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.6 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.6.1 Node-RED . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.6.2 SAM Labs . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 Requirements Analysis 9
3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 What is missing in Eclipse Kura? . . . . . . . . . . . . . . . . . 9
3.2.1 Application Store for Eclipse Kura . . . . . . . . . . . . 11
3.3 Glossary of Terms . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.4 Kura Wires . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4.1 Scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.5 Use Case Model . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.5.1 High-level Use Cases . . . . . . . . . . . . . . . . . . . . 19
3.5.2 Configure Wire Component . . . . . . . . . . . . . . . . 19
3.5.3 Perform Remote Request . . . . . . . . . . . . . . . . . . 21
3.5.4 Filter, Store, Publish and Receive Data . . . . . . . . . . 22
3.6 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.6.1 Functional Requirements . . . . . . . . . . . . . . . . . . 23
3.6.2 Nonfunctional Requirements . . . . . . . . . . . . . . . . 24
3.7 System Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.7.1 Analysis Object Model . . . . . . . . . . . . . . . . . . . 25
3.7.2 Dynamic Model . . . . . . . . . . . . . . . . . . . . . . . 32
i
4 System Design 36
4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.2 Design Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
4.3 Subsystem Decomposition . . . . . . . . . . . . . . . . . . . . . 37
4.3.1 Application Logic Layer . . . . . . . . . . . . . . . . . . 38
4.3.2 Storage Layer . . . . . . . . . . . . . . . . . . . . . . . . 39
4.4 Hardware Software Mapping . . . . . . . . . . . . . . . . . . . . 40
4.4.1 Third-Party Libraries . . . . . . . . . . . . . . . . . . . . 40
4.5 Persistent Data Management . . . . . . . . . . . . . . . . . . . . 42
4.6 Global Software Control . . . . . . . . . . . . . . . . . . . . . . 43
4.7 Boundary Conditions . . . . . . . . . . . . . . . . . . . . . . . . 43
5 Object Design 46
5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
5.2 Data Representation . . . . . . . . . . . . . . . . . . . . . . . . 46
5.3 Wire Component Management . . . . . . . . . . . . . . . . . . . 47
5.4 Asset and Driver Management . . . . . . . . . . . . . . . . . . . 48
5.4.1 Associate Driver with Asset . . . . . . . . . . . . . . . . 49
5.5 Wire Management . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.5.1 Wire Connections . . . . . . . . . . . . . . . . . . . . . . 51
5.5.2 Push Pattern . . . . . . . . . . . . . . . . . . . . . . . . 52
5.5.3 Visitor Pattern . . . . . . . . . . . . . . . . . . . . . . . 52
5.6 External Configuration . . . . . . . . . . . . . . . . . . . . . . . 53
5.7 Remote Communication . . . . . . . . . . . . . . . . . . . . . . 55
6 Summary 57
6.1 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
6.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
A Screenshots 60
ii
API Application Programming Interface
IP Internet Protocol
S7 Siemens Simatic 7
iii
UI User Interface
iv
Chapter 1
Introduction
1.1 Problem
The industrial environment is an evolving enterprise, comprising different types
of sensors, machines and instruments of varying vintage, each with its own de-
mands for monitoring, control and maintenance. Some of these devices are
Internet-enabled either through hardwired connectors or via Wi-Fi. But a
broad range of older devices are not likely to be inherently connectable to a
network. Even the traditional approach to manage these devices manually
prohibits real time processing of the data as it requires human-to-human or
human-to-machine interactions [DXH+ 14]. Yet these traditional approaches of
manually overseeing and managing these devices within an industrial environ-
ment can be improved by configuring these devices into an intelligent connected
ecosystem.
This ecosystem embodies the concept of Industrial Internet of Things or Indus-
trial IoT (IIoT) that uses Internet of Things (IoT) technologies for industrial
purpose such as manufacturing, supply chain monitor and management system.
It is a type of environment architecture that connects a broad community of
industrial devices within a connected network. If these devices are enabled with
computational capabilities, it will create an environment to process data easily
from industrial machineries [DXH+ 14]. These intelligent devices allow harvest-
ing raw data and managing the dataflow, from devices to the data store, to the
analytic systems and also to the data scientists. This dataflow cycle helps the
data scientists to extract prime value from this data.
Currently there exists several solutions that require users to develop custom im-
plementations to accumulate and process data from such devices, for instance,
OpenMUC, Bosch ProSyst, Eclipse Kura 1.x. But these solutions require inten-
sive knowledge of the framework, industrial protocols and primary knowledge
of programming. This makes it very restrictive for users to easily setup and
develop their own Industrial IoT environment to collect and process device
data.
1
1.2. MOTIVATION
1.2 Motivation
According to the currently available solutions, the implementation of Indus-
trial IoT application scenarios to process data from industrial devices requires
necessary internal knowledge of available frameworks, industrial protocols and
programming experience as a prerequisite. This eventually constrains users to
invest their time on knowing the framework and developing modules to commu-
nicate with industrial devices rather than focusing on the application scenar-
ios. Hence, proposed system - Kura Wires focuses on easing the development
of Industrial IoT application scenarios to accumulate and process data from in-
dustrial machineries with the help of reusable components, for instance, device
drivers to communicate with industrial devices, data filters, publishers to pub-
lish device data to the cloud, and so on. The system also benefits users to build
custom Industrial IoT applications visually without requiring any programming
experience apriori.
1.3 Objectives
The objectives of the proposed system are to:
• Provide a framework for users to build their own Industrial IoT applica-
tion scenarios to process industrial device data visually and programmat-
ically
• Provide necessary reusable device and data management components
(Cloud Publisher, Cloud Subscriber, Data Store, Data Filter, Timer,
Drivers to communicate with industrial devices of different protocols)
• Provide a Composer UI to contain the aforementioned logical components
as visual elements
• Build Industrial IoT application scenarios by dragging the visual compo-
nents onto the Composer UI and connecting them based on user require-
ments
• Provide an extensible system for IoT application developers to develop
further visual components
1.4 Outline
In this chapter, we have discussed the problem that we are aiming to solve
with the development of Kura Wires. Chapter 2 summarizes the necessary
backgrounds for understanding the system in details. In Chapter 3, we analyze
the requirements of the system, including the different scenarios, use cases,
analysis object model and dynamic model. Thereafter Chapter 4 solidifies the
analysis model towards the system design, whereas Chapter 5 provides the
object design and focuses on reusing the application of design patterns. Finally
in Chapter 6, we include the status of the system development and an outlook
of the future work.
2
Chapter 2
Background
2.1 OSGi
Today’s pervasive computing environments are developed with proprietary tech-
nologies. But they seem to lack a long-term vision of evolution to connect a
wide range of devices and services from different manufacturers. They also
inhibit inter-operation with each other [AN10] [Hel10].
Open Services Gateway Initiative (OSGi) is a standard, non-proprietary, soft-
ware component framework for manufacturers, service providers, and devel-
opers. It provides an extensible environment to connect various devices and
services. The framework can dynamically discover devices and services from
different sources. In addition, the connectivity support in OSGi to the outside
world allows remote control, diagnosis and management [LKR+ 06] [Hel10].
OSGi provides a secure environment that executes applications independently
so that these applications cannot harm the environment or interfere with other
applications. These applications are known as Bundles. OSGi enables co-
existence of different bundles in a single Java Virtual Machine (JVM). Multiple
bundles running on same JVM reduce memory footprint and increase overall
performance [DFK+ 02].
The framework comprises an execution environment that manages the lifecycle
of the bundles without restarting the system. It allows bundles to contribute
code as well as specialized application components, known as services to the en-
vironment. Bundles collaborate with each other through services. Such services
are registered with the framework’s service registry. The framework therefore
advertises these services to make them discoverable by other interested bun-
dles [Hel10].
OSGi framework consists of conceptual layers where each layer is dependent on
the layer(s) beneath it. Figure 2.1 shows the layered architecture of OSGi.
3
2.2. ECLIPSE KURA
1
Functional architecture denotes the overall architecture using functional elements that
are based on system’s functions [BP10]
4
2.2. ECLIPSE KURA
2
Telemetry Data are the physical data measured by sensors at the source
5
2.3. DATAFLOW PROGRAMMING
6
2.5. EDGE COMPUTING
But these complexities of reading and writing code, can be simplified using
visual programming. It enables users to implement a program through con-
necting visual elements as a sequence of functionalities, expressed as a visual
dataflow graph. Many modern IoT systems provide a graphical user interface to
construct such visual dataflow graph [GBL+ 15]. Some of these existing systems
are discussed briefly in Section 2.6 (Related Work).
Kura Wires follows similar approach of creating a visual dataflow graph to
develop an Industrial IoT application.
2.6.1 Node-RED
Node-RED3 is a browser-based, dataflow editing framework for writing pro-
grams visually where nodes represent databases, functions or smart devices.
These nodes can be connected together to build a visual dataflow graph. Nodes
are encapsulated with additional functionalities that makes them flexible for de-
velopers to write their code and add it as a customized node. This way devel-
opers are able to rapidly design a first prototype [BL14]. Graphical illustration
of Node-RED is shown in Figure 2.4.
Although, Node-RED connects smart devices such as light bulbs and switches,
but the user-interface primarily demands developers to write code snippets in
3
https://nodered.org
7
2.6. RELATED WORK
4
https://www.samlabs.com
8
Chapter 3
Requirements Analysis
3.1 Overview
In Chapter 2, we discussed the advantages of different approaches needed to de-
velop Kura Wires. With Kura Wires, the development of Industrial IoT applica-
tions to manage data from industrial machineries does not require any program-
ming experience. It consists of few basic visual components such as communi-
cation with database and industrial devices (Modbus, OPC-UA, PROFINET),
cloud publisher, data filter etc. Kura Wires uses these visual components to
collect only the data of importance from the large amount of data produced by
the industrial processes. Such visual components benefit users to perform data
reduction and collection operations.
This chapter analyzes various requirements of Kura Wires. In Section 3.2, the
missing features in Eclipse Kura are explained and an extended functional archi-
tecture of Eclipse Kura with Kura Wires is shown. Section 3.3 lists the glossary
of important terms to help readers understand the requirements specification
of Kura Wires. Necessary scenarios and use cases are discussed in Section 3.4
and Section 3.5, followed by the functional and non-functional requirements
in Section 3.6. Thereafter Section 3.7 presents the object model and dynamic
model of Kura Wires.
9
3.2. WHAT IS MISSING IN ECLIPSE KURA?
This necessitates the requirement to provide the device and data management
components to accumulate and process industrial device data and implement
custom industrial application scenarios without the need of any programming
experience. A typical use for this requirement would be in intelligent monitor-
ing, whereby entire fields of sensors connected to industrial devices are mon-
itored and the accumulated data are provided to remote cloud platform for
historical and predictive analysis.
Kura Wires introduces a graphical user interface where users can build their own
Industrial IoT applications visually. This requires interactions with industrial
devices and hence, Kura Wires provides such visual elements. We introduce
Asset as a visual element which associates a driver to interact with physical
devices. Kura Wires also provides such drivers to communicate with industrial
devices that Eclipse Kura 1.x does not.
Figure 3.1 shows the extended functional architecture of Eclipse Kura added
with Kura Wires. The functional blocks Kura Wires and Asset are additionally
added compared to Figure 2.2 whereas Drivers functional block is enhanced
with new implementations to communicate with industrial devices.
10
3.2. WHAT IS MISSING IN ECLIPSE KURA?
11
3.3. GLOSSARY OF TERMS
12
3.4. KURA WIRES
3.4.1 Scenarios
Scenario 1 - CollectAndFilterModbusDeviceData
This scenario as shown in Figure 3.2, describes the steps involved in collecting
data produced by a Modbus Device and filters it based on user-specific criterion.
The Wire Graph to realize this scenario is illustrated in Figure 3.3.
Figure 3.3: Wire Graph to collect and filter data from Modbus Device
13
3.4. KURA WIRES
Scenario 2 - WriteModbusDataToS7Device
Figure 3.4: Collect data from Modbus Device and write to S7 Device
14
3.4. KURA WIRES
Figure 3.4 illustrates the scenario to write Modbus Device produced data to
specific Channels of an S7 Device. The Wire Graph to express this scenario is
shown in Figure 3.5. The steps are also explained as follows.
Figure 3.5: Wire Graph to write Modbus Device data to Channels of an S7 Device
15
3.4. KURA WIRES
Scenario 3 - QueryModbusDeviceConnectedLedStatus
Figure 3.7: Wire Graph to query the status of connected Modbus Device
16
3.4. KURA WIRES
Scenario 4 - ChangeRemoteOpcUaConnectedActuatorData
Figure 3.9: Wire Graph to write to specific Channels of a remote OPC-UA Device
17
3.4. KURA WIRES
18
3.5. USE CASE MODEL
Figure 3.10: Create Industrial IoT Application (UML Use Case Diagram)
19
3.5. USE CASE MODEL
20
3.5. USE CASE MODEL
Configure Asset
Asset is a specialized Wire Component that interacts with physical devices.
Configuring an Asset requires Industrial Engineer to specify the Channels to
read and/or write data from/to Industrial Device. An Asset associates a Driver
to communicate with Industrial Devices that hides the low-level complexities.
Hence, configuring an Asset includes both Driver and Channel configurations.
Figure 3.12 shows the different use cases to configure an Asset in a Wire Graph.
21
3.5. USE CASE MODEL
• FilterData: Industrial Engineer filters the device data that meet specific
criteria. For instance, Industrial Engineer can filter temperature sensor
data which is more than 20 degrees centigrade. Filters can be written
down using query language in database.
22
3.6. REQUIREMENTS
Figure 3.14: Filter, Store, Publish and Receive data (UML Use Case Diagram)
3.6 Requirements
In this section, we infer the functional and non-functional requirements of Kura
Wires after analyzing the different scenarios and use cases as discussed previ-
ously.
FR2 Wire Components: The Composer UI should contain the Wire Compo-
nents to build Industrial IoT applications to communicate with Modbus,
OPC-UA and S7 Devices.
FR3 Drag and Drop of Wire Components to Composer UI: The Com-
poser UI should support drag and drop of available Wire Components to
the Composer UI.
23
3.6. REQUIREMENTS
FR6 Read Data from Industrial Device: The framework should support
reading data from Industrial Devices (Modbus, OPC-UA and S7).
FR7 Write Data to Industrial Device: Users should be able to write data
to Industrial Devices (Modbus, OPC-UA and S7).
FR9 Filter Device Data: The framework should provide support for filtering
Industrial Device produced data. For instance, Industrial Engineer should
be able to filter out temperature sensor measurement data which is more
than 20 degrees centigrade.
NFR1 Usability: The user must be able to implement an Industrial IoT sce-
nario in Kura Wires without any programming experience.
24
3.7. SYSTEM MODEL
NFR5 Packaging: The system must be packaged with future Eclipse Kura 2.0
releases.
NFR6 Legal: The system must be licensed under Eclipse Public License v1.0
for open source contribution.
Entity Objects
Entity objects are the persistent information of a system [BD10]. The objective
of entity objects are to store information after completion of a use case and to
define behaviors for manipulating this information. Here we explore the entity
objects of Kura Wires to build an Industrial IoT application visually.
• Wire Graph and Wire Component: In Kura Wires, the dataflow graph
is persisted as WireGraph entity object. A connection information between two
Wire Components are stored as WireConfiguration and a WireGraph comprises
multiple WireConfigurations that denotes an entire dataflow graph. Each node
in Kura Wires dataflow graph is stored as WireComponent.
There exists two different types of Wire Components - Wire Receiver that only
receives data and Wire Emitter that only produces data. These specialized
types of Wire Components are persisted as WireEmitter and WireReceiver entity
objects.
Every Wire Component is responsible for either producing data for its down-
stream Wire Components or consuming data from its upstream Wire Compo-
nents. This data is encapsulated in WireEvent entity object.
25
3.7. SYSTEM MODEL
Table 3.2: Entity Objects associated with Wire Graph and Wire Component in Kura
Wires
Figure 3.15 shows these entity objects and their relationships and Table 3.2
gives an overview of these entity objects.
Figure 3.15: Wire Graph and Wire Component (UML Class Diagram)
26
3.7. SYSTEM MODEL
27
3.7. SYSTEM MODEL
Table 3.4: Entity Objects associated with different Wire Components in Kura Wires
28
3.7. SYSTEM MODEL
Boundary Objects
Boundary object communicates with the external environment and shows the
interactions between the user and the system [BD10].
Kura Wires uses a Composer UI with which Industrial Engineer is able to im-
plement an Industrial IoT scenario. The Composer UI contains a Canvas to
wire different Wire Components visually. It also contains different Configura-
tionForms to configure aforementioned entity objects (Table 3.2, 3.3 and 3.4).
Earlier in Table 3.1, we also listed different configurable properties of all Wire
Components and Driver. Figure 3.18 shows different boundary objects and their
associations in Kura Wires. In Table 3.5, these boundary objects are discussed.
29
3.7. SYSTEM MODEL
30
3.7. SYSTEM MODEL
Control Objects
31
3.7. SYSTEM MODEL
32
3.7. SYSTEM MODEL
and DB Store is wired with DB Filter. Finally to publish data to Cloud Plat-
form, DB Filter is also wired with Cloud Publisher. After connecting these Wire
Components, they are configured accordingly. For reference, the configurable
properties of Wire Components and Driver are listed in Table 3.1.
Figure 3.22: Activities of an Industrial Engineer to create a Wire Graph for collecting
and filtering Modbus Device data (UML Activity Diagram)
Figure 3.23 captures the activities to model the dataflow in the created Wire
Graph.
Figure 3.23: Activities and events in a dataflow of a Wire Graph to accumulate and
filter Modbus Device data (UML Activity Diagram)
Timer initiates dataflow in the Wire Graph when it triggers event every specific
time interval. Its downstream Wire Component Asset receives the event, reads
33
3.7. SYSTEM MODEL
the configured input Channels and finally fires an event encapsulating the mea-
surement data. This event is then received by DB Store that stores the data
to a database storage and forwards it to DB Filter to execute a database query
for filtering records. The filtered data, thereafter, is emitted to the downstream
Cloud Publisher for publishing to the Cloud Platform.
In Figure 3.24, the activities to query status of an Industrial Device from remote
location are shown. For this activity diagram, we consider previously discussed
scenario - QueryModbusDeviceConnectedLedStatus. This scenario explains the
steps to query the status of a Modbus Device-connected LED sensor. Industrial
Engineer creates a Wire Graph with the required configurations of the Wire
Components and Driver. From remote location (for instance, home), Industrial
Engineer sends a status query request using Kura-compliant App that is received
by the Wire Graph. Wire Graph queries the configured Asset for the status of
its connected LED and responds to the requester Kura-compliant App with the
status information.
Figure 3.24: Interactions of an Industrial Engineer with a Wire Graph to read the
status of Modbus Device-connected LED from remote location (UML
Activity Diagram)
34
3.7. SYSTEM MODEL
Figure 3.25: Interactions of an Industrial Engineer with two different Wire Graphs
for inter-gateway communication (UML Activity Diagram)
35
Chapter 4
System Design
4.1 Overview
In this chapter, we explain all the essential activities required for Kura Wires
system design. In Section 4.2, we ensure that the system addresses all the
nonfunctional requirements and can account for any constraints during the
implementation phase. Section 4.3 decomposes the system into coherent sub-
systems and in Section 4.4, we examine carefully the allocation of subsystems to
computers and the design of the infrastructure for supporting communication
between subsystems. Thereafter in Section 4.5, we identify the different objects
eligible to be persisted and follow storage management strategy as mentioned
in [BD10] to select persistent storage for Kura Wires. Section 4.6 considers the
requirements for designing the Global Control Flow of Kura Wires, followed by
the identification of boundary conditions in Section 4.7 that leads to inclusion
of new use cases to the use case model.
36
4.3. SUBSYSTEM DECOMPOSITION
37
4.3. SUBSYSTEM DECOMPOSITION
38
4.3. SUBSYSTEM DECOMPOSITION
39
4.4. HARDWARE SOFTWARE MAPPING
40
4.4. HARDWARE SOFTWARE MAPPING
Figure 4.2: Kura Wires Hardware Software Mapping (UML Deployment Diagram)
11
https://github.com/steveohara/j2mod
12
https://github.com/eclipse/milo
13
https://github.com/s7connector/s7connector
41
4.5. PERSISTENT DATA MANAGEMENT
Kura Wires deals with sets of configurations and objects that need to be stored.
The first set includes the objects that are managed by aforementioned Wire-
ComponentManagement and WireManagement subsystems. The different Wire-
Component instances to create a Wire Graph need to be persisted with all of its
configurations. Furthermore, the WireManagement subsystem needs to persist
the WireConfiguration instances that represent the connections between Wire
Components. Accumulating data from Industrial Devices requires the use of As-
set and an Asset associates a protocol specific Driver. Considering AssetMan-
agement and DriverManagement subsystems, the configurations of input and
output Channels of an Asset and connection specific configurations of Driver
need to be stored in a persistent storage as well.
On the other hand, the requirement to store Industrial Device data using a DB
Store requires the use of specific database storage.
42
4.6. GLOBAL SOFTWARE CONTROL
Platforms, the user can remotely update the configuration of component in-
stances.
43
4.7. BOUNDARY CONDITIONS
Figure 4.3: Kura Wires boundary use cases to handle exceptional conditions (UML
Use Case Diagram)
44
4.7. BOUNDARY CONDITIONS
Figure 4.4: Kura Wires boundary use cases to handle startup and shutdown condi-
tions (UML Use Case Diagram)
Here we describe what has to be done while starting or ending Kura Wires.
This results in two additional use cases.
45
Chapter 5
Object Design
5.1 Overview
This chapter discusses Kura Wires object design and the application of well-
known design patterns to it. Section 5.2 explains how data is represented in
Kura Wires. We separate the object designs into various cohesive figures. From
Section 5.3 to Section 5.5, we provide the object designs of identified subsystems
of Kura Wires. Section 5.6 provides an overview of how configurations are
managed, followed by MQTT communication mechanism in Section 5.7.
Wire Components can only understand specific data types, and are therefore
restricted in what data they can process. Figure 5.1 shows the different data
types required for connected Wire Components to communicate with each other.
Figure 5.1: Data types for communication between Wire Components (UML Class
Diagram)
46
5.3. WIRE COMPONENT MANAGEMENT
Figure 5.2 shows the relevant classes and their associations that describe data
processed by the Wire Components. It represents the data that flows in a Wire
Graph.
OSGi Wire Admin, a specification in OSGi that enables OSGi services to gener-
ate data and send it to the services interested in the same data. Interested ser-
vices therefore receive new data regularly from the OSGi services that produce
data. For instance, a physical device produces information about its current
status. Data consumers such as an user interface, detector etc. consume this
information to know the status of the device.
Figure 5.3 shows the significant APIs of OSGi Wire Admin specification.
47
5.4. ASSET AND DRIVER MANAGEMENT
48
5.4. ASSET AND DRIVER MANAGEMENT
Whiteboard Pattern
49
5.5. WIRE MANAGEMENT
the interested consumers. The provider then binds to the requester by invoking
the service handle [KH04]. Figure 5.8 provides an overview of this mechanism.
In this figure, a Component is an object that implements a number of service
roles, potentially from different services. A service component can depend on
a number of other services and uses any number of implementation classes.
Kura Wires uses OSGi Declarative Service specification [All07] to dynamically
inject service dependencies.
50
5.5. WIRE MANAGEMENT
51
5.5. WIRE MANAGEMENT
Figure 5.11: Dataflow Communication between Wire Emitter and Wire Receiver
(UML Sequence Diagram)
To produce new data, every WireEmitter must override the polled(Wire) ab-
stract mehtod which is used by Wire object in WireConfiguration to poll new
data from WireEmitter and push it to the connected WireReceiver. When
the WireEmitter produces new data, the WireEmitter calls the update(Object)
method on the Wire object. The Wire object implementation must then call the
updated(Wire, Object) method on the WireReceiver instance which internally
creates WireEnvelope object from the received data and invokes onWireRe-
ceive(WireEnvelope) method on the same WireReceiver instance.
52
5.6. EXTERNAL CONFIGURATION
53
5.6. EXTERNAL CONFIGURATION
The Drivers and Wire Components of Kura Wires are configured in runtime
using OSGi Metatype specification. The configuration properties for each Wire
Component and Driver are described in metadata that complies with the OSGi
Metatype specification. Listing 5.1 shows a metatype configuration file of a
Heater Wire Component.
• AD: Attribute Definition (AD) denotes elements for each configuration prop-
erty. Each attribute needs an identifier and optionally a name and a de-
scription. Specifying a type allows the runtime environment to validate
the input for that type. Specifying a useful default value allows configu-
ration to be set to the default value if any previous configuration is not
found.
54
5.7. REMOTE COMMUNICATION
Every application (for instance, Kura-compliant App) must comply with these
topic namespace scheme to communicate with Cloud Platform. Figure 5.13
shows the various topic namespaces to perform remote requests in Kura Wires.
In this figure, let us consider, we have a gateway with identifier set to MyGate-
way. Now, to access any Industrial Device from remote location, users can use
the endpoints- GET/assets, GET/assets/assetID, and so on.
55
5.7. REMOTE COMMUNICATION
The MQTT topics that Kura Wires understands and processes are,
• wires/MyGateway/ASSET-CLOUDLET/GET/assets/MyAsset/10: It reads
MyAsset associated Channel with a unique identifier of 10
The abovementioned MQTT topics and the namespaces are mapped as follows:
• CTRL-PREFIX: null
• account-name: wires
• gateway-id: MyGateway
• app-id: ASSET-CLOUDLET
Eclipse Kura has extended the flexible concept of MQTT topics to follow this
schematic pattern. Based on this MQTT namespace, an application running on
Eclipse Kura can be viewed in terms of its resources that it owns and manages.
Kura Wires being an application on top of Eclipse Kura leverages this feature
to realize remote MQTT communication.
56
Chapter 6
Summary
This chapter summarizes the thesis, discusses its findings and contributions,
points out limitations of the current work and also outlines directions for future
research. We have demonstrated dataflow programming approach to be a means
of implementing Industrial IoT scenarios to process data from field devices.
However, many extensions of this research deserve further consideration.
6.1 Contributions
In this thesis work, we developed a framework that enables users to build their
own Industrial IoT applications to process data from industrial machineries.
Basic functionalities to build such framework are, for instance, I/O services,
cloud communication, network management, and so on. To prevent rewrit-
ing these functionalities from scratch, we selected Eclipse Kura Open Source
framework as the foundation for Kura Wires.
Kura Wires incorporates a dataflow programming model that raises the ab-
straction level of the underlying IoT systems to ease the development task.
In this dataflow programming model, the underlying hardware, protocols and
functionalities of IoT systems are abstracted as nodes in a flow. If developers
require more flexibility or functionalities than what the current nodes offer, new
custom nodes can be developed in Kura Wires.
As an initial contribution, we created a composer canvas that allows users to
build their Industrial IoT applications visually. In addition, we have provided
preliminary device and data management nodes or more specifically Wire Com-
ponents. The detailed information of the Wire Components is given in Chapter
3 (Requirements Analysis).
The realized goals are summarized as follows:
• Users can make use of Kura Wires to build Industrial IoT applications
visually to process machine production data
• Users can publish machine production data to Cloud Platform for further
historical and predictive analysis
57
6.2. FUTURE WORK
• Users can filter machine production data before publishing to Cloud Plat-
form
58
6.2. FUTURE WORK
Figure 6.1: Industrial IoT Ecosystem with Eclipse Kura and Eclipse Kapua
Eclipse Kapua-equipped Cloud Platform manages the connectivity for IoT gate-
ways through a different set of protocols. The platform also offers device man-
agement capabilities to introspect gateway configuration, update gateway ap-
plications and firmware, and control the gateway remotely.
To enable the development of Wire Graphs in Eclipse Kapua requires the inte-
gration of Kura Wires. This benefits users to directly deploy Wire Graphs into
the managed service gateways from remote location.
14
https://eclipse.org/kapua/
59
Appendix A
Screenshots
60
• Create Driver: Figure A.2 shows the user interface to instantiate a Driver.
61
• Create Asset: Figure A.4 shows the user interface to create an Asset.
• Process Data from Modbus and OPC-UA Devices: Figure A.5 presents
a Wire Graph that reads data from specific Channels from Modbus and OPC-
UA PLCs. This data is accumulated and published to the Cloud Platform for
further analysis.
62
• Configure Wire Components: In Figure A.6 to A.10, user interfaces to
configure different Wire Components are shown.
63
Figure A.8: Configure OPC-UA Asset
64
Figure A.10: Configure DB Filter
65
Appendix B
EclipseCON Germany 2016
In general, Kura Wires received a very positive feedback from the audience
and representatives of companies such as Bosch Software Innovations, Deutsche
Bahn, Porsche AG. They also expressed their willingness to collaborate in in-
tegration and further development of the framework. Due to the recent intro-
duction of Eclipse Kapua project, the integration of Eclipse Kapua with Kura
Wires was a topic of discussion. To give an overview, a possible integration
15
https://www.eclipsecon.org/europe2016/session/industry-40-eclipse-kura
66
with Eclipse Kapua platform would allow Industrial Engineer to create Wire
Graphs from remote location and deploy it remotely to the edge IoT gateways.
This integration is thoroughly discussed in Section 6.2 (Future Work).
67
List of Figures
68
LIST OF FIGURES
6.1 Industrial IoT Ecosystem with Eclipse Kura and Eclipse Kapua 59
69
Bibliography
[AH14] Mohammad Aazam and Eui-Nam Huh. Fog Computing and Smart
Gateway Based Communication for Cloud of Things. In Future Inter-
net of Things and Cloud (FiCloud), 2014 International Conference on.
IEEE, 2014.
[AHH14] Mohammad Aazam, Pham Phuoc Hung, and Eui-Nam Huh. Smart
Gateway Based Communication for Cloud of Things. In Intelligent
Sensors, Sensor Networks and Information Processing (ISSNIP), 2014
IEEE Ninth International Conference on. IEEE, 2014.
[AN10] Sarfraz Alam and Josef Noll. Enabling Sensor as Virtual Services
through Lightweight Sensor Description. In Sensor Technologies and
Applications (SENSORCOMM), 2010 Fourth International Conference
on. IEEE, 2010.
[BL14] Michael Blackstock and Rodger Lea. Toward a Distributed Data Flow
Platform for the Web of Things (Distributed Node-RED). In Proceed-
ings of the 5th International Workshop on Web of Things. ACM, 2014.
[DFK+ 02] Pavlin Dobrev, David Famolari, Christian G. Kurzke, and Brent A.
Miller. Device and service discovery in home networks with OSGi. In
IEEE Communications Magazine, IEEE, 2002.
[DXH+ 14] Li Da Xu, Wu He, and Shancang Li. Internet of Things in Industries:
A Survey. In IEEE Transactions on Industrial Informatics, IEEE, 2014.
[GBL+ 15] Nam Ky Giang, Michael Blackstock, Rodger Lea, and Victor C.M.
Leung. Developing IoT applications in the Fog: A Distributed Dataflow
approach. In Internet of Things (IOT), 2015 5th International Confer-
ence on the. IEEE, 2015.
70
BIBLIOGRAPHY
[GD11] Kiev Gama and Didier Donsez. Applying dependability aspects on top
of “aspectized” software layers. In Proceedings of the tenth international
conference on Aspect-oriented software development, AOSD’11, ACM,
2011.
[Gui09] Dominique Guinard. Towards the web of things: Web mashups for
embedded devices. In MEM 2009 in Proceedings of WWW 2009. ACM,
2009.
[LKR+ 06] Seungkeun Lee, Intae Kim, Kiwook Rim, and Jeonghyun Lee. Ser-
vice Mobility Manager for OSGi Framework In International Confer-
ence on Computational Science and Its Applications. Springer, 2006.
[LKY14] Jay Lee, Hung-An Kao, and Shanhu Yang. Service Innovation and
Smart Analytics for Industry 4.0 and Big Data Environment. Procedia
CIRP, 2014.
[LL06] Seungkeun Lee and Jeonghyun Lee. OSGi based service mobility man-
agement for pervasive computing environments. In Proceedings of the
24th IASTED International Conference on Internet and Multimedia
Systems and Applications, IMSA’06, ACTA Press, 2006.
[LNH03] Choonhwa Lee, David Nordstedt, and Sumi Helal. Enabling Smart
Spaces with OSGi. In IEEE Pervasive Computing, IEEE, 2003.
[PZC+ 13] Charith Perera, Arkady Zaslavsky, Peter Christen, and Dimitrios
Georgakopoulos. Context Aware Computing for The Internet of Things:
A Survey. In IEEE Communications Surveys & Tutorials, IEEE, 2013.
[UV05] Tarmo Uustalu and Varmo Vene. The Essence of Dataflow Program-
ming. In Central European Functional Programming School. Springer,
2005.
71