22. OSGi-based IoT gateway for the field devices.
OSGi
● modularity system for Java
● provides modules classpath separation
● promotes hot runtime redeployments
What is Eclipse Kura?
OSGi Application Container (Eclipse Equinox, Concierge)
Java SE 7 / 8 (OpenJDK)
23. What is Eclipse Kura?
IoT gateway
● collects messages from the edge devices (like sensors)
● performs messages processing/aggregation/forwarding
OSGi-based IoT gateway for the field devices.
OSGi Application Container (Eclipse Equinox, Concierge)
Java SE 7 / 8 (OpenJDK)
Networking Gateway Services Web UI Remote Management
24. What is Eclipse Kura?
IoT gateway
● collects messages from the edge devices (like sensors)
● performs messages processing/aggregation/forwarding
OSGi-based IoT gateway for the field devices.
OSGi Application Container (Eclipse Equinox, Concierge)
Java SE 7 / 8 (OpenJDK)
Serial GPIO HID BLE I2C Field protocols
Networking Gateway Services Web UI Remote Management
25. What is Eclipse Kura?
IoT gateway
● collects messages from the edge devices (like sensors)
● performs messages processing/aggregation/forwarding
OSGi-based IoT gateway for the field devices.
OSGi Application Container (Eclipse Equinox, Concierge)
Java SE 7 / 8 (OpenJDK)
Serial GPIO HID BLE I2C Field protocols
Networking Gateway Services Web UI Remote Management
Cloud Services Data Services EP
Connectivity and Delivery
26. What is Eclipse Kura?
OSGi-based IoT gateway for the field devices.
31. How to orchestrate messages flow.
What is message routing?
● Apache Camel
● Spring Integration
● Mule
32. - read message from JMS queue
- transform to JSON
- save to FTP and MongoDB
Crash course to the Apache Camel
from('jms:invoices').
transform { new Invoice(uuid(), it.in.body) }.
marshal().json(Jackson).
multicast().parallelProcessing().
to('ftp:myftp.com/invoices',
'mongodb:myDb?collection=invoices&operation=save')
]
43. Camel OSGi bundle is started from the Kura.
Kura + Camel: architecture
44. Invoke REST method every second.
Camel route module for Kura
public class MyKuraRouter extends KuraRouter {
@Override
public void configure() throws Exception {
from("timer:trigger").
to("netty4-http:http://app.mydatacenter.com/api");
}
}
45. Just deploy the route as the OSGi bundle and enjoy Camel running the Kura.
Concerned about the lifecycle?
46. Display WiFi networks accessible near the field device using the web
browser.
Fancy example #1
public class MyKuraRouter extends KuraRouter {
@Override
public void configure() throws Exception {
from("netty4-http:http://0.0.0.0:18080").
to("bean:org.eclipse.kura.net.NetworkService?method=getAllWifiAccessPoints");
}
}
47. Start syncing cached data only when WiFi is accessible.
Fancy example #2
public class MyKuraRouter extends KuraRouter {
@Override
public void configure() throws Exception {
from("kura-wifi:wlan0/mySSID").
to("controlbus:route?routeId=onlineSync&action=start");
from("file:///var/sensor/temperature").
routeId("onlineSync").autoStartup(false).
to("netty4-http://api.mydatacenter.com");
}
}