M2M for Java Developers
MQTT with Eclipse Paho
17-07-2013 -- #democampstuttgart
Dominik Obermaier -- dc-square GmbH
Dominik Obermaier
@dobermai
MQTT Enthusiast
loves OSS
passionate
Architect & Maker
Co-Founder dc-square
likes Open Source ...
Dominik Obermaier
@dobermai
MQTT Enthusiast
loves OSS
passionate
Architect & Maker
Co-Founder dc-square
likes Open Source ...
M2M?
TECHNOLOGY THAT
SUPPORTS WIRED
OR WIRELESS
COMMUNICATION
BETWEEN DEVICES
Why
should
we
care?
2010 2015 2020
~6.909.000.000 ~7.302.000.000 ~7.675.000.000
~12.500.000.000 ~25.000.000.000 ~50.000.000.000
[1]Source: htt...
Things?
Which
protocol
?
Why MQTT?
✓ Simple
✓ Efficient
✓ Publish / Subscribe
✓ Quality of Service Levels
✓ Last Will and Testament
✓ Designed for ...
Why MQTT?
✓ Simple
✓ Efficient
✓ Publish / Subscribe
✓ Quality of Service Levels
✓ Last Will and Testament
✓ Designed for ...
Publish / Subscribe
OMG! Sounds like
programming in C!
What
about
Java?
What is Paho?
✓ Scalable Open Source Implementations of M2M
standard protocols
✓ Focus on MQTT
✓ Implementations in Java, ...
What is Paho?
✓ Scalable Open Source Implementations of M2M
standard protocols
✓ Focus on MQTT
✓ Implementations in Java, ...
Code!
public void start() throws Exception {
final String clientId = "eclipse_stuttgart_sub";
final MqttClient mqttClient ...
Moar Code!
public class SubscribeCallback implements MqttCallback {
@Override
public void connectionLost(Throwable cause) ...
DEMO!
Other Eclipse
M2M Projects
Credits
✓ Scared Cat Picture by http://www.flickr.com/photos/
dat-pics/
✓ Thanks Vincent Le Moign for the awesome Icon Set
...
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
M2M for Java Developers - MQTT with Eclipse Paho
Upcoming SlideShare
Loading in...5
×

M2M for Java Developers - MQTT with Eclipse Paho

3,239

Published on

Used Software in this talk:

HiveMQ MQTT Server - http://www.hivemq.com
Paho - http://www.eclipse.org/paho/

Mobile devices like smartphones and tablet computers became an integral part of our modern world and single-board computers like Raspberry Pi are cheaper today than at any time before. Simple and open Machine-to-Machine (M2M) protocols like MQTT enable these devices to communicate in an efficient manner, even in scenarios with unreliable und instable networks. This talk shows how Eclipse Paho - an Eclipse umbrella project for M2M protocols - can be utilized for professional and personal projects to build efficient and scalable solutions for (mobile) devices.

Published in: Technology, Education
0 Comments
12 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,239
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
75
Comments
0
Likes
12
Embeds 0
No embeds

No notes for slide

M2M for Java Developers - MQTT with Eclipse Paho

  1. 1. M2M for Java Developers MQTT with Eclipse Paho 17-07-2013 -- #democampstuttgart Dominik Obermaier -- dc-square GmbH
  2. 2. Dominik Obermaier @dobermai MQTT Enthusiast loves OSS passionate Architect & Maker Co-Founder dc-square likes Open Source Hardware
  3. 3. Dominik Obermaier @dobermai MQTT Enthusiast loves OSS passionate Architect & Maker Co-Founder dc-square likes Open Source Hardware K Who not?!?
  4. 4. M2M?
  5. 5. TECHNOLOGY THAT SUPPORTS WIRED OR WIRELESS COMMUNICATION BETWEEN DEVICES
  6. 6. Why should we care?
  7. 7. 2010 2015 2020 ~6.909.000.000 ~7.302.000.000 ~7.675.000.000 ~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 [1] [2]Source: http://share.cisco.com/internet-of-things.html [2] “Things” in the Internet
  8. 8. Things?
  9. 9. Which protocol ?
  10. 10. Why MQTT? ✓ Simple ✓ Efficient ✓ Publish / Subscribe ✓ Quality of Service Levels ✓ Last Will and Testament ✓ Designed for unreliable networks
  11. 11. Why MQTT? ✓ Simple ✓ Efficient ✓ Publish / Subscribe ✓ Quality of Service Levels ✓ Last Will and Testament ✓ Designed for unreliable networks KWireless? Yep, then it probably is unreliable
  12. 12. Publish / Subscribe
  13. 13. OMG! Sounds like programming in C!
  14. 14. What about Java?
  15. 15. What is Paho? ✓ Scalable Open Source Implementations of M2M standard protocols ✓ Focus on MQTT ✓ Implementations in Java, Javascript, Lua and C ✓ Eclipse Incubator
  16. 16. What is Paho? ✓ Scalable Open Source Implementations of M2M standard protocols ✓ Focus on MQTT ✓ Implementations in Java, Javascript, Lua and C ✓ Eclipse Incubator KRead: What is Paho at the moment
  17. 17. Code! public void start() throws Exception { final String clientId = "eclipse_stuttgart_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); }
  18. 18. 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"))); } }
  19. 19. DEMO!
  20. 20. Other Eclipse M2M Projects
  21. 21. 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
  1. Gostou de algum slide específico?

    Recortar slides é uma maneira fácil de colecionar informações para acessar mais tarde.

×