SlideShare a Scribd company logo
© 2019 – The symbIoTe Consortium
Building IoT Middleware with Microservices
Mario Kušek, University of Zagreb, FER
Javantura v6, 23 Feb 2019, Zagreb
Grant Agreement No 688156
© 2019 – The symbIoTe Consortium2
Who am I?
@MarioKusek
mario.kusek@fer.hr
University of Zagreb
Faculty of Electrical Engineering and Computing
Department of Telecommunications
IoT Laboratory
© 2019 – The symbIoTe Consortium3
• What is a ”thing”?
– Object from physical world (physical object with
build in sensors and/or actuators) or virtual object
– Internet Connected Object (ICO)
• Has unique identifier and is connected to the Internet
• Communicates and generate data (reading from
environment)
• Can receive data/commands from network
• Can execute commands – actuate (electrical or
mechanical)
• Can receive data from other ICO, process them and
send for processing to cloud
Internet of Things - IoT
© 2019 – The symbIoTe Consortium4
• IoT platforms integrate „things” and continuously
acquire data
– Large distributed system
– Processing large amount of data (often in real time)
– Integrates and saves data from different sources
– For application developers offer:
• Searching for things (sensors/actuators)
• Access to data
• There are more then 400 platforms
– Mostly specialised for one area
How to integrate „things” and provide user applications?
© 2019 – The symbIoTe Consortium5
Architecture of IoT System
User
IoT
Platform
Gateway
IoT
Application
Smart spaceCloudUser
© 2019 – The symbIoTe Consortium6
• Can not easily create cross domain applications!
• Interoperability:
– Data structures are different
– Different measurement units
– Vertical domain specific platforms
• Project: symbIoTe
– Symbiosis of smart objects across IoT environments
– H2020 project: 2016-2018 (3 years)
– 15 EU partners (universities, institutes, SMEs)
Some Challenges
© 2019 – The symbIoTe Consortium7
The symbIoTe approach
Core Services
IoT
Platform A
IoT
Platform B
AdaptorAdaptor
Domain
Enabler
Application
Adaptor
IoT
Platform A
IoT
Platform C
Adaptor
Adaptor
IoT
Platform D
Adaptor
IoT
Platform B
Adaptor
Application
Agent
IoT
Gateway A
IoT
Gateway B Smart
Device
Smart Space Gateway
Agent Agent
L1
L2
L3L4
roaming
Smart Space A
Core Services
Smart Device
Smart Space B
Smart Space GatewaySmart Space Gateway
Smart Device
© 2019 – The symbIoTe Consortium8
• Development
– Agile process (iterations) – planned 4 week releases
– Weekly meetings of all developers (video conference)
– One or two weeks for internal component releases
– Programming language is Java
– Unit testing: >70% code coverage
• Tools:
– Attlasian Jira as the feature planning tool
– github.com as code repository tool
– Git as versioning and code revisioning tool
– Travis CI as Continuous Integration server
Project organisation
© 2019 – The symbIoTe Consortium9
High-level Architecture
© 2019 – The symbIoTe Consortium10
Putting it all together: L1 compliance
Components for
semantic and
syntactic
interoperability +
security
© 2019 – The symbIoTe Consortium11
• Each component is one microservice
– Has a component owner
– One microservice – mostly implemented by one
organisation
– One repository
• Frameworks:
– SpringBoot, Spring Cloud
– Communication between microservices:
RabbitMQ
Microservices – Decisions
© 2019 – The symbIoTe Consortium12
• Spring Cloud Config – configuration
• Zipkin – distributed tracing system
• Spring Cloud Gateway – did not exist then
– We used NGINX
• Spring Cloud Netflix:
– Eureka – service registration
– Ribbon – REST client that uses Eureka
– Feign – declarative HTTP client
• For accessing core services
Spring Cloud
© 2019 – The symbIoTe Consortium13
• Microservices were not divided by domains
• Frequent changing of messages
– Hard integration testing, lots of communication
between teams
• RabbitMQ
– Most of communication is request/response
• Design not appropriate for messaging
– No message (API) versioning
– Late arrival of Spring Cloud Contract (v1.0.0 Sep
2016)
• Not so good support for messages (documentation and
examples)
Problems
© 2019 – The symbIoTe Consortium14
• Lots of microservices need to implement the
same data objects:
– Put data objects in library: SymbIoTeLibraries
• Put all libraries in Jitpack (https://jitpack.io)
• Problems with versions of library:
– Start using semantic versioning (https://semver.org)
• All components need to contact AAM
(Authentication Authorization Manager)
component
– Created SymbIoTeSecurity library
• SymbIoTeLibraries has dependency to it
Problems/decisions
© 2019 – The symbIoTe Consortium15
• Each IoT platform needs to deploy cloud
components
– No automatic deployment
• 3 stages/ways of deployment:
– 1. From sources:
• Support web page (github wiki)
• Problems:
– Complex  automatization
– Slow  automatization
– Hard to configure  configuration generator (web page
similar to https://start.spring.io)
Deployment (1)
© 2019 – The symbIoTe Consortium16
• 2. From jars:
– Created a script for downloading, configuring,
starting and stopping
– Problems:
• Microservices have startup dependencies
– Solved by putting small class in main method to wait for some
service (host:port)
• If it doesn’t work first time you need to dive into details
– Similar to SpringBoot
• Bash script - problem on windows if someone just want
to try it
Deployment (2)
© 2019 – The symbIoTe Consortium17
• 3. From dockers
– Easy startup
– Starting with docker-compose or docker swarm
– Config git repo is in docker image
• Problem of custom configuration
– Putting config in volume
– Different documentation for using docker directly
(linux) or in docker machine
• Problems with port mapping
Deployment (3)
© 2019 – The symbIoTe Consortium18
• For testing, hackathons you run components
on machine that is in local network
• Cloud components need to have public IP,
DNS, and certificate (for https)
– Workaround is ngrok tunnelling
• Different NGINX configuration
Cloud components on dev machine
© 2019 – The symbIoTe Consortium19
Memory Consumption – Problem
• 1.5GB on startup
• 2-3GB when working
• Future work:
– Java 11: new GC, String internals, netty, ACDS, …
– Problem: late release of SpringBoot 2.1 (Oct 2018)
and Spring Cloud (Greenwich)(Jan 2019)
© 2019 – The symbIoTe Consortium20
• Distributed teams require lots of
communication
• Be careful in choosing technologies
• Divide features to microservices that are
independent and scalable (up/down)
• Versioning of API is important
• Dedicate time for building/testing automation
– Do it in the beginning of the project and maintain
Conclusions
© 2019 – The symbIoTe Consortium
www.symbiote-h2020.eu
middleware.symbiote-h2020.eu
info@symbiote-h2020.eu
@symbiote_h2020
H2020 symbIoTe
github.com/symbiote-h2020
Member of
Thank you!
Questions?
@MarioKusek
mario.kusek@fer.hr

More Related Content

What's hot (7)

PPTX
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Christian Posta
 
PDF
Vlad Trifa - Final PhD Thesis Defense at ETH Zurich
Vlad Trifa
 
PDF
An open-source testbed for IoT systems
Augusto Ciuffoletti
 
PDF
Web of Things Book Launch
Vlad Trifa
 
PPTX
microXchg 2018: "What is a Service Mesh? Do I Need One When Developing 'Cloud...
Daniel Bryant
 
PPTX
O'Reilly 2017: "Introduction to Service Meshes"
Daniel Bryant
 
PDF
DevSecCon Singapore 2019: Preventative Security for Kubernetes
DevSecCon
 
Leveraging Envoy Proxy and GraphQL to Lower the Risk of Monolith to Microserv...
Christian Posta
 
Vlad Trifa - Final PhD Thesis Defense at ETH Zurich
Vlad Trifa
 
An open-source testbed for IoT systems
Augusto Ciuffoletti
 
Web of Things Book Launch
Vlad Trifa
 
microXchg 2018: "What is a Service Mesh? Do I Need One When Developing 'Cloud...
Daniel Bryant
 
O'Reilly 2017: "Introduction to Service Meshes"
Daniel Bryant
 
DevSecCon Singapore 2019: Preventative Security for Kubernetes
DevSecCon
 

Similar to Building IoT Middleware with Microservices (20)

PPTX
Webinar on 1st Open Call - slideset
symbiote-h2020
 
PDF
The Internet of Things - IBM
Diego Alberto Tamayo
 
PPTX
Webinar on 2nd Open Call - Platforms - slideset
symbiote-h2020
 
PDF
IoT_Projects_in_FLOSS_Foundations.pdf
Wlamir Molinari
 
PPTX
symbIoTe - AIOTI Open Day @ NDC, 08 Feb 2016, Athens, Greece
symbiote-h2020
 
PDF
Dynamic IoT data, protocol, and middleware interoperability with resource sli...
Hong-Linh Truong
 
PPTX
Webinar- Internet of Things: Application Frameworks in IoT
Harbinger Systems - HRTech Builder of Choice
 
PDF
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
Param Singh
 
PPTX
symbIoTe - IoT Week Belgrade, 02 Jun 2016, Belgrade, Serbia
symbiote-h2020
 
PDF
IoT Platforms Interoperability and the symbIoTe Vision
symbiote-h2020
 
PPT
IBM Open Cloud Update XCITE Fall 2014
Christopher Ferris
 
PDF
Distributed Development of IoT Middleware with Microservices
Mario Kušek
 
PDF
Into The Box 2018 CI Deep Dive
Ortus Solutions, Corp
 
PDF
Wearables and IoT Strategy
AllSeen Alliance
 
PPTX
Towards the Cross-Domain Interoperability of IoT Platforms - EuCNC, 30 Jun 20...
symbiote-h2020
 
PDF
Paasta: Application Delivery at Yelp
C4Media
 
PDF
Walking through the fog (computing) - Keynote talk at Italian Networking Work...
FBK CREATE-NET
 
PDF
FIWARE Tech Summit - FIWARE-based Smart City Platforms
FIWARE
 
PDF
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
Kai Wähner
 
PPTX
Internet of Things Interoperability Challenges - SpliTech, 14 Jul 2016, Split...
symbiote-h2020
 
Webinar on 1st Open Call - slideset
symbiote-h2020
 
The Internet of Things - IBM
Diego Alberto Tamayo
 
Webinar on 2nd Open Call - Platforms - slideset
symbiote-h2020
 
IoT_Projects_in_FLOSS_Foundations.pdf
Wlamir Molinari
 
symbIoTe - AIOTI Open Day @ NDC, 08 Feb 2016, Athens, Greece
symbiote-h2020
 
Dynamic IoT data, protocol, and middleware interoperability with resource sli...
Hong-Linh Truong
 
Webinar- Internet of Things: Application Frameworks in IoT
Harbinger Systems - HRTech Builder of Choice
 
IoTWorld 2016 OSS Keynote Param Singh, Ian Skerrett
Param Singh
 
symbIoTe - IoT Week Belgrade, 02 Jun 2016, Belgrade, Serbia
symbiote-h2020
 
IoT Platforms Interoperability and the symbIoTe Vision
symbiote-h2020
 
IBM Open Cloud Update XCITE Fall 2014
Christopher Ferris
 
Distributed Development of IoT Middleware with Microservices
Mario Kušek
 
Into The Box 2018 CI Deep Dive
Ortus Solutions, Corp
 
Wearables and IoT Strategy
AllSeen Alliance
 
Towards the Cross-Domain Interoperability of IoT Platforms - EuCNC, 30 Jun 20...
symbiote-h2020
 
Paasta: Application Delivery at Yelp
C4Media
 
Walking through the fog (computing) - Keynote talk at Italian Networking Work...
FBK CREATE-NET
 
FIWARE Tech Summit - FIWARE-based Smart City Platforms
FIWARE
 
IoT Open Source Integration Comparison (Kura, Node-RED, Flogo, Apache Nifi, S...
Kai Wähner
 
Internet of Things Interoperability Challenges - SpliTech, 14 Jul 2016, Split...
symbiote-h2020
 
Ad

Recently uploaded (20)

PPTX
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PPTX
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
PPTX
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PDF
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PPTX
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
PPTX
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
PPTX
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PPTX
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Agentic Automation Journey Session 1/5: Context Grounding and Autopilot for E...
klpathrudu
 
Import Data Form Excel to Tally Services
Tally xperts
 
Equipment Management Software BIS Safety UK.pptx
BIS Safety Software
 
Comprehensive Guide: Shoviv Exchange to Office 365 Migration Tool 2025
Shoviv Software
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Streamline Contractor Lifecycle- TECH EHS Solution
TECH EHS Solution
 
Human Resources Information System (HRIS)
Amity University, Patna
 
3uTools Full Crack Free Version Download [Latest] 2025
muhammadgurbazkhan
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Safe Software
 
How Apagen Empowered an EPC Company with Engineering ERP Software
SatishKumar2651
 
MailsDaddy Outlook OST to PST converter.pptx
abhishekdutt366
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
Feb 2021 Cohesity first pitch presentation.pptx
enginsayin1
 
Executive Business Intelligence Dashboards
vandeslie24
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Fundamentals_of_Microservices_Architecture.pptx
MuhammadUzair504018
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Ad

Building IoT Middleware with Microservices

  • 1. © 2019 – The symbIoTe Consortium Building IoT Middleware with Microservices Mario Kušek, University of Zagreb, FER Javantura v6, 23 Feb 2019, Zagreb Grant Agreement No 688156
  • 2. © 2019 – The symbIoTe Consortium2 Who am I? @MarioKusek [email protected] University of Zagreb Faculty of Electrical Engineering and Computing Department of Telecommunications IoT Laboratory
  • 3. © 2019 – The symbIoTe Consortium3 • What is a ”thing”? – Object from physical world (physical object with build in sensors and/or actuators) or virtual object – Internet Connected Object (ICO) • Has unique identifier and is connected to the Internet • Communicates and generate data (reading from environment) • Can receive data/commands from network • Can execute commands – actuate (electrical or mechanical) • Can receive data from other ICO, process them and send for processing to cloud Internet of Things - IoT
  • 4. © 2019 – The symbIoTe Consortium4 • IoT platforms integrate „things” and continuously acquire data – Large distributed system – Processing large amount of data (often in real time) – Integrates and saves data from different sources – For application developers offer: • Searching for things (sensors/actuators) • Access to data • There are more then 400 platforms – Mostly specialised for one area How to integrate „things” and provide user applications?
  • 5. © 2019 – The symbIoTe Consortium5 Architecture of IoT System User IoT Platform Gateway IoT Application Smart spaceCloudUser
  • 6. © 2019 – The symbIoTe Consortium6 • Can not easily create cross domain applications! • Interoperability: – Data structures are different – Different measurement units – Vertical domain specific platforms • Project: symbIoTe – Symbiosis of smart objects across IoT environments – H2020 project: 2016-2018 (3 years) – 15 EU partners (universities, institutes, SMEs) Some Challenges
  • 7. © 2019 – The symbIoTe Consortium7 The symbIoTe approach Core Services IoT Platform A IoT Platform B AdaptorAdaptor Domain Enabler Application Adaptor IoT Platform A IoT Platform C Adaptor Adaptor IoT Platform D Adaptor IoT Platform B Adaptor Application Agent IoT Gateway A IoT Gateway B Smart Device Smart Space Gateway Agent Agent L1 L2 L3L4 roaming Smart Space A Core Services Smart Device Smart Space B Smart Space GatewaySmart Space Gateway Smart Device
  • 8. © 2019 – The symbIoTe Consortium8 • Development – Agile process (iterations) – planned 4 week releases – Weekly meetings of all developers (video conference) – One or two weeks for internal component releases – Programming language is Java – Unit testing: >70% code coverage • Tools: – Attlasian Jira as the feature planning tool – github.com as code repository tool – Git as versioning and code revisioning tool – Travis CI as Continuous Integration server Project organisation
  • 9. © 2019 – The symbIoTe Consortium9 High-level Architecture
  • 10. © 2019 – The symbIoTe Consortium10 Putting it all together: L1 compliance Components for semantic and syntactic interoperability + security
  • 11. © 2019 – The symbIoTe Consortium11 • Each component is one microservice – Has a component owner – One microservice – mostly implemented by one organisation – One repository • Frameworks: – SpringBoot, Spring Cloud – Communication between microservices: RabbitMQ Microservices – Decisions
  • 12. © 2019 – The symbIoTe Consortium12 • Spring Cloud Config – configuration • Zipkin – distributed tracing system • Spring Cloud Gateway – did not exist then – We used NGINX • Spring Cloud Netflix: – Eureka – service registration – Ribbon – REST client that uses Eureka – Feign – declarative HTTP client • For accessing core services Spring Cloud
  • 13. © 2019 – The symbIoTe Consortium13 • Microservices were not divided by domains • Frequent changing of messages – Hard integration testing, lots of communication between teams • RabbitMQ – Most of communication is request/response • Design not appropriate for messaging – No message (API) versioning – Late arrival of Spring Cloud Contract (v1.0.0 Sep 2016) • Not so good support for messages (documentation and examples) Problems
  • 14. © 2019 – The symbIoTe Consortium14 • Lots of microservices need to implement the same data objects: – Put data objects in library: SymbIoTeLibraries • Put all libraries in Jitpack (https://jitpack.io) • Problems with versions of library: – Start using semantic versioning (https://semver.org) • All components need to contact AAM (Authentication Authorization Manager) component – Created SymbIoTeSecurity library • SymbIoTeLibraries has dependency to it Problems/decisions
  • 15. © 2019 – The symbIoTe Consortium15 • Each IoT platform needs to deploy cloud components – No automatic deployment • 3 stages/ways of deployment: – 1. From sources: • Support web page (github wiki) • Problems: – Complex  automatization – Slow  automatization – Hard to configure  configuration generator (web page similar to https://start.spring.io) Deployment (1)
  • 16. © 2019 – The symbIoTe Consortium16 • 2. From jars: – Created a script for downloading, configuring, starting and stopping – Problems: • Microservices have startup dependencies – Solved by putting small class in main method to wait for some service (host:port) • If it doesn’t work first time you need to dive into details – Similar to SpringBoot • Bash script - problem on windows if someone just want to try it Deployment (2)
  • 17. © 2019 – The symbIoTe Consortium17 • 3. From dockers – Easy startup – Starting with docker-compose or docker swarm – Config git repo is in docker image • Problem of custom configuration – Putting config in volume – Different documentation for using docker directly (linux) or in docker machine • Problems with port mapping Deployment (3)
  • 18. © 2019 – The symbIoTe Consortium18 • For testing, hackathons you run components on machine that is in local network • Cloud components need to have public IP, DNS, and certificate (for https) – Workaround is ngrok tunnelling • Different NGINX configuration Cloud components on dev machine
  • 19. © 2019 – The symbIoTe Consortium19 Memory Consumption – Problem • 1.5GB on startup • 2-3GB when working • Future work: – Java 11: new GC, String internals, netty, ACDS, … – Problem: late release of SpringBoot 2.1 (Oct 2018) and Spring Cloud (Greenwich)(Jan 2019)
  • 20. © 2019 – The symbIoTe Consortium20 • Distributed teams require lots of communication • Be careful in choosing technologies • Divide features to microservices that are independent and scalable (up/down) • Versioning of API is important • Dedicate time for building/testing automation – Do it in the beginning of the project and maintain Conclusions
  • 21. © 2019 – The symbIoTe Consortium www.symbiote-h2020.eu middleware.symbiote-h2020.eu [email protected] @symbiote_h2020 H2020 symbIoTe github.com/symbiote-h2020 Member of Thank you! Questions? @MarioKusek [email protected]