m2m for java developers
play

M2M for Java Developers MQTT with Eclipse Paho Dominik Obermaier - PowerPoint PPT Presentation

M2M for Java Developers MQTT with Eclipse Paho Dominik Obermaier @dobermai passionate CTO @ dc-square Architect and Maker Member of the OASIS Regular speaker and MQTT TC author HiveMQ Architect M2M? TECHNOLOGY THA T SUPPORTS WIRED


  1. M2M for Java Developers MQTT with Eclipse Paho

  2. Dominik Obermaier @dobermai passionate CTO @ dc-square Architect and Maker Member of the OASIS Regular speaker and MQTT TC author HiveMQ Architect

  3. M2M?

  4. TECHNOLOGY THA T SUPPORTS WIRED OR WIRELESS COMMUNICA TION BETWEEN DEVICES

  5. IoT?

  6. Things?

  7. Why should we care?

  8. “Things” in the Internet 2010 2015 2020 [1] ~6.909.000.000 ~7.302.000.000 ~7.675.000.000 [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

  9. “Things” in the Internet People Things 50,000,000,000 6.5x 37,500,000,000 1.8x 25,000,000,000 3.4x 12,500,000,000 0 2010 2015 2020

  10. Another revolution?

  11. Screenshot Taken from Oracle JavaOne Strategic Keynote 2013

  12. Protocols?

  13. Requirements for a IoT protocol ✓ efficient in bandwidth ✓ scalable ✓ standardized ✓ open ✓ data agnostic ✓ must be suited for constrained devices AND server infrastructure

  14. HTTP? Request / Response Verbose Polling instead of Push No quality of service How to get notified if clients die? Stateless

  15. 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

  16. MQTT vs HTTPs ✓ 93x faster (throughput) ✓ 11x less battery when publishing ✓ 170x less battery when receiving messages ✓ 8x less network overhead http://stephendnicholas.com/archives/1217

  17. Oil pipeline http://www.eurotech.com/en/press+room/news/?506

  18. Sprint Velocity https://www.facebook.com/notes/facebook-engineering/building-facebook-messenger/10150259350998920

  19. Logistics

  20. Facebook Messenger https://www.facebook.com/notes/facebook-engineering/building-facebook-messenger/10150259350998920

  21. Sports

  22. Google Trends

  23. History MQTT invented OASIS TC MQTT is royalty free by IBM and formed OASIS Arcom (Eurotech) standard 1999 2010 2013 2014

  24. Publish / Subscribe

  25. Publish / Subscribe

  26. MQTT Topics

  27. MQTT Topics MQTT/is/awesome MQTT/is/fantastic Bacon/is/awesome MQTT/looks/fantastic MQTT/looks/fantastic

  28. MQTT Topics MQTT/is/awesome MQTT Bacon looks is fantastic awesome

  29. MQTT Topics Bacon/is/awesome MQTT Bacon looks is fantastic awesome

  30. MQTT Topic Level Wildcard +/is/awesome MQTT Bacon looks is fantastic awesome

  31. MQTT Topic Level Wildcard +/is/+ MQTT Bacon looks is fantastic awesome

  32. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome

  33. MQTT Wildcard # MQTT Bacon looks is fantastic awesome

  34. Quality of Service Levels

  35. Last Will and Testament MQTT Broker Connect with LWT topic “clientA/lwt”

  36. Last Will and Testament MQTT Broker Subscribe to topic “clientA/lwt”

  37. Last Will and Testament MQTT Broker

  38. Last Will and Testament MQTT Broker Broker detects ‘death’ of ClientA

  39. Last Will and Testament MQTT Broker Broker publishes LWT of ClientA

  40. Broker Implementations + others Extensive list of brokers available at http://mqtt.org/wiki/doku.php/brokers

  41. Broker Implementations QoS QoS QoS dynamic Auth Bridge $SYS SSL cluster websockets plugins 0 1 2 topics HiveMQ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ mosquitto ✔ ✔ ✔ ✔ X X ✔ ✔ ✔ ✔ ✔ ✔ X X X X ✔ ✔ ✔ ✔ ✔ ✔ RSMB RabbitMQ ✔ ✔ X ✔ X X ✔ ? ? ? ✔ ActiveMQ ✔ ✔ ✔ ? X X ? ? ? ? ✔

  42. MQTT over Websockets

  43. Why MQTT over websockets? ✓ Every Browser is a ‘device’ ✓ Device-to-Browser Push ✓ Broadcasting to all online users ✓ Detect if a user is offline ✓ Direct Browser-to-device push ✓ Minimum payload ✓ No application-specific protocol

  44. MQTT Libraries • Paho (Java, Javascript, Python, C, C++, ObjectiveC, Lua, Go) • .Net • Ruby • Erlang • Node.js • and many more

  45. OK, got it. How to start hacking?

  46. Java!

  47. What is Paho? ✓ Scalable Open Source Implementations of M2M standard protocols ✓ Focus on MQTT ✓ Implementations in Java, Javascript, Lua, C, C++, Go and Python ✓ Eclipse Incubator

  48. Paho - Java contribution of IBM Release first version Release Release announced at in GIT v0.1 v0.2 v0.4.0 EclipseCon Europe 11/2011 03/2012 11/2012 04/2013 08/2013

  49. Eclipse Paho ✓ “Reference Implementation” ✓ Active Community ✓ Blocking and Async API • Not in Maven Central :-(

  50. DEMO!

  51. Fusesource MQTT Client ✓ 3 API Styles ✓ Very easy to intercept ✓ Based on HawtIO ✓ Very performant ✓ In Maven Central

  52. DEMO!

  53. https://github.com/dobermai/bedcon-mqtt-clients

  54. THANK YOU!

  55. Bridging

  56. Clustering

Recommend


More recommend