0
MQTT	
  -­‐	
  REST	
  Bridge	
  using	
  the	
  
Smart	
  Object	
  API	
  
Open	
  Source	
  Internet	
  of	
  Things	
  
SmartObject	
  API	
  
Web	
  Object	
  EncapsulaBon	
  	
  
Smart	
  Object	
  
Web	
  protocol	
  interfaces,	
  also	
 ...
SmartObject	
  API	
  –	
  Observers	
  
•  Contains	
  graphs	
  which	
  define	
  endpoints	
  of	
  
event	
  driven	
 ...
MQTT	
  Observer	
  
•  Implements	
  the	
  MQTT	
  M2M	
  AbstracBon	
  Layer	
  
•  Publish,	
  Subscribe,	
  or	
  Pub...
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqTObserver	
  
PUT	
   GET	
  
Publis...
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqTObserver	
  
PUT	
   GET	
  
Publis...
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqTObserver	
  
PUT	
   GET	
  
Publis...
MQTT	
  Observer	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mqTObserver	
  
PUT	
   GET	
  
Publis...
MQTT	
  Bridge	
  to	
  mulBple	
  REST	
  endpoints	
  
MQTT	
  Broker	
  
REST	
  Endpoint	
  
ObservableProperty	
  
mq...
IoT	
  Toolkit	
  
•  IoT	
  Toolkit	
  is	
  a	
  reference	
  implementaBon	
  of	
  
the	
  Smart	
  Object	
  API	
  a...
IoT	
  2.0	
  –	
  Interoperability	
  
M2M	
  
CoAP	
   M2M	
  
MQ	
   SOA	
  
M2M	
  
HTTP	
  
Smart	
  Object	
  API	
 ...
Interoperability	
  Architecture	
  
SO	
  
SO	
  
SO	
  
Gateway	
   Server	
  
Cloud	
  
Endpoints	
  
•  Sensors	
  
• ...
Upcoming SlideShare
Loading in...5
×

MQTT REST Bridge using the Smart Object API

131

Published on

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

  • Be the first to like this

No Downloads
Views
Total Views
131
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "MQTT REST Bridge using the Smart Object API"

  1. 1. MQTT  -­‐  REST  Bridge  using  the   Smart  Object  API   Open  Source  Internet  of  Things  
  2. 2. SmartObject  API   Web  Object  EncapsulaBon     Smart  Object   Web  protocol  interfaces,  also  M2M  e.g.  MQTT   Event  Model   Links  data  with  acBons   Pub-­‐Sub  and  event  handlers   Encapsulates  local  soJware     components  and  handlers   Self-­‐describing  data  model   For  Resource  Discovery     and  Linkage   Sensor  or  other  data     JSON,  XML,  data  feeds  
  3. 3. SmartObject  API  –  Observers   •  Contains  graphs  which  define  endpoints  of   event  driven  processing  and  communicaBon   •  The  Observer  paTern  is  the  basis  for  M2M   communicaBon  abstracBons   •  Publisher,  Subscriber,  Event  Handler  classes   •  Reference  ImplementaBon   – create  (POST)  makes  a  new  Observer     •  Publisher,  Subscriber,  or  Handler  Class   – set  (PUT)  updates  an  Observer’s  seZngs   – get  (GET)  returns  an  Observer’s  seZngs   – delete  (DELETE)  removes  an  Observer  
  4. 4. MQTT  Observer   •  Implements  the  MQTT  M2M  AbstracBon  Layer   •  Publish,  Subscribe,  or  Pub+Sub  using  the   mqTObserver  resource  class   •  Prototype  opens  a  connecBon  to  a  specified   broker  for  each  REST  endpoint    Observers.create({'resourceName': 'mqttTestObserver',! ! ! ! ! ! 'resourceClass': 'mqttObserver',! 'connection': 'smartobjectservice.com',! 'pubTopic': ’sealevel_pressure',! 'subTopic': None,! 'QoS': 0,! 'keepAlive': 60 })!
  5. 5. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Connects  REST  Resource  to  MQTT  Topic   Publish  and  Subscribe  
  6. 6. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Publisher     Publishes  REST  Resource  updates  to  the  broker  
  7. 7. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Subscriber     Makes  last  published  data  available  at  the  REST  endpoint  
  8. 8. MQTT  Observer   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   PUT   GET   Publish  from   data  producer   Publish  From   REST  API   Publish  to  Other   Subscribers   SUB   Publish  to   REST  API     Pub+Sub   Repeats  data  updates  in  both  direcBons  
  9. 9. MQTT  Bridge  to  mulBple  REST  endpoints   MQTT  Broker   REST  Endpoint   ObservableProperty   mqTObserver   PUT   GET   Publish  from   data  producer   Publish  to  Other   Subscribers   REST  Endpoint   ObservableProperty   mqTObserver   PUT   GET  
  10. 10. IoT  Toolkit   •  IoT  Toolkit  is  a  reference  implementaBon  of   the  Smart  Object  API  and  related  tools   •  REST  API  with  real-­‐Bme  event  model  for  the   Internet  of  Things   •  Lightweight  server  that  can  run  on  small   computers  e.g.  Raspberry  Pi   •  Work  in  progress  prototype  (limited  excepBon   handling  and  simple  interfaces)  
  11. 11. IoT  2.0  –  Interoperability   M2M   CoAP   M2M   MQ   SOA   M2M   HTTP   Smart  Object  API   IoT  Toolkit   Discovery   ApplicaBons   Thing   Models   Resource   Models   •  Object  Model   •  REST  +  Event  Model   •  M2M  Abstrac<ons   IoT  Toolkit   Connected  Things,  Sensors,  Actuators,  Data  Sources   Seman?c   Repository   •  Easy  to  deploy  new   things  and   applicaBons  using  data   models   •  Write  once  run   anywhere,  any  app  to   any  thing  via  any  M2M   •  Network  effect   enabled   •  Allows  for  appropriate   M2M  choice  
  12. 12. Interoperability  Architecture   SO   SO   SO   Gateway   Server   Cloud   Endpoints   •  Sensors   •  Devices   ApplicaBon     Components     And     Resources   Databases   Instances   Classes   SRT   • Discovery   • Persistence   • ReplicaBon   • Resource  Access   • Data  Models     • Sensor  Models   • Machine  Models   • Templates  
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×