Eclipse Democamps 2013 - M2M for Java Developers with MQTT
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Eclipse Democamps 2013 - M2M for Java Developers with MQTT

  • 1,701 views
Uploaded on

I gave this talk at Eclipse Democamp Munich and Stuttgart. This presentation explains the benefits of MQTT, why HTTP isn't enough for the Internet of Things and Machine-to-Machine communication.......

I gave this talk at Eclipse Democamp Munich and Stuttgart. This presentation explains the benefits of MQTT, why HTTP isn't enough for the Internet of Things and Machine-to-Machine communication. Last but not least it shows how to use the Eclipse Paho Java library for efficient

More in: Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,701
On Slideshare
1,693
From Embeds
8
Number of Embeds
1

Actions

Shares
Downloads
68
Comments
0
Likes
2

Embeds 8

https://twitter.com 8

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. M2M for Java Developers MQTT with Eclipse Paho
  • 2. Dominik Obermaier @dobermai excited about M2M passionate Architect & Maker helps standardizing MQTT at OASIS loves OSS Co-Founder and CTO at dc-square HiveMQ architect
  • 3. M2M?
  • 4. TECHNOLOGY THA T SUPPORTS WIRED OR WIRELESS COMMUNICA TION BETWEEN DEVICES
  • 5. Why should we care?
  • 6. “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
  • 7. “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
  • 8. “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
  • 9. “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
  • 10. “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
  • 11. Which protocol ?
  • 12. HTTP? Request / Response Verbose Polling instead of Push No quality of service How to get notified if clients die? Stateless
  • 13. Why MQTT? ✓ Simple ✓ Efficient ✓ Publish / Subscribe ✓ Quality of Service Levels ✓ Last Will and Testament ✓ Designed for unreliable networks
  • 14. 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
  • 15. Google Trends
  • 16. History MQTT invented by IBM and Arcom (Eurotech) 1999 royalty free OASIS TC formed 2010 2013 MQTT becomes Standard 2014
  • 17. Publish / Subscribe
  • 18. MQTT Topics
  • 19. MQTT Topics MQTT/is/awesome MQTT/is/fantastic Bacon/is/awesome MQTT/looks/fantastic MQTT/looks/fantastic
  • 20. MQTT Topics MQTT/is/awesome MQTT Bacon looks is fantastic awesome
  • 21. MQTT Topics MQTT/is/awesome MQTT Bacon looks is fantastic awesome
  • 22. MQTT Topics MQTT/is/awesome MQTT Bacon looks is fantastic awesome
  • 23. MQTT Topics MQTT/is/awesome MQTT Bacon looks is fantastic awesome
  • 24. MQTT Topics MQTT/is/awesome MQTT Bacon looks is fantastic awesome
  • 25. MQTT Topics MQTT/is/awesome MQTT Bacon looks is fantastic awesome
  • 26. MQTT Topics Bacon/is/awesome MQTT Bacon looks is fantastic awesome
  • 27. MQTT Topics Bacon/is/awesome MQTT Bacon looks is fantastic awesome
  • 28. MQTT Topics Bacon/is/awesome MQTT Bacon looks is fantastic awesome
  • 29. MQTT Topics Bacon/is/awesome MQTT Bacon looks is fantastic awesome
  • 30. MQTT Topics Bacon/is/awesome MQTT Bacon looks is fantastic awesome
  • 31. MQTT Topics Bacon/is/awesome MQTT Bacon looks is fantastic awesome
  • 32. MQTT Topic Level Wilcard +/is/awesome MQTT Bacon looks is fantastic awesome
  • 33. MQTT Topic Level Wilcard +/is/awesome MQTT Bacon looks is fantastic awesome
  • 34. MQTT Topic Level Wilcard +/is/awesome MQTT Bacon looks is fantastic awesome
  • 35. MQTT Topic Level Wilcard +/is/awesome MQTT Bacon looks is fantastic awesome
  • 36. MQTT Topic Level Wilcard +/is/awesome MQTT Bacon looks is fantastic awesome
  • 37. MQTT Topic Level Wilcard +/is/awesome MQTT Bacon looks is fantastic awesome
  • 38. MQTT Topic Level Wilcard +/is/awesome MQTT Bacon looks is fantastic awesome
  • 39. MQTT Topic Level Wilcard +/is/+ MQTT Bacon looks is fantastic awesome
  • 40. MQTT Topic Level Wilcard +/is/+ MQTT Bacon looks is fantastic awesome
  • 41. MQTT Topic Level Wilcard +/is/+ MQTT Bacon looks is fantastic awesome
  • 42. MQTT Topic Level Wilcard +/is/+ MQTT Bacon looks is fantastic awesome
  • 43. MQTT Topic Level Wilcard +/is/+ MQTT Bacon looks is fantastic awesome
  • 44. MQTT Topic Level Wilcard +/is/+ MQTT Bacon looks is fantastic awesome
  • 45. MQTT Topic Level Wilcard +/is/+ MQTT Bacon looks is fantastic awesome
  • 46. MQTT Topic Level Wilcard +/is/+ MQTT Bacon looks is fantastic awesome
  • 47. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome
  • 48. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome
  • 49. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome
  • 50. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome
  • 51. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome
  • 52. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome
  • 53. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome
  • 54. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome
  • 55. MQTT Wildcard MQTT/# MQTT Bacon looks is fantastic awesome
  • 56. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 57. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 58. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 59. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 60. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 61. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 62. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 63. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 64. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 65. MQTT Wildcard # MQTT Bacon looks is fantastic awesome
  • 66. Broker Implementations
  • 67. Broker Implementations
  • 68. Broker Implementations
  • 69. Broker Implementations
  • 70. Broker Implementations
  • 71. Broker Implementations
  • 72. Broker Implementations + others
  • 73. Broker Implementations + others Extensive list of brokers available at http://mqtt.org/wiki/doku.php/brokers
  • 74. OK, got it. How to start hacking?
  • 75. 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
  • 76. 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
  • 77. Java!
  • 78. Paho - Java contribution of IBM announced at EclipseCon Europe 11/2011 first version in GIT 03/2012 Release v0.1 11/2012 Release v0.2 04/2013 Release v0.4.0 08/2013
  • 79. Code! public void start() throws Exception { final String clientId = "democamp_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); }
  • 80. 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"))); }
  • 81. DEMO!
  • 82. Other Eclipse M2M Projects
  • 83. Other Eclipse M2M Projects + others
  • 84. THANK YOU!
  • 85. Credits ✓ Pictures licensed from different people from 500px.com and depositphotos.com ✓ MQTT Logo by http://www.mqtt.org ✓ Paho Logo from http://wiki.eclipse.org/Paho/Branding