SlideShare a Scribd company logo
Prototyping IoT systems with a
hybrid OSGi/Node-RED platform
Bruce Jackson - CTO
Thingstream.io
The problem
• OSGi is a widely used platform in IoT edge devices
‣ supported by multiple device vendors
‣ many reliable components have been developed for integration into
northbound (enterprise) and southbound protocols/devices/etc
‣ not easy to rapidly prototype without writing code
‣ runs on the JVM
• Node-red is a ‘code free’ programming environment for IoT that is very
popular for prototyping
‣ easy and quick
‣ many components for common southbound protocols/devices/etc
‣ based on Node.js (V8 + Javascript)
OSGi vs Node-red
How to combine these two different solutions?
• Both systems have their advantages, but use very different technologies
• However - there was a possible solution:
‣ J2V8 - an Eclipsesource project that: “We developed ... as a high performance
engine for our multi-platform mobile toolkit tabris.js and it is a great choice for
executing JavaScript on Android devices”
• An initial test showed that it was possible to use J2V8 to create and run
the Node-red environment from Java
‣ turning that into an OSGi bundle wasn’t hard
‣ for our purposes, additional V8 runtime and native bindings needed
‣ bridging code and interfaces to map OSGi components onto the Node-red
lifecycle required
How does J2V8 work?
Export and import values
between domains:
• Objects, values
Register and call functions
across domains:
• callback functions from Java to
Javascript
• execute functions defined in
Javascript
Mapping service interfaces to Node-red
To allow OSGi components to appear as Node-red nodes, they need to
implement a suitable lifecycle service interface - NodeComponent:
public void onCreate(String nodeId, JsonNode config);
public void onClose(String nodeId);
public JsonNode[] onMessage(String nodeId, JsonNode msg);
Note also the use of Jackson classes to transfer Javascript objects between
domains
Demonstration
• A simple node component
‣ 1 in and 1 out
‣ simple configuration for all instances
• A more complex example using Paho MQTT client
‣ wrapping an existing library in a NodeComponent
‣ multiple configurations
‣ message creation
Can this work the other way around?
• This example shows how OSGi services can be exported into a javascript
runtime and work together
‣ although the Javascript runtime is created via OSGi, Node-red is “the boss”
‣ OSGi components play into the Node-red world
• Can this work in reverse - with Javascript components in the OSGi world?
• Javascript components for OSGi
‣ modularise Javascript runtime as a service (so you can implement via J2V8 or
GraalVM)
‣ create component pattern for Javascript
Demonstration
• A simple component model for Javascript components in the OSGi world
• Javascript component registry
‣ JS components managed via a registry bundle that creates dynamic proxies
over the service interface(s) they implement
‣ marshalls calls between environments
‣ exports OSGi services to the Javascript runtime through reflective call creation
on Javascript objects
‣ processes bundle metadata
References and contacts
OSGi: https://www.osgi.org/
Node-red: https://nodered.org/
J2V8: https://github.com/eclipsesource/J2V8
Node-red-osgi: https://github.com/brucej72/node-red-osgi
Bruce Jackson: bruce.jackson@thingstream.io

More Related Content

PDF
The Self-Service Developer - GOTOCon CPH
Laszlo Fogas
 
PDF
Jee conf 2015
Maciek Próchniak
 
PDF
DevOps@Mobi
Philipp Grossenbacher
 
PDF
From Java Monolith to k8s with CI/CD
Mauricio (Salaboy) Salatino
 
PPTX
The State of CI/CD Tooling in 2019
CloudOps2005
 
PPTX
Hyperledger composer (from zero to hero )
EmanHerawy
 
PDF
Cf news april june 2017
Hristo Iliev
 
PDF
Paris Container Day 2016 : Deep dive dc-os ci-cd (Mesosphere & Container Solu...
Publicis Sapient Engineering
 
The Self-Service Developer - GOTOCon CPH
Laszlo Fogas
 
Jee conf 2015
Maciek Próchniak
 
From Java Monolith to k8s with CI/CD
Mauricio (Salaboy) Salatino
 
The State of CI/CD Tooling in 2019
CloudOps2005
 
Hyperledger composer (from zero to hero )
EmanHerawy
 
Cf news april june 2017
Hristo Iliev
 
Paris Container Day 2016 : Deep dive dc-os ci-cd (Mesosphere & Container Solu...
Publicis Sapient Engineering
 

What's hot (20)

PPTX
JS digest. February 2017
ElifTech
 
PPTX
Node.js Test
Maksym Kovalko
 
PDF
Cloud-Native: A New Ecosystem for Putting Containers into Production
Gordon Haff
 
PPTX
JS digest. January 2017
ElifTech
 
PDF
Making Service Deployments to AWS a breeze with Nova
Gregor Heine
 
PDF
Angular2 - A story from the trenches
Johannes Rudolph
 
PPTX
Instant developer onboarding with self contained repositories
Yshay Yaacobi
 
PDF
Wordpress develompent with Docker
Koombea
 
PDF
Promise of DevOps
Juraj Hantak
 
PDF
Kafka Streams
Cristiano Altmann
 
PDF
AllTheTalks 2020: Buildpacks - container for everyone!
Zander Mackie
 
PDF
Introduction to Node.js
Setyo Nugroho
 
PDF
Paris Container Day 2016 : Cloud de conteneurs, conteneurs dans le cloud, str...
Publicis Sapient Engineering
 
PPTX
Android kotlin coroutines
Bipin Vayalu
 
PPTX
Part 3 Docker Concepts - Kitematic
Biswajit De
 
PDF
Kotlin Coroutines and Android sitting in a tree
Kai Koenig
 
PDF
11th Docker Switzerland User Group Meetup
Philipp Grossenbacher
 
PPTX
Lyon Studytrip - Microservices in Docker & Kubernetes
Wouter Devinck
 
PPTX
20131028 BTUG.be - BizTalk Deployment
BTUGbe
 
PDF
Docker basic on azure
Philip Zheng
 
JS digest. February 2017
ElifTech
 
Node.js Test
Maksym Kovalko
 
Cloud-Native: A New Ecosystem for Putting Containers into Production
Gordon Haff
 
JS digest. January 2017
ElifTech
 
Making Service Deployments to AWS a breeze with Nova
Gregor Heine
 
Angular2 - A story from the trenches
Johannes Rudolph
 
Instant developer onboarding with self contained repositories
Yshay Yaacobi
 
Wordpress develompent with Docker
Koombea
 
Promise of DevOps
Juraj Hantak
 
Kafka Streams
Cristiano Altmann
 
AllTheTalks 2020: Buildpacks - container for everyone!
Zander Mackie
 
Introduction to Node.js
Setyo Nugroho
 
Paris Container Day 2016 : Cloud de conteneurs, conteneurs dans le cloud, str...
Publicis Sapient Engineering
 
Android kotlin coroutines
Bipin Vayalu
 
Part 3 Docker Concepts - Kitematic
Biswajit De
 
Kotlin Coroutines and Android sitting in a tree
Kai Koenig
 
11th Docker Switzerland User Group Meetup
Philipp Grossenbacher
 
Lyon Studytrip - Microservices in Docker & Kubernetes
Wouter Devinck
 
20131028 BTUG.be - BizTalk Deployment
BTUGbe
 
Docker basic on azure
Philip Zheng
 
Ad

Similar to Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackson (Myriad) (20)

PDF
IoT Node-Red Presentation
The IOT Academy
 
PDF
Hands on-intro to Node-RED
Pooja Mistry
 
PDF
Using Node-RED for building IoT workflows
Aniruddha Chakrabarti
 
PDF
Real-World, Open Source, End-to-End JavaScript in IoT
All Things Open
 
PDF
Node.js as an IOT Bridge
Eduardo Pelegri-Llopart
 
PPTX
IAB3948 Wiring the internet of things with Node-RED
PeterNiblett
 
PDF
Node.js, toy or power tool?
Ovidiu Dimulescu
 
PPTX
Node-RED
DavidGhedalia
 
PDF
20 Most Helpful Node.JS Open Source Projects.pdf
iDataScientists
 
KEY
Dcjq node.js presentation
async_io
 
PDF
Building Killer RESTful APIs with NodeJs
Srdjan Strbanovic
 
PDF
Building a server platform with os gi
Dileepa Jayakody
 
KEY
Node.js
Ian Oxley
 
PPT
The future of server side JavaScript
Oleg Podsechin
 
PDF
Node red & IoT - IEDC Hardware Club, April 8th 2016
Sebin Benjamin
 
PDF
An OSGi based platform supporting industry 4.0 applications for SMEs - H Korn...
mfrancis
 
PDF
The Happy Path: Migration Strategies for Node.js
Nicholas Jansma
 
PPT
OSGi and JavaScript - Simon Kaegi
mfrancis
 
PDF
Node.js Web Development .pdf
Abanti Aazmin
 
PPTX
Node Interactive : 7 years, 7 design patterns, will node continue to outshine
Shubhra Kar
 
IoT Node-Red Presentation
The IOT Academy
 
Hands on-intro to Node-RED
Pooja Mistry
 
Using Node-RED for building IoT workflows
Aniruddha Chakrabarti
 
Real-World, Open Source, End-to-End JavaScript in IoT
All Things Open
 
Node.js as an IOT Bridge
Eduardo Pelegri-Llopart
 
IAB3948 Wiring the internet of things with Node-RED
PeterNiblett
 
Node.js, toy or power tool?
Ovidiu Dimulescu
 
Node-RED
DavidGhedalia
 
20 Most Helpful Node.JS Open Source Projects.pdf
iDataScientists
 
Dcjq node.js presentation
async_io
 
Building Killer RESTful APIs with NodeJs
Srdjan Strbanovic
 
Building a server platform with os gi
Dileepa Jayakody
 
Node.js
Ian Oxley
 
The future of server side JavaScript
Oleg Podsechin
 
Node red & IoT - IEDC Hardware Club, April 8th 2016
Sebin Benjamin
 
An OSGi based platform supporting industry 4.0 applications for SMEs - H Korn...
mfrancis
 
The Happy Path: Migration Strategies for Node.js
Nicholas Jansma
 
OSGi and JavaScript - Simon Kaegi
mfrancis
 
Node.js Web Development .pdf
Abanti Aazmin
 
Node Interactive : 7 years, 7 design patterns, will node continue to outshine
Shubhra Kar
 
Ad

More from mfrancis (20)

PDF
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
mfrancis
 
PDF
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
PDF
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
mfrancis
 
PDF
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
mfrancis
 
PDF
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis
 
PDF
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis
 
PDF
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
mfrancis
 
PDF
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis
 
PDF
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
PDF
OSGi CDI Integration Specification - Ray Augé (Liferay)
mfrancis
 
PDF
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
PDF
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
PDF
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
mfrancis
 
PDF
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
mfrancis
 
PDF
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
mfrancis
 
PDF
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
mfrancis
 
PDF
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
mfrancis
 
PDF
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
mfrancis
 
PDF
How to connect your OSGi application - Dirk Fauth (Bosch)
mfrancis
 
PDF
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
mfrancis
 
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
mfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
mfrancis
 
Visualization of OSGi based Software Architectures in Virtual Reality - Lisa ...
mfrancis
 

Recently uploaded (20)

PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Software Development Methodologies in 2025
KodekX
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Software Development Methodologies in 2025
KodekX
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
The Future of Artificial Intelligence (AI)
Mukul
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 

Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackson (Myriad)

  • 1. Prototyping IoT systems with a hybrid OSGi/Node-RED platform Bruce Jackson - CTO Thingstream.io
  • 2. The problem • OSGi is a widely used platform in IoT edge devices ‣ supported by multiple device vendors ‣ many reliable components have been developed for integration into northbound (enterprise) and southbound protocols/devices/etc ‣ not easy to rapidly prototype without writing code ‣ runs on the JVM • Node-red is a ‘code free’ programming environment for IoT that is very popular for prototyping ‣ easy and quick ‣ many components for common southbound protocols/devices/etc ‣ based on Node.js (V8 + Javascript)
  • 4. How to combine these two different solutions? • Both systems have their advantages, but use very different technologies • However - there was a possible solution: ‣ J2V8 - an Eclipsesource project that: “We developed ... as a high performance engine for our multi-platform mobile toolkit tabris.js and it is a great choice for executing JavaScript on Android devices” • An initial test showed that it was possible to use J2V8 to create and run the Node-red environment from Java ‣ turning that into an OSGi bundle wasn’t hard ‣ for our purposes, additional V8 runtime and native bindings needed ‣ bridging code and interfaces to map OSGi components onto the Node-red lifecycle required
  • 5. How does J2V8 work? Export and import values between domains: • Objects, values Register and call functions across domains: • callback functions from Java to Javascript • execute functions defined in Javascript
  • 6. Mapping service interfaces to Node-red To allow OSGi components to appear as Node-red nodes, they need to implement a suitable lifecycle service interface - NodeComponent: public void onCreate(String nodeId, JsonNode config); public void onClose(String nodeId); public JsonNode[] onMessage(String nodeId, JsonNode msg); Note also the use of Jackson classes to transfer Javascript objects between domains
  • 7. Demonstration • A simple node component ‣ 1 in and 1 out ‣ simple configuration for all instances • A more complex example using Paho MQTT client ‣ wrapping an existing library in a NodeComponent ‣ multiple configurations ‣ message creation
  • 8. Can this work the other way around? • This example shows how OSGi services can be exported into a javascript runtime and work together ‣ although the Javascript runtime is created via OSGi, Node-red is “the boss” ‣ OSGi components play into the Node-red world • Can this work in reverse - with Javascript components in the OSGi world? • Javascript components for OSGi ‣ modularise Javascript runtime as a service (so you can implement via J2V8 or GraalVM) ‣ create component pattern for Javascript
  • 9. Demonstration • A simple component model for Javascript components in the OSGi world • Javascript component registry ‣ JS components managed via a registry bundle that creates dynamic proxies over the service interface(s) they implement ‣ marshalls calls between environments ‣ exports OSGi services to the Javascript runtime through reflective call creation on Javascript objects ‣ processes bundle metadata
  • 10. References and contacts OSGi: https://www.osgi.org/ Node-red: https://nodered.org/ J2V8: https://github.com/eclipsesource/J2V8 Node-red-osgi: https://github.com/brucej72/node-red-osgi Bruce Jackson: [email protected]