Advertisement
Advertisement

More Related Content

Advertisement

Similar to M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013(20)

Advertisement

M2M for Java Developers: MQTT with Eclipse Paho - Eclipsecon Europe 2013

  1. M2M for Java Developers MQTT with Eclipse Paho
  2. Dominik Obermaier @dobermai excited about M2M passionate Architect & Maker loves OSS Co-Founder and CTO at dc-square likes Open Source Hardware
  3. Dominik Obermaier @dobermai excited about M2M loves OSS passionate Architect & Maker Co-Founder and CTO at dc-square likes Open Source Hardware K Who not?!?
  4. M2M?
  5. TECHNOLOGY THA T SUPPORTS WIRED OR WIRELESS COMMUNICA TION BETWEEN DEVICES
  6. Why should we care?
  7. “Things” in the Internet 2010 2015 2020 ~6.909.000.000 ~7.302.000.000 ~7.675.000.000 [1] [2] ~12.500.000.000 ~25.000.000.000 ~50.000.000.000 [1]Source: http://www.un.org/esa/population/publications/wpp2008/wpp2008_highlights.pdf [2]Source: http://share.cisco.com/internet-of-things.html
  8. “Things” in the Internet People Things 50,000,000,000 37,500,000,000 25,000,000,000 12,500,000,000 0 2010 2015 2020
  9. “Things” in the Internet People Things 50,000,000,000 37,500,000,000 25,000,000,000 1.8x 12,500,000,000 0 2010 2015 2020
  10. “Things” in the Internet People Things 50,000,000,000 37,500,000,000 25,000,000,000 1.8x 3.4x 12,500,000,000 0 2010 2015 2020
  11. “Things” in the Internet People Things 50,000,000,000 6.5x 37,500,000,000 25,000,000,000 1.8x 3.4x 12,500,000,000 0 2010 2015 2020
  12. Things?
  13. Another revolution?
  14. Screenshot Taken from Oracle JavaOne Strategic Keynote 2013
  15. IoT
  16. Which protocol ?
  17. HTTP? Request / Response Verbose Polling instead of Push No quality of service How to get notified if clients die? Stateless
  18. Why MQTT? ✓ Simple ✓ Efficient ✓ Publish / Subscribe ✓ Quality of Service Levels ✓ Last Will and Testament ✓ Designed for unreliable networks
  19. Why MQTT? ✓ Simple ✓ Efficient ✓ Publish / Subscribe ✓ Quality of Service Levels ✓ Last Will and Testament ✓ Designed for unreliable networks K Wireless? Yep, then it probably is unreliable
  20. Publish / Subscribe
  21. Broker Implementations
  22. Broker Implementations
  23. Broker Implementations
  24. Broker Implementations
  25. Broker Implementations
  26. Broker Implementations
  27. Broker Implementations + others
  28. Broker Implementations + others Extensive list of brokers available at http://mqtt.org/wiki/doku.php/brokers
  29. Noooo! Sounds like programming in C!
  30. Java!
  31. What is Paho? ✓ Scalable Open Source Implementations of M2M standard protocols ✓ Focus on MQTT ✓ Implementations in Java, Javascript, Lua, C, C++ and Python ✓ Eclipse Incubator
  32. What is Paho? K Read: What is Paho at the moment ✓ Scalable Open Source Implementations of M2M standard protocols ✓ Focus on MQTT ✓ Implementations in Java, Javascript, Lua, C, C++ and Python ✓ Eclipse Incubator
  33. Code! public void start() throws Exception { final String clientId = "eclipsecon_sub"; final MqttClient mqttClient = new MqttClient(BROKER_URL, clientId, new MemoryPersistence()); mqttClient.setCallback(new SubscribeCallback(mqttClient)); mqttClient.connect(); mqttClient.subscribe(TOPIC_SUBSCRIPTION, QUALITY_OF_SERVICE_LEVEL); }
  34. Moar Code! public class SubscribeCallback implements MqttCallback { @Override public void connectionLost(Throwable cause) {} @Override public void deliveryComplete(MqttDeliveryToken token) {} @Override public void messageArrived(MqttTopic topic, MqttMessage message) throws Exception { System.out.println( "Message arrived. Topic: " topic.getName() + ", QoS: " + message.getQos() + ", message: " + new String(message.getPayload(),Charset.forName("UTF-8"))); }
  35. DEMO!
  36. Other Eclipse M2M Projects
  37. Other Eclipse M2M Projects + others
  38. THANK YOU!
  39. Credits ✓ Scared Cat Picture by http://www.flickr.com/photos/ dat-pics/ ✓ Thanks Vincent Le Moign for the awesome Icon Set ✓ Rest of pictures licensed from different people from 500px.com ✓ MQTT Logo by http://www.mqtt.org ✓ Paho Logo from http://wiki.eclipse.org/Paho/Branding
Advertisement