Professional Documents
Culture Documents
THINGS
Submitted by:
SOMYA SINGH
Supervisor:
DR. DIRK PESCH
Second Reader:
DR. JAMES DOHERT Y
September 1, 2020
Somya Singh: Evolution of Microservices In Internet Of things, MSc Computing
Science, © September 1, 2020
ii
Abstract
With the advent of Industry 4.0, the Internet of things has gained im-
mense popularity because of the features offered and seamless user ex-
perience. However, managing wired and wireless connections among
heterogeneous IoT devices has become a challenge due to various fac-
tors such as cost, size of generated data, lack of elasticity, and modularity.
Micro-services are UNIX like style patterns that encapsulate the concept
of modularization, emphasizing on technical boundaries. Every micro-
service operates as a small independent system and offers access to its
internal logic and data via network interfaces. Microservices resolve the
issues posed to IoT systems by building a large complex system with the
help of small, loosely coupled, scalable services working together in con-
cert. The presentation discusses the evolution of microservices in IoT, and
its successful implementation in various fields such as healthcare, trans-
portation, agriculture, housing, etc. Despite its benefits, implementing
microservices in IoT systems pose several challenges such as security of
applications deployed in the cloud, quality of services, and scheduling.
This presentation highlights these issues, their mitigation techniques, and
the future prospects of micro-services. Apart from all the advancements,
microservices still possess a few open issues leaving scope for improve-
ment.
Declaration
I confirm that, except where indicated through the proper use of citations and references,
this is my original work and that I have not submitted it for any other course or degree.
Signed:
Somya Singh
September 1, 2020
iii
Contents
Contents iv
List of Tables vi
1 Introduction 1
1.1 Research Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 Research objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1.2 Research methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
iv
Contents v
Bibliography 53
List of Tables
vi
List of Figures
3.1 Proposed IoT framework [L. Sun, Li, and Memon 2017] . . . . . . . . . . . 20
3.2 IoT model based on micro-services in Fog/Edge Computing level [BANICA,
RADULESCU, and STEFAN 2018] . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3 Web of Objects reference architecture . . . . . . . . . . . . . . . . . . . . . . 23
3.4 WoO enabled data driven micro-service based E-healthcare model [M. A.
Jarwar, S. Ali, and Chong 2018] . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.5 Beats Per minute architecture for Monitoring health related data [O’Brien,
and O’Reilly 2018] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.6 Architecture of DIMMER platform for smart city [Krylovskiy, Jahn, and Patti
2015] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.7 Architecture of InterScity platform [Del Esposte et al. 2017] . . . . . . . . . 29
3.8 Devices and their connection scheme in a Smart Building [Salikhov et al.
2016] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.9 Microservice based Layered Industrial Internet of things model [Jürgen
Dobaj et al. 2018b] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
vii
Contents viii
4.1 Interface between IoT devices and Microservices [Power, and Kotonya 2018] 40
4.2 Architecture of real-time fault tolerant microservice [Power, and Kotonya
2018] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.3 Architecture of predictive fault tolerant microservice [Power, and Kotonya
2018] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.4 Use Case Based On Interoperable Microservices for Ubiquitous IoT Ser-
vices [Muhammad Aslam Jarwar et al. 2017] . . . . . . . . . . . . . . . . . . 43
4.5 Interoperable Microservices within same domain and cross domain [Muham-
mad Aslam Jarwar et al. 2017] . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.6 Distributed Certificate-Based IoT Service Security [M. Pahl, and Donini
2018] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Introduction
With the advent of IoT and DevOps, the architecture and design principle on which
IoT systems depend on has become one of the driving factors for success and sustainabil-
ity of an organization [Why IoT Development Needs Microservices and Containerization
n.d.] An IoT application is a vast distributed ecosystem of user ended devices, sensors,
actuators, protocols with no single owner which makes integration of these heteroge-
nous components a big, costly challenge. Also, to maximize elasticity and resiliency,
the system requires independent services joined together in concert. Furthermore, to
process large quantities of data generated by IoT systems, a suitable architecture is
required that can do so with minimum overhead.
In a micro-service approach, the business logic is broken down into several small,
independent, loosely coupled micro-services which are cost effective, and easier to
manage. With the help of micro-services, an organization can scale up their application
into large systems easily. Thus, using micro-services approach in IoT systems, reduces
integration cost and dependence between components. To maintain a large IoT system
with seamless user experience, there is a constant need to upgrade servers, devices.
Microservices provide the features of continuous integration and deployment facilities.
Also, small changes are quick to apply in microservices as they are independent of each
other.
1.1 RESEARCH PROBLEMS 2
Using microservices in IoT systems has many advantages. Firstly, since every micro-
service can be written in a different language, IoT systems use containers to deploy these
services. This deployment process is fast, independent of each other and promotes fault
isolation. Containers help in resource management as they can be added and removed,
based on requirement. Secondly, as the system scales up, the number of connected
devices in an IoT system increases. To store this huge amount of data and services, cloud
technologies are used. Microservices provide horizontal and vertical scaling where an
individual service can scale up without affecting others. Thirdly developing IoT systems
is a costly endeavor, microservices reduces that infrastructure cost, maintenance cost
of code repository and containers facilitate proper resource utilization. Fourthly, IoT
systems intend to provide coherent experience to the user. Using microservices with
containers is an optimal solution to achieve fast, resilient, highly available, scale on
demand services.[Why IoT Development Needs Microservices and Containerization n.d.]
Scopus, Web of Science are selected.Searching the above mentioned string in these
four databases resulted in 700 publications, 242 Web Of Science,197 Acm, 439 Scopus,
182 IEEE.After removing the duplicates, the resultant articles were 646 . Finally, few
exclusion criteria’s are applied such as 1) "publications that are tutorial papers, editorials,
abstracts and extended abstracts, and proceeding papers are removed" 2) "publications
that are not available as full-text" [Campeanu 2018] resulting in 342 publications as
shown in fig 1.1 .
Chapter 2
2.1.1 Architecture
Internet of things architecture mainly consists of 5 layers Perception layer, Network
layer,Middleware layer,Application layer,Business layer as shown in Fig 2.2.
1. Perception layer: Perception layer or the device layer consists of physical devices
like sensors (RFID, infrared, Lora) and actuators. It deals with device management
and collection of information such as temperature, humidity, location etc. about
objects with the help of sensors. The collected information is then passed onto
the network layer for secure transmission.
2. Network Layer: Network layer transfers information between the sensor devices
and central processing system. Technologies used are 3G, 4G, WiFi, Bluetooth
etc.
2.1 INTERNET OF THINGS 7
4. Application Layer : This layer provides an interface between the user and IoT.
It offers global application management based on the results from middleware
layer for applications like smart homes, smart watches, retail, tourism etc.
5. Business Layer: Business layer manages the entire system, processes results of
the data received from the lower layers and creates models, graphs, charts etc. for
executives to make an informed decision about business schemes.
2.1.2 Applications
IoT can be deployed into a wide variety of application domains ranging from Health-
care, smart environment domain to transportation and logistics, personal and social
domain [Patra, and Rao 2016]. Smart homes gives the ability to remotely control various
aspects of the house like lighting, security, appliances etc. Theft prevention applica-
tions are installed in homes, that inform the owner via sms, or alert in case of possible
encroachment on the property. Smart pool sensor system, smart garages, sprinkler
system , smart grid etc. are few other applications of smart homes. Transportation
systems gives the user alternate routes in case of traffic to prevent congestion and acci-
dents. Smart parking systems tells the user all the available spaces without having to
move around the entire area. Geo fencing tracks the location of a vehicle which helps
transport companies to track their vehicles. Environment monitoring systems help
monitor unmanned locations like volcanic activities, earthquakes and flood prone areas
and generate precautionary warnings in case of a calamity. Smart machines equipped
with sensors to detect pressure, humidity, temperature are helpful in various industrial
activities like mining.
Smart technologies like asthma monitors, depression monitors, ingestible sensors,
cancer monitoring system CYCORE, insulin pens, have proven extremely beneficial
in healthcare domain [10 examples of the Internet of Things in healthcare â Econsul-
tancy n.d.] Wearable devices like Smart watches with inbuilt proximity, accelerometer,
gyroscope sensors monitor a person's bodily movement including pedometer, heart
rate, blood, temperature pressure, sleep pattern. Smart shelves in supermarkets have
replaced paper labels with electronic labels, where the prices can be changed through a
centrally located system. The user can also scan the label using RFID readers embedded
with sensors to tag a product. Temperature sensors in stores maintain the temperature
of the freezers and the store.
2.2 MONOLITHIC ARCHITECTURE 8
other as shown in fig 2.4. The main component in this structural design is formed
by services and rely heavily on it to perform business operations and functionalities.
SOA's are generally distributed in nature i.e., the services are accessed remotely through
remote access protocols like REST (Representational State Transfer), SOAP (Simple
Access Object Protocol), JMS (Java Messaging Service), RMI (remote method invocation).
SOA's are based on the principle of component sharing where each component has a
fixed set of roles and responsibilities and have 2 consideration types Service Request
and Service Response. Service Request defines the ability of a service to accept requests
or establish connections with remote services in a timely manner, whereas Services
Response describes the consumer's ability to receive a response from the service in an
acceptable duration of time. SOA's provide features like better scalability, decoupling,
greater control over development, testing, changes, deployment and modularity.
2.4 MicroServices
Micro-Services is a type of service oriented architectural style pattern where a product is
decomposed into small building blocks such that each block performs a single operation
as shown in Fig 2.5. These blocks are often referred to as services. These services are
small, independent and focused in nature, and work together in cohesion with each
other .The term Micro Web Services was first introduced by Dr Peter Rogers in 2005 at a
conference as a ’Unix like pipeline’ architecture, where he illustrated how microservices
2.4 MICROSERVICES 10
platform can be created by combining the architectural principles of web and REST
Api together with UNIX like scheduling. Later on in 2011, Jamie Lewis and Fred George
described microservices in detail during two separate technical workshops. Today,
this architectural approach has been adopted by several huge companies like Netflix,
Amazon, LinkedIn, SoundCloud etc.
1. Modelling around Business Domain: In a three tier architecture every layer has
a clear set of boundaries and Api's, but it often leads to issues where a change
in one layer causes tumbling effects in rest of the layers. As a result, every layer
had to be altered even for a small change by different teams. To avoid this issue,
microservice architecture layers the system vertically so that business changes
are well within the service boundaries and only specific business domain services
needed to be changed. Every service contains its own three tier architecture. Mod-
elling a service around the business domain helps technical and non-technical
individuals to understand the system better. In addition to this, grouping services
that provide similar functionalities prove beneficial since the code is easier to
locate and fix. The teams working on these services have greater control on every
tier, instead of just one, broadening their technical skills.
2. Fast and Fault Tolerant: Changes to the services can be made easily and quickly as
compared to monolithic architecture and changes in one service does not impact
the working or require changes in other services. It is based on the concept of fault
isolation where a fault or bug in one service doesn't not disrupt other services.
4. Security:
In a traditional system, security is provided as an outer layer to the entire sys-
tem, however in a microservice architecture every individual service or group of
services can have a security feature. This adds an extra layer of protection.
monolithic where there is one code base throughout the system and refactoring
it is difficult. The choice of technology depends upon the developer's comfort.
7. Easier Data Management: Most of the services have their own databases, thus
making it decentralized with effective data management capabilities.
2. No Short-term benefits: Services after deployment can take a long time to reap
benefits as it takes a significant amount of time to design, create and deploy a
service as it is a slow process. Initial investment in terms of effort is also large.
4. Monitoring issues:
In a monolithic system it is often easier to locate the problem site because of a
single code base, however, often in a micro-services architecture comprising of
100 or more services, exploring the area of issue can be difficult. Moreover, the
bigger the ecosystem of services harder it is to manage.
SOA’S but with limited and focused functionality as shown in fig 2.9. [Microservices vs
Service-Oriented Architecture (SOA): Fundamental Differences n.d.] per service. Services
in SAO can be large or small depending upon the requirements and are based on share as-
much-as-possible approach, whereas MSA follows share as-little-as-possible-approach.
Table 2.2lays out difference between both these architectural patterns.[Microservices vs
SOA: What’s the Difference? - DZone Microservices n.d.]
Figure 3.1: Proposed IoT framework [L. Sun, Li, and Memon 2017]
• Core Service : Core service is the central service which regulates and administers
all other services. It loads several tenant engines which performs most of the
processing logic in the system. The core service provides asynchronous commu-
nication (via ActivemQ) of the object nodes between microservices and external
components.
• Device Service : It manages and assigns device plugins based on the device's
hardware specification and meta data. It communicates with low level hardware
to collect data from sensors and passes it to actuators for execution.
• BigData Service : It provides different persistence types like MongoDB for docu-
ment storage , REDIS for photo data storage to store data .It adds new storage im-
3.2 FOG/EDGE COMPUTING 21
• Artificial Intelligence Service : This service is based on IoT big data and provide AI
tools like machine learning, data mining etc.
3.1.1 Discussion
• Physical layer : This layer contains sensors, actuators, data captors, collection de-
vices that accumulate data from the environment, detection devices that identify
the presence of other IoT devices.
• Network layer. This layer facilitates communication and data transfer between
the nodes.
• Fog/Edge Layer: This layer stores, computes and analyses, the data received from
network layer. Computing the data involves filtering it according to a specific
criterion, data formatting, and decryption. Micro-services are embedded in
the fog/Edge nodes and are accessible by all other IoT devices in the system
via standard Api's over HTTP. Th end users indirectly communicate with these
micro-services through Api gateways, that route user request to these services,
3.2 FOG/EDGE COMPUTING 22
and receives a desired response from it. This Api gateway performs several other
operations like User authentication, load balancing, SSL connections.
• Cloud Layer: This layers provides various services including data mining, data
analytics, storage service to backup received data into databases, and analyze
them to predict the future state of devices.
3.2.1 Discussion
Fog computing bring the cloud services closer to IoT devices by reducing the distance
between them for analysis of data .It also acts as a secondary data storage apart from
3.3 E-HEALTHCARE 23
cloud.Both the architecture used fog and edge nodes to its advantage.Offloading micro-
services from edge to fog node allows elasticity in the application in case edge node
becomes overloaded.in comparison to cloud environment, fog computing reduces
network traffic and latency, thus increasing response time.However, this also leads to
issues such as task scheduling and resource management.For instance, if the fog node
is overloaded, the mobility of microservices from fog to cloud during execution is also
impacted.
3.3 E-healthcare
Depression is a form of mental illness that affects a person's state of mind, well-being
,persistent sadness, and can lead to serious consequences like suicide. According to
WHO, depression affects more than 264 million people all over the world and 800000
people die due to suicide.[Depression n.d.] 70-80% people in low income countries
receive no treatment due to lack of resources, lack of healthcare providers, inaccurate
assessment. Today IoT based E-healthcare applications make use of wearable and non-
wearable IoT devices to gauge an individual's mental well-being by collecting everyday
data and analyse it to provide assistance to the patient, by connecting the patient to
the psychiatric. However, the data received from various IoT devices including wear-
ables, sensors, electronically saved medication history ,emotional quotient collected
via social network services etc, is not semantically interoperable. This makes it difficult
to accurately accumulate , analyse , and assess it. To achieve this semantic interoper-
ability, Jarwar et al [M. A. Jarwar, S. Ali, and Chong 2018] suggest a IoT system that uses
WoO(Web of Objects) enabled data driven microservices as shown in fig 3.3 and fig 3.4.
WoO is a three layered architecture.
• VO(virtual object) layer collects data from real world objects like sensors, actua-
tors and pass it in to the CVO layer.
3.3 E-HEALTHCARE 24
• CVO(Composite virtual object) layer processes the data received from the VO
layer.This data is then used by microservices.
• Service layer provides amenities to end user applications based on the knowledge
provided by the micro-services.
Figure 3.4: WoO enabled data driven micro-service based E-healthcare model
[M. A. Jarwar, S. Ali, and Chong 2018]
With the help of machine learning models, these microservices, exchange, share and
translate and format data into a uniformly understandable form for accurate processing.
Firstly micro-services are placed at the virtual object level to make the physical devices
interoperable by communicating over vendor specific API'S and data formats. Every
object has a separate service which can be used to read data from sensors or send
commands to actuators. Additionally, they are also placed at the CVO layer to supply
processed data to the service layer. Every microservice has one or more CVO data to
enable reusability and modularity.[M. A. Jarwar, S. Ali, and Chong 2018] These services
contain the logic in the form of microcode, and provide user customized e healthcare
services.The application system is divided into two parts and hosted on two servers.
First server is responsible for collecting and processing information from the user using
machine learning and data mining techniques while the second server is responsible
for providing services to the user using WoO architecture.
Contrary to the Web of Objects based architecture 'Brien et al [O’Brien, and O’Reilly
2018] discusses a microservice based monitoring framework Beats Per Minute(BPM)
that process data from activity trackers to analyse a user’s heart rate and symptoms of
heart related diseases.Activity trackers are very useful in gathering everyday user data
3.3 E-HEALTHCARE 25
such as heart rate, steps per day, calories burnt,blood pressure, respiration etc.Real time
data from sensors is collected for diagnostic purposes. BPM application is used by two
types of users 1) Clients whose heart rate data is collected and 2) administrator : users
who are doctors or admins that utilise this information for analysis. This application
stores historical data of users and helps in accurate analysis with the large amount if
data available.Any type of heart related ailment can be detected ,prevented and cured
at an earlier stage.The messages are encoded via SOAP and sent over HTTP. The fig 3.5
shows a BPM model comprising of 4 services:
Figure 3.5: Beats Per minute architecture for Monitoring health related data
[O’Brien, and O’Reilly 2018]
• Data Service :This service is responsible for polling data from the activity trackers,
as well as converting the data into a compatible format.This service has access to
the database.
• Viewer Service : This service displays heart rate visuals in the form of charts in the
browser using the data from the dataservice.
• Alert Service : This service generates alerts in the form of emails or SMS when a
user’s heart rate exceeds a certain threshold.
Similar to the above mentioned framework, Richard Hill et al. also describes a
health care application based on microservices.Wearable biosensors monitor patients
heart rate, blood pressure, glucose level as well as environment sensing features such as
occupancy and pressure in a room.Secondly, computational hardware can be embed-
ded in the patients home using FPGA(field programmable gate arrays) for monitoring,
3.4 SMART CITY 26
collecting and processing of personal health data.This stream of continuos data stored
in elastic cloud services and used by authorised personnel only.[Hill, Shadija, and Rezai
2017]
3.3.1 Discussion
The first application monitors user’s real time feelings, emotions at home, office, through
social media tweets, wearable devices, facial expressions. This data proves helpful in
precise depression diagnosis. This information is stored as user’s history which can
be utilised later for diagnostic purposes. Web of Objects (WoO) architecture is useful
for providing web based IoT services to the user.[Yu et al. 2018] This model makes the
system interoperable, adaptable, and intelligent. It resolves the issue of collecting data
from several heterogeneous sources.Whereas, the second model also monitors user’s
heart rate and stores the data for diagnostic purposes in cloud based services.This
application also leverages cloud infrastructure for scaling the framework as the user
base grows.
However the first architecture does not address the security and privacy concerns
related to user data. It lacks security enabling micro-services to handle information
collected from the user’s via cars, home, wearable devices. Also, data hosted in the
cloud can be susceptible to attacks. Thirdly, since every object has a separate service,
the number of services required are more. Using two separate servers for storage and
services requires additional overhead of maintaining the servers.In contrast , the second
model faces issues due to the number of calls permitted for every activity tracker.For
instance Fit Bit allows 150 calls per hour , as a result of which data can be collected every
24 secs only.In addition to that, the time taken by the activity tracker to sync the data in
its data store and then be polled by the BPM is large, thus defeating the purpose of real
time data collection.
information from the sensor systems and process the data for further analysis. The top-
most layer represents smart city applications like desktop, laptop, mobile applications
that are used by system administrators, common citizens, energy professionals,and
even third party organisations for their internal purpose.
Figure 3.6: Architecture of DIMMER platform for smart city [Krylovskiy, Jahn,
and Patti 2015]
Service Platform: The service platform acts as an integration between IoT devices
and ICT system(hardware, software, communication technology, data).It is divided into
two types of micro-services :
• MiddleWare Service :This service accesses real time sensor data via standard API’s
and protocols, models an abstraction between real world IoT devices and sensors,
help applications search and discover these devices for resource utilization.Every
service has its own data store to manage IoT devices meta-data efficiently.An
IoT data gateway that acts as an interface between the services and applications,
which distributes consumer requests to appropriate platform services and returns
the response to consumers conveniently.in Few micro-services in middleware
are as follows:
• Smart City Services :They enforce the core functionality of the DIMMER platform
and are built on top of IoT middleware.Some of the micro-services are as follows :
Contrary to DIMMER platform , Esposte et al. [Del Esposte et al. 2017] describe an
open source micro-service based smarty city platform InterSCity, that aims at being
modular, high quality, scalable middleware infrastructure that can be re- used across
cities by government and companies.It uses open source technologies and methods to
support future smart city platforms.New devices are added to the system via IoT gateway
and the sensors communicate with each other over Rest API.The framework contains 6
microservices as shown in fig 3.7 namely,
• Resource Adapter :service is for integrating IoT devices.It allows IoT gateways to
register and update resources on the platform.
• Resource Catalog, Data Collector, Actuator Controller : These services are used
for data and resource management.Resource Catalog registers and assigns all the
city resources with a unique identifier and notifies other services about it.Data
Collector stores sensor data such as linked event , context information etc. gath-
ered by the city resources. Actuator collector service is used for auditing purpose
and store all actuation request made by the city resources.
3.4.1 Discussion
Smart cities have becomes extremely necessary and pervasive over the last few years due
to the flexible architecture it provides which can be altered as per the evolving customer
3.5 SMART BUILDING 29
needs [Badii et al. 2019].They are designed to fulfil functional and non functional re-
quirements of its citizens.Both the models encapsulate all the necessary functionalities
that a smart city has to offer in a very robust and transparent manner.Use of microser-
vices resolve interoperability issues and a need for standardised deployment strategy
across all cities.Real time services can be quickly availed by consumers through their
mobile phones, which is a bonus.
Apart from the advantages the first model lacks a centralized monitoring system to
monitor proper functioning of each application.Also, the architecture leave open issues
of scalability and performance.The second InterScity model however, talks about open
source technologies that are used in the platform to prevent vendor lock in and promote
interoperability.This helps to scale the model in future.The first architecture uses only
rest API’s for communication whereas the second also uses asynchronous messaging
system which prevents blocking of synchronous request and reply interactions.Thirdly,
with the large amount of data that is generated per city there is no provision for cloud
data storage facilities in first model whereas the second model uses cloud based services
to store IoT resources and hosts the platform in a cloud infrastructure.
battery powers are also readily available.It is easy to provide a wide area network on
these platforms due to increase of network technologies.All these factors lead to the
development of smart buildings that use underlying IoT technologies which can evolve
over time according to changing consumer needs. [Salikhov et al. 2016] describes a
Intranet of things based Smart building that uses micro-services as its underlying ar-
chitecture.This system uses Jolie programming language for developing micro-services
as they can be reused, orchestrated and combined with other services.Since a single
platform communicates with all the sensor devices, it generates huge amounts of data.
To handle the data in large quantities, Could computing resources are used to reduce
computational pressure on the system. As shown in fig 3.8 sensors and raspberry pie
are configured and connected via Bluetooth technology to detect temperature, pressure
, luminosity, humidity.A door sensor is also incorporated to detect human presence at
the entry and exit points of the premises.Services developed in Jolie are reused by sev-
eral sensors for connectivity, data retrieval and other processing The data(temperature,
humidity, pressure) collected from these sensor Tags is parsed and stored along with
outdoor temperature data gathered from Internet in a file. The data generated from
the door sensors is cross referenced with the web camera at the door for corrobora-
tion.Presence of a person is also verified using mac address of their smart watches which
tells the total number of people in the building at any given point of time.
Figure 3.8: Devices and their connection scheme in a Smart Building [Salikhov
et al. 2016]
3.6 INDUSTRIAL INTERNET OF THINGS 31
3.5.1 Discussion
Using Jolie as the programming language for developing microservices has its own
benefits.It creates blocks of software as services instead of functions or objects, which
can be relocated and reused as required. One of the main selling points of micro-
services is its reusability and orthogonality and Jolie provides both these features in its
design.Smart Housing society’s are a product of innovation in IoT. It provides security,
energy efficiency, flexibility to the consumers. Using Bluetooth low energy (BLE)for
measuring lighting, temperature and pressure overcomes the drawbacks of Zigbee and
Wifi. Bluetooth is a low power radio technology that is present in almost every smart
phone available in the market today, unlike Zigbee which requires an additional dongle
or gateway to connect.BLE controlled devices are easy to setup and are cost effective.
Aside from the advantages , this smart building architecture does not address secu-
rity concerns related to cloud data management, and data transfer between sensors and
the cloud. Moreover, this architecture depends upon mac address of smart watches to
verify the presence of a person inside the building which is an added requirement of
wearing a smart watch while entering and leaving the building.
• Domain Specific Service(DSS)) Layer :It is the topmost layer that provides services
and device limited functionalities to the system based on different domains.Data
Specific Service(DSS) encapsulates the services offered by this layer from low
level functionalities implemented by lower layers, thereby reducing complexity
and facilitating reusability of micro-services.The number of services(DSS’S) on
this layer depends on domain specific requirements of a system and multiple
DSS’s can execute simultaneously on a device.[Jürgen Dobaj et al. 2018b]
• Distributed Global Data Space(DGDS):This layer routes entire system data across
sensors, fog, cloud devices, subsystems etc.It also acts as an abstraction for
network and hardware details to facilitate interoperability among heterogeneous
devices in the top layers,
On the other Hand, Rufino et al [Rufino et al. 2017] describes an IIoT architecture
using containerised micro-services.Unlike the previous framework, this model uses
Docker, an open source platform, used by developers to build ,share and execute their
distributed applications.Docker helps in scaling the architecture while containerisation
promotes service isolation .Micro-services are divided into smaller services and spread
throughout the system to achieve modularization and decentralization.Every service
is embedded in a docker container as shown in fig 3.10 and run independently.The
architecture is divided into three layers.
• Sensing layer : This layer communicates and senses outside physical systems and
end users.The data collected from this monitoring process is stored in a gateway
which forms the second layer.Services stored in containers can be deployed and
scaled up on demand.
3.6 INDUSTRIAL INTERNET OF THINGS 33
• Mediation Layer :The gateway acts as a mediator for communication between the
other two layers and is used for data processing and data analytics. The gateway
acts as fog computing paradigm and reduces the gap between the nodes and
cloud resources .It hiss three microservices namely, SDN controller, database,
machine learning unit.The controller is responsible for controlling the networked
devices, facilitating communication between them.[Rufino et al. 2017] The ma-
chine learning unit provides intelligence to the gateway to resolve real time
requirements.It communicates with the controller adn distributed database for
analytical purpose.
• Enterprise layer :This layer performs CPU intensive services like data mining, data
treatment, data modelling, behaviour analysis etc.Enterprise systems act as main
management and control entities.
3.6.1 Discussion
The demand for industrial internet of things applications is growing with the increase
in IoT technologies. However, this has also led to technology fragmentation as sev-
eral providers have come up with their own IoT technologies, sensors etc each work-
ing on a different communication model.This heterogeneity leads to interoperability
issues within the IIoT systems as explained in section 4.2.1.The first model success-
fully resolves interoperability issue via services hosted in the distributed global data
space(DGDS).Secondly, since data and information flows seamlessly through each lay-
ers for processing and storage, QoS and data consistency is maintained throughout the
system instead of being constrained at each level separately.However, this model does
not specify the types of micro services used and their data storage capabilities.Similarly,
the second architecture uses Docker as a virtualization technique simplifies manage-
ment and promotes distributed deployment. Interoperability is achieved via REST
protocols and distributed database as the gateway. However data consistency remains a
challenge since all the micro -services share a database.
3.7 TRANSPORTATION 34
3.7 Transportation
Explosion of IoT systems have resulted in inventions in the connected car domain.Micro
services when used in conjunction with IoT systems integrate heterogeneous sensors
and vehicular communication technologies for data annotation and local data pro-
cessing using edge servers. [Datta et al. 2018] depicts an architecture of a connected
car using micro-services as shown in fig 3.11 . A connected car is an IoT resource that
provides functionalities such as cellular connection , efficient emission management,
real time data collection using IoT platforms.The framework consists of micro-services ,
an edge server, WOT based things repository, Restful API’s etc.
Figure 3.11: Functional IoT Architecture for micro-service based connected cars
[Datta et al. 2018]
• Connected Car : The system includes one connected car, containing a vehicular
onboarding unit(OBU) that embeds vehicular intelligence in the car .A Thing
Descriptor(TD) connects the car to an IoT system which shows events, processes
available to sensors and actuators.Interoperability between car services is main-
tained using W3C Web of Things initiative.
Edge Server : An edge server is used for vehicular data validation, processing, actu-
ation and exchange with cloud services.It includes two interfaces for V2X(Vehicle
to everything) and cloud communication.V2X is a car communication system
used for autonomous driving where information from sensors and actuators is
sent using high bandwidth and low latency[What is V2X communication? Creat-
ing connectivity for the autonomous car era | ZDNet n.d.]The edge server gathers
heterogeneous data from the sensors and performs annotations based on infor-
mation like timestamp, type of sensor,operation domain etc.For instance, it uses
3.7 TRANSPORTATION 35
temperature and humidity sensor information and makes the server turn on fog
lamp of the car in case of foggy weather.
Cloud based micro-services The services use HTTPS to exchange encrypted data(AES)
with the edge server and connected car .The secure provisioning service uses
JSON Web Token for authentication and authorization of data.Sensors,actuators
and Things Descriptor are first registered with the Thing Repository and then
securely stored in the cloud.Separate services are used for semantic reasoning
on vehicular data for trajectory mining and tourism recommendation system
[Datta et al. 2018] These micro-services hosted in the cloud use containers for
deployment and support scalability, modularity, virtualization in the cloud.
Cloud And Control Things Application : This android application is available
to the user for monitoring and visualizing TD services and data of a connected
car.The services include experiment submission and report generation as shown
in fig 3.12 .
Figure 3.12: Functional elements of Cloud Based Car Services [Datta et al. 2018]
3.7.1 Discussion
The architecture highlights efficient use of micro services to integrate heterogeneous
components together,solving the issue of interoperability.Use of micro services make the
application scalable with the ability to seamlessly add new services such as positioning
service for geo location.Connected cars are means for ’vehicle to Internet’ and ’vehicle
to vehicle’ communication.These interactions help to combat several transportation
issues such has heavy traffic, vehicle safety, and congestion.Vehicle to Vehicle (V2V)
3.8 OSMOTIC COMPUTING 36
and gateway nodes.These devices collect raw data , encrypt the incoming data stream ,
encode the transactions and send it to the L1 layer for further analysis.The devices at
L2 are resource constrained and work on low power, limited network etc. that perform
operations without exploiting available resources.General purpose microservices ,net-
work management services , security management services are utilised by both layers
for efficient resource and service sharing.The network management service helps in
setting up virtual networks in a federated cloud/edge environment, whereas microser-
vices offering security management help in their cross platform development.These
microservices are deployed in virtual containers to reduce deployment overhead.
3.8.1 Discussion
The symbiosis of IoT,edge and microservices is a revolutionary concept that balances
load distribution between cloud and edge resources.It divides tasks into macro and
micro services and assign them an infrastructure for faster computation.However, this
architecture does not describe resource scheduling which is crucial for managing a wide
array of microservices [Maksimović 2018].Secondly, QoS metrics are not available in the
system to gauge the performance of the application.Thirdly,the model lacks a standard
security policy required for execution and deployment of micro-services within cloud
data centers and edge servers.
Chapter 4
• Fault Avoidance : Avoid the introduction of errors in the design and program-
ming phase.
• Fault tolerance: design the system such that it can detect and recover from faults
itself.
it. IoT systems are continuously evolving to handle new services, features that were
not present int he original design. A monolithic IoT system, is unable to handle these
changes and scale up after a certain threshold. However, microservices serve as an ideal
design approach for IoT systems as they are fault tolerant and promote fault isolation.
New services can be independently deployed without affecting the original design.
4.1.2 Mitigation
Alexander Power et al. [Power, and Kotonya 2018]proposed a micro-service based fault
tolerant framework that provides real time predictive fault tolerance (FT) support for IoT
systems. The system continuously performs health check with the help of micro-services
that examine the state of the system, data , detect and resolve errors. Based on this
assessment, fault patterns are established so that next time in a similar circumstance,
the system is aware of the type of error that has occurred. In some cases, the system
can evaluate the state even before the error occurs. The proposed framework contains
four microservices integrated together out of which two service render fault tolerance
support. The first service uses complex event processing for reactive FT to supply
real time data stream and the second services uses machine learning for proactive
FT. Reactive fault tolerance is a situation where error recovery takes place after it is
detected whereas in proactive fault tolerance error recovery is initiated before an error is
discovered. These services communicate with each other using REST interface because
of its advantages in cloud support. The data is exchanged using JSON. The Web Interface
APi describes three categories which the microservices utilize.
• events: they describe the events that occur in the IoT system. For instance,
/events/error/detect is an interface where errors are posted and /events/error/
assessment is an interface where they are calculated.
After registering itself with a service broker, micro-services subscribe their topics of
interest (properties, events, actions). Other microservices send data to these subscribers.
Fig 4.1 depicts four microservices and their interaction with IoT devices :
• Edge: This service helps IoT devices to transfer their properties such as name
,type, unit, source address, timestamp, value to other parts of the system .It acts
as an entry point between microservice and IoT devices and sends all its data to
microservices that have subscribed to it. It also performs operations internally
that are sent by IoT devices.
• DB: It is a back-end database that receives and stores information for the micro-
services to subscribe to it.
4.1 FAULT TOLERANCE AND FAULT ISOLATION 40
• Real Time FT :This micro-service shown in fig 4.2 is situated between the edge
and DB service and only allows properties into the DB service after they pass
through Real time FT engine. The engine verifies these properties for errors sends
it further to a CEP system, where they are analyzed and checked for new errors.
CEP system intelligently preforms error recovery by verifying a cluster of errors
together. For instance, in case of 6 IoT devices failure, the system checks for the
faulty gateway, rather than the devices. [Power, and Kotonya 2018]
• Predictive FT: The service shown in fig 4.3 captures the continuous data that flows
within the systems and analyses it for faults by constantly checking the state of the
system and other surrounding factors. Fault predictions are made with this data
using an Online Learning approach which approach monitors the continuous
4.2 INTEROPERABILITY 41
stream of data and discards it after it is done. The result of this analysis is again
fed in to a Learner which trains the algorithm to identify new errors, learn how
the system handles it ,evaluate how effective is this error recovery .Using this
knowledge fault patterns are generated which acts as a guide in case of errors in
the future.
4.2 Interoperability
4.2.1 Challenges
IoT technologies have revolutionized machine to machine interactions in the field of
manufacturing, agriculture, industrial, personal ,transportation, commerce. Due to
its advantages and increased demand significant development of new technologies
and devices, API’s have taken place in the last few years. However, every new technol-
ogy has a closed ecosystem with vendor specific infrastructure, platform dependent
API’s, incompatible data formats etc forcing the consumer to avail services offered by a
single provider only[Noura, Atiquzzaman, and Gaedke 2019].The services offered by a
single provider may not fully cater to the consumer’s need, or are incompatible to the
user’s environment resulting in high operational costs, poor features and a unsatisfied
customer. Interoperability is "The ability of two or more systems or components to
exchange information and to use the information that has been exchanged " [“IEEE
Standard Glossary of Software Engineering Terminology” 1990].Various factors lead-
ing to interoperability issues in IoT applications are : Security: Security is one of the
key features of IoT applications. Using multiple heterogeneous devices increases the
4.2 INTEROPERABILITY 42
Interoperability Description
Device interoperability ability to integrate new de-
vices in IoT systems. commu-
nication between heteroge-
nous devices and protocols
Network interoperability handle routing, QoS, re-
source utilization, address-
ing, mobility support [Bello,
Zeadally, and Badra 2017]
Syntactical interoperability interoperability between
data format, data structure
of exchanged information
Semantic interoperability exchange of meaningful and
understandable information
Platform interoperability integration and exchange of
data between different IoT
platforms
domain has a third party platform. Every domain has its own server and a "translating
and formatting" server is used for cross domain platform. When a user moves from
one location to another in the first three domain, if any service feature is unavailable in
a server, it sends a request to use CVO/VO of another domain via microservices .The
microservice transfers data to the requesting data where another set of microservices
are used to process and understand the received information. In case a WoO domain
communicates with third party domain, a translating and formatting server analyses
the request, converts the semantic ontology from one domain to other domain’s under-
standable form with the help of microservices as shown in fig.4.5.[Muhammad Aslam
Jarwar et al. 2017]
Figure 4.4: Use Case Based On Interoperable Microservices for Ubiquitous IoT
Services [Muhammad Aslam Jarwar et al. 2017]
Figure 4.5: Interoperable Microservices within same domain and cross domain
[Muhammad Aslam Jarwar et al. 2017]
4.3 SECURITY 44
4.3 Security
4.3.1 Challenges
With the increase in demand for IoT devices, security concerns around it has also
magnified. IoT systems are vulnerable to four types of attacks including communication
attack, lifecycle attack, software attack and physical attack as mentioned in table 4.2
[What is IoT Security â Arm n.d.]Also, IoT systems are enforce access policies, which
heavily rely on the developer for its creation .[M.-O. Pahl, Aubet, and Liebald 2018]
IoT applications provide personalized services that access private sensor data, and
actuator data.Thus security of these services needs to be maintained by addressing
three challenges - authenticity, integrity, and accountability.Authentication verifies that
the service belongs to a particular developer, or store or an IoT site.Integrity defines the
consistency and accuracy of data, while accountability relates to responsibility.
• Controller: The controller coordinates tasks for measuring MQoS. The table below
shows various mQoS attributes .
5.2.2 Mitigation
To mitigate the above-mentioned security threats, traffic monitors are used. Marc-Oliver
Pahl et al [M.-O. Pahl, Aubet, and Liebald 2018] proposes a graph based communication
model as shown in fig 5.2 . that shows communication between microservices. Every
IoT node, routers, switches have a monitor, which is independent from the developers
of micro-services. The monitors intercept every communication between the services
and perform a deep packet inspection (DPI). During this inspection, all communicating
services are identified and stored as vertices ,and the communication relationship
between them is stored as edges in the model. Ever node maintains its own graph and
anomaly detection occurs for every monitor. As IoT systems are constantly evolving, its
topology changes leading to dynamic management complexity. Thus, every time new
IoT device are added or removed, graph is updated. Site managers can visually see these
graphs and detect suspicious behaviour among microservices.
Another approach to mitigate security issues in microservice based Cloud IoT sys-
tem is using Software defined network (SDN) capabilities offered by clouds. SDNs
monitor complex network interactions and enforce policies on these networks. It pas-
sively monitors network packets flowing through and decides if it has to be distributed
further based on application requirements. This helps in attack situations where the
data packets are routed through a different path in case SDNs sense a compromise.
Security monitors placed inside their own VM's and are known as security VM's. They
are isolated from application VM's, to monitor the network events and change easily
according to application needs. Security monitors perform several functions such as
1)logging all internal and external network events like messages, HTTP request/response
.2) It protects its public facing microservices, or other specific services like privilege
escalation detection for Database. 3)It passively monitors the network, or sometimes
redirects the data for honey pot analysis.
Despite the several benefits offered by micro-services in IoT, there are still open chal-
lenges that have not been addressed.Few of them are listed below :
6.0.2 Granularity
Another challenge is designing the right size of microservices.Although micro-services
should be as small as possible, every development team interprets it differently Some
teams use micro-services with few LOC(lines of code), others encapsulate classes and
databases in them.
tinuously monitored and managed.Also, the services can be deployed across multiple
geographic regions and zones which generate huge amount of data such as ’states’ and
’behaviour’.Collecting and monitoring this information is overwhelming for develop-
ers,resulting in untimely management decisions.
Additionally, it becomes challenging to generate an alert threshold notifying the de-
veloper in case of issues without overloading them with redundant information.[Jamshidi
et al. 2018]
This literature review aimed at discussing the role of micro-services in Internet of Things.
Specific approaches have been embraced to address the research problems via reviewed
service architectures, use cases, and its bottlenecks. It lays down SOA, monolithic
and microservice architectures in detail. Despite being a new style of development, it
has eliminated the challenges of SOA and the monolithic style of design. The review
also highlights interoperability, security, and fault tolerance issues in developing large,
complex IoT systems, along with their mitigation techniques. In addition to this, the
thesis discusses open challenges in implementing these micro-services.
However, this review has some limitations. It doe snot cover some frameworks of
micro-services that are more metaphysical, without any scope for future implemen-
tations. This study focussed on prominent issues of performance and, security with
limited interest in suggesting mitigation techniques for other open challenges as it was
cost-ineffective and required deep analysis.
Microservices encapsulates the best practices for designing innovative, resilient,
scalable applications. It is responsive to changing requirements and follows incremental
learning by doing approach. This technique limits the impact of failure during design
and run time. Using micro-services in IoT will build momentum towards service-based
IoT systems [Bringing the power of microservices to IoT - Wipro n.d.] . Future of this
approach lies in the potential of reuse of assets for consumption. It can be viewed as
a server-less and " function as a service" architecture, focussing on decentralization.
In the future, it can be used for data analytics and data science via intelligence-driven
services. Future studies will focus on improving service discovery, load routing, shared
library, service to service communication features.
Bibliography
communication-creating-connectivity-for-the-autonomous-car-
era/. (Accessed on 08/31/2020).
Why IoT Development Needs Microservices and Containerization [n.d.] https://
www.einfochips.com/blog/why-iot-development-needs-microservices-
and-containerization/. (Accessed on 08/31/2020).
Yu, Jaehak et al. [Sept. 2018]. “WISE: Web of Object Architecture on IoT Environ-
ment for Smart Home and Building Energy Management”. In: J. Supercomput.
74.9, 4403â4418. ISSN: 0920-8542. DOI: 10.1007/s11227- 016- 1921- 6.
URL : https://doi.org/10.1007/s11227-016-1921-6.