Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Building the
Internet of Things
with Eclipse IoT*
Benjamin Cabé – Eclipse Foundation
@kartben
Coding Serbia - Oct 9, 2015
...
● 19 open-source projects*
● Lots of Java but also C,
C++, Python, Go, .Net, …
* and counting!
→ IoT Standards
→ Services ...
End-to-end IoT?
End-to-end IoT?
End-to-end IoT?
End-to-end IoT?
What you will learn today
CONNECT
What you will learn today
CONNECT MANAGE
What you will learn today
VISUALIZECONNECT MANAGE
Connecting things to the IoT?
Network is often not reliable
Bandwidth == $$$
Different communication patterns
● CoAP
○ « HTTP over UDP »
○ Expose your device as a resource to the Internet of
Things
● MQTT
○ Publish/Subscribe model
○...
CoAP: The web-of-things
/walk
/hand/left/raise
/eye/picture
/on
/red
/green
/blue
/mtbf
/on
/on
/buttons
/buttons/1/push
/...
Eclipse Californium
● Focus on scalability and usability
● To be used in IoT cloud servers or M2M/IoT
devices running Java...
Californium 101
oapSe e , oapResou e, oapEx han e
1. Implement custom resources
(extend oapResou e)
2. Add resources to th...
import static org.eclipse.californium.core.coap.CoAP.ResponseCode.*;
public class MyResource extends CoapResource {
@Overr...
MQTT: Publish & Subscribe
Sub
KETTLE232/#Pub
KETTLE232/temp
Payload:
21°C
Pub
KETTLE232/temp
Payload:
21°C
BROKER
MQTT in 5 keywords
Pub-Sub
Wildcards
Quality of Service
Last Will & Testament
Retained Messages
Eclipse Paho
● Open-source MQTT clients
● Pick your language!
○ Java
○ JavaScript
○ C/C++, Objective C
○ Go, Lua, Python, ...
MqttClient c = new MqttClient("tcp://m2m.eclipse.org:1883",
MqttClient.generateClientId());
mqttClient.setCallback(new Mqt...
Open source MQTT brokers
● Eclipse Mosquitto
○ C implementation
○ Pretty scalable (1000 clients == 3MB RAM)
● But also…
○ ...
Oh, and by the way…
Amazon just announced support for MQTT in its
new AWS IOT cloud platform
VISUALIZECONNECT MANAGE
✔
VISUALIZECONNECT MANAGE
✔ ???
Yup, lots of aspects to manage
● Network
→ PPP cellular connection, WiFi hotspot, Zigbee
coordination, VPN, firewall …
→ o...
Gateways to the rescue!
Gateway
Gateway
Java VM
OSGi Application Container
Device Abstraction
Gateway Basic Services
Network Configuration
Network Management Fiel...
Installing Kura
cd ~
sudo apt-get update
wget https://s3.amazonaws.com/kura_downloads/raspbian/release/ 
1.2.2/kura_1.2.2_...
First steps with Kura
● Network management
○ Cellular Modem, WiFi
○ Firewall
○ NAT
● OSGi and system administration
● IoT ...
First steps with Kura
First steps with Kura
First steps with Kura
First steps with Kura
First steps with Kura
First steps with Kura
First steps with Kura
First steps with Kura
Kura API
● OSGi services that you can re-use in your own
components
○ o Se e
○ Da aSe e, oudSe e
○ p oSe e (AES, base64, S...
VISUALIZECONNECT MANAGE
✔ ✔
End-user interaction
● JavaFX Charts
● Eclipse BIRT
● Smartphone app (e.g Android)
○ https://www.eclipse.org/paho/clients/...
MQTT + WebSockets
var client = new Paho.MQTT.Client("ws://iot.eclipse.org/ws",
"client-" + new Date().getTime());
client.o...
DEMO!
Data Analytics for IoT?
Apache Spark Streaming
● Stream processing in Java, Python & Scala
● Built-in connectors for Kafka, Twitter,
ZeroMQ, Flume...
DEMO!
VISUALIZECONNECT MANAGE
✔ ✔ ✔
Eclipse IoT is also…
Industrial IoT
● Open source implementations of IEC standards
● Eclipse SCADA, 4DIAC, Rise V2G, ...
Eclipse IoT is also...
Device Management
● LwM2M is an Open Mobile Alliance Standard
● Device Management on top of CoAP
● ...
Eclipse IoT is also...
Secured Service Discovery
● Eclipse Tiaki
● Leveraging DNS-SEC and DNS-SD for
retrieving a device c...
Eclipse IoT is also…
● Flexible Framework
● Based on Java and OSGi
● Huge number of “bindings”:
KNX, Nest, Philips HUE, …
Kura is awesome!
Go download it now!
http://eclipse.org/kura
If you had to remember only 3 things...
#1
Build your own greenhouse &
follow the tutorial
http://iot.eclipse.org/java/tutorial
If you had to remember only 3 things....
Eclipse IoT is much more than
Kura and Java!
http://iot.eclipse.org/
If you had to remember only 3 things...
#3
Get Involved!
● Open bugs / fix bugs
● Request new features
● Write articles, tutorials
● Participate on the mailing
lists...
Thank you! Questions?
benjamin@eclipse.org
@kartben
http://iot.eclipse.org
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015
Building the IoT - Coding Serbia 2015
Upcoming SlideShare
Loading in …5
×

Building the IoT - Coding Serbia 2015

4,030 views

Published on

Illustrated with many live demos, this session presents the main challenges a developer faces when developing an IoT solution and how open source projects like the ones found at Eclipse IoT (but not only!) can help.

Published in: Technology

Building the IoT - Coding Serbia 2015

  1. 1. Building the Internet of Things with Eclipse IoT* Benjamin Cabé – Eclipse Foundation @kartben Coding Serbia - Oct 9, 2015 * and more!
  2. 2. ● 19 open-source projects* ● Lots of Java but also C, C++, Python, Go, .Net, … * and counting! → IoT Standards → Services & Frameworks
  3. 3. End-to-end IoT?
  4. 4. End-to-end IoT?
  5. 5. End-to-end IoT?
  6. 6. End-to-end IoT?
  7. 7. What you will learn today CONNECT
  8. 8. What you will learn today CONNECT MANAGE
  9. 9. What you will learn today VISUALIZECONNECT MANAGE
  10. 10. Connecting things to the IoT? Network is often not reliable Bandwidth == $$$ Different communication patterns
  11. 11. ● CoAP ○ « HTTP over UDP » ○ Expose your device as a resource to the Internet of Things ● MQTT ○ Publish/Subscribe model ○ More room for local processing Connecting things to the IoT
  12. 12. CoAP: The web-of-things /walk /hand/left/raise /eye/picture /on /red /green /blue /mtbf /on /on /buttons /buttons/1/push /bat-level /engine/status /position /fuel /CO2 /noise /lights/on
  13. 13. Eclipse Californium ● Focus on scalability and usability ● To be used in IoT cloud servers or M2M/IoT devices running Java ● Includes DTLS implementation (Scandium), HTTP/CoAP bridge, Plugtests, … http://eclipse.org/californium
  14. 14. Californium 101 oapSe e , oapResou e, oapEx han e 1. Implement custom resources (extend oapResou e) 2. Add resources to the CoAP server 3. Start the server
  15. 15. import static org.eclipse.californium.core.coap.CoAP.ResponseCode.*; public class MyResource extends CoapResource { @Override public void handleGET(CoapExchange exchange) { exchange.respond("hello world"); // reply with 2.05 payload (text/plain) } @Override public void handlePOST(CoapExchange exchange) { exchange.accept(); // make it a separate response if (exchange.getRequestOptions() ...) { // do something specific to the request options } exchange.respond(CREATED); // reply with response code only (shortcut) } }
  16. 16. MQTT: Publish & Subscribe Sub KETTLE232/#Pub KETTLE232/temp Payload: 21°C Pub KETTLE232/temp Payload: 21°C BROKER
  17. 17. MQTT in 5 keywords Pub-Sub Wildcards Quality of Service Last Will & Testament Retained Messages
  18. 18. Eclipse Paho ● Open-source MQTT clients ● Pick your language! ○ Java ○ JavaScript ○ C/C++, Objective C ○ Go, Lua, Python, .NET, WinRT, … http://eclipse.org/paho
  19. 19. MqttClient c = new MqttClient("tcp://m2m.eclipse.org:1883", MqttClient.generateClientId()); mqttClient.setCallback(new MqttCallback() { @Override public void messageArrived(String topic, MqttMessage message) throws Exception { // process received message // ... } }); mqttClient.connect(); mqttClient.subscribe("mygateway/#");
  20. 20. Open source MQTT brokers ● Eclipse Mosquitto ○ C implementation ○ Pretty scalable (1000 clients == 3MB RAM) ● But also… ○ Moquette (Java, Based on Netty and LMAX disruptor) ○ VerneMQ (Erlang) ○ Mosca (Node.js) ⇒ https://github.com/mqtt/mqtt.github.io/wiki/servers
  21. 21. Oh, and by the way… Amazon just announced support for MQTT in its new AWS IOT cloud platform
  22. 22. VISUALIZECONNECT MANAGE ✔
  23. 23. VISUALIZECONNECT MANAGE ✔ ???
  24. 24. Yup, lots of aspects to manage ● Network → PPP cellular connection, WiFi hotspot, Zigbee coordination, VPN, firewall … → offline/online mode ● Applications → Remote install, start, stop, configure, … → Sandboxing ● Hardware
  25. 25. Gateways to the rescue!
  26. 26. Gateway
  27. 27. Gateway
  28. 28. Java VM OSGi Application Container Device Abstraction Gateway Basic Services Network Configuration Network Management Field Protocols Connectivity and Delivery AdministrationGUI Operation&Management Linux Hardware App 1 App 2 App n. . . . Applications Eclipse Kura
  29. 29. Installing Kura cd ~ sudo apt-get update wget https://s3.amazonaws.com/kura_downloads/raspbian/release/ 1.2.2/kura_1.2.2_raspberry-pi_armv6.deb sudo dpkg -i kura_1.2.2_raspberry-pi_armv6.deb sudo apt-get install -f sudo reboot
  30. 30. First steps with Kura ● Network management ○ Cellular Modem, WiFi ○ Firewall ○ NAT ● OSGi and system administration ● IoT server communication settings
  31. 31. First steps with Kura
  32. 32. First steps with Kura
  33. 33. First steps with Kura
  34. 34. First steps with Kura
  35. 35. First steps with Kura
  36. 36. First steps with Kura
  37. 37. First steps with Kura
  38. 38. First steps with Kura
  39. 39. Kura API ● OSGi services that you can re-use in your own components ○ o Se e ○ Da aSe e, oudSe e ○ p oSe e (AES, base64, SHA-1) ○ Pos onSe e (geolocation) ○ … and many others ● And of course you can leverage a huge ecosystem of Java and OSGi libraries
  40. 40. VISUALIZECONNECT MANAGE ✔ ✔
  41. 41. End-user interaction ● JavaFX Charts ● Eclipse BIRT ● Smartphone app (e.g Android) ○ https://www.eclipse.org/paho/clients/android ● MQTT + WebSockets = ♡ ○ https://www.eclipse.org/paho/clients/js
  42. 42. MQTT + WebSockets var client = new Paho.MQTT.Client("ws://iot.eclipse.org/ws", "client-" + new Date().getTime()); client.onMessageArrived = function(message) { // my stuff } client.connect({ onSuccess: function() { client.subscribe("myRootTopic/#"); } });
  43. 43. DEMO!
  44. 44. Data Analytics for IoT?
  45. 45. Apache Spark Streaming ● Stream processing in Java, Python & Scala ● Built-in connectors for Kafka, Twitter, ZeroMQ, Flume, Kinesis & ... MQTT! ● A nice programming model for consolidating time-series data ● Awesome combo when used with Spark MLlib!
  46. 46. DEMO!
  47. 47. VISUALIZECONNECT MANAGE ✔ ✔ ✔
  48. 48. Eclipse IoT is also… Industrial IoT ● Open source implementations of IEC standards ● Eclipse SCADA, 4DIAC, Rise V2G, ...
  49. 49. Eclipse IoT is also... Device Management ● LwM2M is an Open Mobile Alliance Standard ● Device Management on top of CoAP ● Eclipse Leshan and Wakaama are two implementations
  50. 50. Eclipse IoT is also... Secured Service Discovery ● Eclipse Tiaki ● Leveraging DNS-SEC and DNS-SD for retrieving a device configuration parameter, or its public key for establishing secured communications
  51. 51. Eclipse IoT is also… ● Flexible Framework ● Based on Java and OSGi ● Huge number of “bindings”: KNX, Nest, Philips HUE, …
  52. 52. Kura is awesome! Go download it now! http://eclipse.org/kura If you had to remember only 3 things... #1
  53. 53. Build your own greenhouse & follow the tutorial http://iot.eclipse.org/java/tutorial If you had to remember only 3 things... #2
  54. 54. Eclipse IoT is much more than Kura and Java! http://iot.eclipse.org/ If you had to remember only 3 things... #3
  55. 55. Get Involved! ● Open bugs / fix bugs ● Request new features ● Write articles, tutorials ● Participate on the mailing lists ● Propose your project!
  56. 56. Thank you! Questions? benjamin@eclipse.org @kartben http://iot.eclipse.org

×