SlideShare a Scribd company logo
Advanced MQTT and Kura
Best Practices for Topic Namespaces in M2M
Applications
EclipseCon 2014, March 19th
IOT MQTT System Topology
Sensors
Actuators
Legacy
Systems
Smart
Machines
M2M
Multi
Services
Gateway
Human /
Machine
Interfaces
Meters
Console/Port
al
APIs
Business
Logic
Request and Response in MQTT
Use cases
• Device Firmware/Software Updates
– Did the device get the update? When? Was it valid & installed?
• Configuration Updates
– Same Questions…
• Remote Resource Control/Interaction
– Device management/Backend business logic needs to
start/stop/interact with a device side service
• Control of actuators
• Dynamic status requests
• Remote Command execution
• Remote Service Control/Interaction
• Other considerations
– Extensibility, mutitenancy, client addressing, multiple applications,
resource management…
MQTT Topic Space
Considerations
• Data Topics
– Used for push of sensor data, metrics, or other data
– Example: [account_id]/[client_id]/...
• Control Topics
– Used for dynamic request/response interactions between clients
– Example: CTL/[account_id]/[client_id]/[app_id]/…
• Separate data from control topics
– Provides increased granularity on ACLs
– Allows for segregation of persistent and transient data
MQTT Request Verbs
• Request
– CTL/[account_id]/[client_id]/[app_id]/GET/[resource_id]
– CTL/[account_id]/[client_id]/[app_id]/POST/[resource_id]
– CTL/[account_id]/[client_id]/[app_id]/PUT/[resource_id]
– CTL/[account_id]/[client_id]/[app_id]/DEL/[resource_id]
– CTL/[account_id]/[client_id]/[app_id]/EXEC/[resource_id]
• Response
– CTL/[account_id]/[requester_client_id]/[app_id]/REPLY/[req_id]
REST Like
Request/Response Example Flow
Responder
(device1)
Requester
(manager1)
Responder
Subscribes on request topic:
CTL/kura/device1/CONF-V1/GET/configurations
Requester
Generates request metadata (for request payload):
request_id: 1363603920892
request_client_id: manager1
Subscribes on reply topic:
CTL/kura/manager1/CONF-V1/REPLY/1363603920892
Requester
Sends MQTT request
CTL/kura/device1/CONF-V1/GET/configurations
Responder
Handles request and generates response using request
specific parameters in the payload of the request
• [request_id] and [request_client_id] included in
request payload
• Manditory response code
• Optional application specific parameters
• Optional logs, exceptions, stacktraces, etc
Responder
Sends response to requesting client
CTL/kura/manager1/CONF-V1/REPLY/1363603920892
Response Codes
• response_code
– 200 (RESPONSE_CODE_OK)
– 400 (RESPONSE_CODE_BAD_REQUEST)
– 404 (RESPONSE_CODE_NOTFOUND)
– 500 (RESPONSE_CODE_ERROR)
• response_exception_message
– Optional and contains error message if an error occurred
• response_stacktrace_message
– Optional and contains a stacktrace
HTTP Like
Kura Cloudlet
• Uses Kura Cloud Client
– Allows for one MQTT connection across many applications
– Built in configurable store/forward of messages on device
– Handles callback routing to applications based on [app_id]
• Offers simple overrides for request/response operations
Kura Cloudlet
Thank You

More Related Content

What's hot

Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
Benjamin Cabé
 
A Pragmatic Reference Architecture for The Internet of Things
A Pragmatic Reference Architecture for The Internet of ThingsA Pragmatic Reference Architecture for The Internet of Things
A Pragmatic Reference Architecture for The Internet of Things
Rick G. Garibay
 
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
Benjamin Cabé
 

What's hot (20)

Building Open Source IoT Cloud
Building Open Source IoT CloudBuilding Open Source IoT Cloud
Building Open Source IoT Cloud
 
FIWARE Complex Event Processing
FIWARE Complex Event ProcessingFIWARE Complex Event Processing
FIWARE Complex Event Processing
 
Iot gateway dream team - Eclipse Kura and Apache Camel
Iot gateway dream team - Eclipse Kura and Apache CamelIot gateway dream team - Eclipse Kura and Apache Camel
Iot gateway dream team - Eclipse Kura and Apache Camel
 
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
Using Eclipse and Lua for the Internet of Things with Eclipse Koneki, Mihini ...
 
IoT Seminar (Oct. 2016) Nicolas Damour - Sierra Wireless
IoT Seminar (Oct. 2016) Nicolas Damour - Sierra WirelessIoT Seminar (Oct. 2016) Nicolas Damour - Sierra Wireless
IoT Seminar (Oct. 2016) Nicolas Damour - Sierra Wireless
 
FINODEX introduces FIWARE
FINODEX introduces FIWAREFINODEX introduces FIWARE
FINODEX introduces FIWARE
 
Lightweight M2M
Lightweight M2MLightweight M2M
Lightweight M2M
 
FIWARE Internet of Things
FIWARE Internet of ThingsFIWARE Internet of Things
FIWARE Internet of Things
 
Device Management with OMA Lightweight M2M
Device Management with OMA Lightweight M2MDevice Management with OMA Lightweight M2M
Device Management with OMA Lightweight M2M
 
AWS IoT vs Azure IoT
AWS IoT vs Azure IoTAWS IoT vs Azure IoT
AWS IoT vs Azure IoT
 
Performance of State-of-the-Art Cryptography on ARM-based Microprocessors
Performance of State-of-the-Art Cryptography on ARM-based MicroprocessorsPerformance of State-of-the-Art Cryptography on ARM-based Microprocessors
Performance of State-of-the-Art Cryptography on ARM-based Microprocessors
 
IoT Seminar (Oct. 2016) CK Vishwakarma - IOTSG
IoT Seminar (Oct. 2016) CK Vishwakarma - IOTSGIoT Seminar (Oct. 2016) CK Vishwakarma - IOTSG
IoT Seminar (Oct. 2016) CK Vishwakarma - IOTSG
 
IoT on the Edge
IoT on the EdgeIoT on the Edge
IoT on the Edge
 
Device Management for Internet of Things Constrained Devices OMA Lightweight M2M
Device Management for Internet of Things Constrained Devices OMA Lightweight M2MDevice Management for Internet of Things Constrained Devices OMA Lightweight M2M
Device Management for Internet of Things Constrained Devices OMA Lightweight M2M
 
A Pragmatic Reference Architecture for The Internet of Things
A Pragmatic Reference Architecture for The Internet of ThingsA Pragmatic Reference Architecture for The Internet of Things
A Pragmatic Reference Architecture for The Internet of Things
 
Open source IoT gateway
Open source IoT gatewayOpen source IoT gateway
Open source IoT gateway
 
Eclipse IoT Day, March 2017 - LightweightM2M Protocol & Ecosystem
Eclipse IoT Day, March 2017 - LightweightM2M Protocol & EcosystemEclipse IoT Day, March 2017 - LightweightM2M Protocol & Ecosystem
Eclipse IoT Day, March 2017 - LightweightM2M Protocol & Ecosystem
 
Eclipse Kura Shoot a-pi
Eclipse Kura Shoot a-piEclipse Kura Shoot a-pi
Eclipse Kura Shoot a-pi
 
[WSO2Con EU 2017] Building Smart, Connected Products with WSO2 IoT Platform
[WSO2Con EU 2017] Building Smart, Connected Products with WSO2 IoT Platform[WSO2Con EU 2017] Building Smart, Connected Products with WSO2 IoT Platform
[WSO2Con EU 2017] Building Smart, Connected Products with WSO2 IoT Platform
 
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
Using Eclipse and Lua for the Internet of Things - EclipseDay Googleplex 2012
 

Similar to Advanced MQTT and Kura - EclipseCON 2014

Enabling Technologies for Branded Wireless Services - Boris Klots, Motorola, ...
Enabling Technologies for Branded Wireless Services - Boris Klots, Motorola, ...Enabling Technologies for Branded Wireless Services - Boris Klots, Motorola, ...
Enabling Technologies for Branded Wireless Services - Boris Klots, Motorola, ...
mfrancis
 
Workshop on Large-scale Sensing For Future Cities'13 / Jorge Sousa: "SMART2M"
Workshop on Large-scale Sensing For Future Cities'13 / Jorge Sousa: "SMART2M"Workshop on Large-scale Sensing For Future Cities'13 / Jorge Sousa: "SMART2M"
Workshop on Large-scale Sensing For Future Cities'13 / Jorge Sousa: "SMART2M"
Future Cities Project
 
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
AgileNetwork
 
The differing ways to monitor and instrument
The differing ways to monitor and instrumentThe differing ways to monitor and instrument
The differing ways to monitor and instrument
Jonah Kowall
 

Similar to Advanced MQTT and Kura - EclipseCON 2014 (20)

Encapsulating Complexity in IoT Solutions
Encapsulating Complexity in IoT SolutionsEncapsulating Complexity in IoT Solutions
Encapsulating Complexity in IoT Solutions
 
Addressing the Complexity and Risks of M2M Projects - M2M World Congress Apri...
Addressing the Complexity and Risks of M2M Projects - M2M World Congress Apri...Addressing the Complexity and Risks of M2M Projects - M2M World Congress Apri...
Addressing the Complexity and Risks of M2M Projects - M2M World Congress Apri...
 
Enabling Technologies for Branded Wireless Services - Boris Klots, Motorola, ...
Enabling Technologies for Branded Wireless Services - Boris Klots, Motorola, ...Enabling Technologies for Branded Wireless Services - Boris Klots, Motorola, ...
Enabling Technologies for Branded Wireless Services - Boris Klots, Motorola, ...
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
Internet of things
Internet of thingsInternet of things
Internet of things
 
Trellis DCIM Platform
Trellis DCIM PlatformTrellis DCIM Platform
Trellis DCIM Platform
 
Stop Wasting Energy on M2M
Stop Wasting Energy on M2MStop Wasting Energy on M2M
Stop Wasting Energy on M2M
 
IoT and the Oil & Gas industry at M2M Oil & Gas 2014 in London
IoT and the Oil & Gas industry at M2M Oil & Gas 2014 in LondonIoT and the Oil & Gas industry at M2M Oil & Gas 2014 in London
IoT and the Oil & Gas industry at M2M Oil & Gas 2014 in London
 
Workshop on Large-scale Sensing For Future Cities'13 / Jorge Sousa: "SMART2M"
Workshop on Large-scale Sensing For Future Cities'13 / Jorge Sousa: "SMART2M"Workshop on Large-scale Sensing For Future Cities'13 / Jorge Sousa: "SMART2M"
Workshop on Large-scale Sensing For Future Cities'13 / Jorge Sousa: "SMART2M"
 
Smart Manufacturing in the Gigafab Era
Smart Manufacturing in the Gigafab Era  Smart Manufacturing in the Gigafab Era
Smart Manufacturing in the Gigafab Era
 
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
Agile Gurugram 2023 | Observability for Modern Applications. How does it help...
 
The differing ways to monitor and instrument
The differing ways to monitor and instrumentThe differing ways to monitor and instrument
The differing ways to monitor and instrument
 
Innovation Summit 2015 - 5 - AirVantage
Innovation Summit 2015 - 5 - AirVantageInnovation Summit 2015 - 5 - AirVantage
Innovation Summit 2015 - 5 - AirVantage
 
The Information Office
The Information OfficeThe Information Office
The Information Office
 
Reference Architecture for Electric Energy OT.pdf
Reference Architecture for Electric Energy OT.pdfReference Architecture for Electric Energy OT.pdf
Reference Architecture for Electric Energy OT.pdf
 
SCADA of the Future
SCADA of the FutureSCADA of the Future
SCADA of the Future
 
Requirment anlaysis , application, device, network requirements
Requirment anlaysis , application, device, network requirementsRequirment anlaysis , application, device, network requirements
Requirment anlaysis , application, device, network requirements
 
Comparison of MQTT and DDS as M2M Protocols for the Internet of Things
Comparison of MQTT and DDS as M2M Protocols for the Internet of ThingsComparison of MQTT and DDS as M2M Protocols for the Internet of Things
Comparison of MQTT and DDS as M2M Protocols for the Internet of Things
 
Implementing Private Clouds
Implementing Private CloudsImplementing Private Clouds
Implementing Private Clouds
 
Smart City: Many Applications and Devices
Smart City: Many Applications and DevicesSmart City: Many Applications and Devices
Smart City: Many Applications and Devices
 

More from Eurotech

More from Eurotech (20)

Integrating electrical systems easily – accelerating the path towards sustain...
Integrating electrical systems easily – accelerating the path towards sustain...Integrating electrical systems easily – accelerating the path towards sustain...
Integrating electrical systems easily – accelerating the path towards sustain...
 
Enabling supply chain flexibility and IoT scale with zero touch provisioning
Enabling supply chain flexibility and IoT scale with zero touch provisioningEnabling supply chain flexibility and IoT scale with zero touch provisioning
Enabling supply chain flexibility and IoT scale with zero touch provisioning
 
Automatic People and Passenger Counters
Automatic People and Passenger CountersAutomatic People and Passenger Counters
Automatic People and Passenger Counters
 
Developing Interoperable Components for an Open IoT Foundation
Developing Interoperable Components for an Open IoT Foundation Developing Interoperable Components for an Open IoT Foundation
Developing Interoperable Components for an Open IoT Foundation
 
IoT Solutions Made Simple with Everyware IoT
IoT Solutions Made Simple with Everyware IoTIoT Solutions Made Simple with Everyware IoT
IoT Solutions Made Simple with Everyware IoT
 
Intelligent IoT gateway: pushing analytics at the edge
Intelligent IoT gateway: pushing analytics at the edgeIntelligent IoT gateway: pushing analytics at the edge
Intelligent IoT gateway: pushing analytics at the edge
 
Eclipse kura in industry 4.0 david woodard
Eclipse kura in industry 4.0   david woodardEclipse kura in industry 4.0   david woodard
Eclipse kura in industry 4.0 david woodard
 
Building IoT Mashups for Industry 4.0 with Eclipse Kura and Kura Wires
Building IoT Mashups for Industry 4.0 with Eclipse Kura and Kura WiresBuilding IoT Mashups for Industry 4.0 with Eclipse Kura and Kura Wires
Building IoT Mashups for Industry 4.0 with Eclipse Kura and Kura Wires
 
OSGi and Java in Industrial IoT
OSGi and Java in Industrial IoTOSGi and Java in Industrial IoT
OSGi and Java in Industrial IoT
 
IoT Solutions for Smart Energy Smart Grid and Smart Utility Applications
IoT Solutions for Smart Energy Smart Grid and Smart Utility ApplicationsIoT Solutions for Smart Energy Smart Grid and Smart Utility Applications
IoT Solutions for Smart Energy Smart Grid and Smart Utility Applications
 
Vivere del Cambiamento: tracciare la rotta verso l'industria 4.0
Vivere del Cambiamento: tracciare la rotta verso l'industria 4.0Vivere del Cambiamento: tracciare la rotta verso l'industria 4.0
Vivere del Cambiamento: tracciare la rotta verso l'industria 4.0
 
Real World IoT Architectures and Projects with Eclipse IoT
Real World IoT Architectures and Projects with Eclipse IoTReal World IoT Architectures and Projects with Eclipse IoT
Real World IoT Architectures and Projects with Eclipse IoT
 
L’IoT industriale e i vantaggi competitivi della trasformazione digitale
L’IoT  industriale e i vantaggi competitivi della trasformazione digitale L’IoT  industriale e i vantaggi competitivi della trasformazione digitale
L’IoT industriale e i vantaggi competitivi della trasformazione digitale
 
Reshaping Business Through IoT: Key Technology Factors to Consider
Reshaping Business Through IoT: Key Technology Factors to ConsiderReshaping Business Through IoT: Key Technology Factors to Consider
Reshaping Business Through IoT: Key Technology Factors to Consider
 
Industrial IoT Mayhem? Java IoT Gateways to the Rescue
Industrial IoT Mayhem? Java IoT Gateways to the RescueIndustrial IoT Mayhem? Java IoT Gateways to the Rescue
Industrial IoT Mayhem? Java IoT Gateways to the Rescue
 
Eurotech and Red Hat collaboration simplifies Internet of Things integration ...
Eurotech and Red Hat collaboration simplifies Internet of Things integration ...Eurotech and Red Hat collaboration simplifies Internet of Things integration ...
Eurotech and Red Hat collaboration simplifies Internet of Things integration ...
 
Real World IoT Architecture Use Cases
Real World IoT Architecture Use CasesReal World IoT Architecture Use Cases
Real World IoT Architecture Use Cases
 
Simplify Internet of Things with an Intelligent Gateway
Simplify Internet of Things with an Intelligent GatewaySimplify Internet of Things with an Intelligent Gateway
Simplify Internet of Things with an Intelligent Gateway
 
Internet of Things: a reality check
Internet of Things: a reality check Internet of Things: a reality check
Internet of Things: a reality check
 
IoT the driver of Business Innovation: better products, new services and...
IoT the driver of  Business Innovation: better products, new  services  and...IoT the driver of  Business Innovation: better products, new  services  and...
IoT the driver of Business Innovation: better products, new services and...
 

Recently uploaded

Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
UXDXConf
 

Recently uploaded (20)

WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdfAgentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
 
The architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdfThe architecture of Generative AI for enterprises.pdf
The architecture of Generative AI for enterprises.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
Intelligent Gimbal FINAL PAPER Engineering.pdf
Intelligent Gimbal FINAL PAPER Engineering.pdfIntelligent Gimbal FINAL PAPER Engineering.pdf
Intelligent Gimbal FINAL PAPER Engineering.pdf
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
In-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT ProfessionalsIn-Depth Performance Testing Guide for IT Professionals
In-Depth Performance Testing Guide for IT Professionals
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 

Advanced MQTT and Kura - EclipseCON 2014

  • 1. Advanced MQTT and Kura Best Practices for Topic Namespaces in M2M Applications EclipseCon 2014, March 19th
  • 2. IOT MQTT System Topology Sensors Actuators Legacy Systems Smart Machines M2M Multi Services Gateway Human / Machine Interfaces Meters Console/Port al APIs Business Logic
  • 3. Request and Response in MQTT Use cases • Device Firmware/Software Updates – Did the device get the update? When? Was it valid & installed? • Configuration Updates – Same Questions… • Remote Resource Control/Interaction – Device management/Backend business logic needs to start/stop/interact with a device side service • Control of actuators • Dynamic status requests • Remote Command execution • Remote Service Control/Interaction • Other considerations – Extensibility, mutitenancy, client addressing, multiple applications, resource management…
  • 4. MQTT Topic Space Considerations • Data Topics – Used for push of sensor data, metrics, or other data – Example: [account_id]/[client_id]/... • Control Topics – Used for dynamic request/response interactions between clients – Example: CTL/[account_id]/[client_id]/[app_id]/… • Separate data from control topics – Provides increased granularity on ACLs – Allows for segregation of persistent and transient data
  • 5. MQTT Request Verbs • Request – CTL/[account_id]/[client_id]/[app_id]/GET/[resource_id] – CTL/[account_id]/[client_id]/[app_id]/POST/[resource_id] – CTL/[account_id]/[client_id]/[app_id]/PUT/[resource_id] – CTL/[account_id]/[client_id]/[app_id]/DEL/[resource_id] – CTL/[account_id]/[client_id]/[app_id]/EXEC/[resource_id] • Response – CTL/[account_id]/[requester_client_id]/[app_id]/REPLY/[req_id] REST Like
  • 6. Request/Response Example Flow Responder (device1) Requester (manager1) Responder Subscribes on request topic: CTL/kura/device1/CONF-V1/GET/configurations Requester Generates request metadata (for request payload): request_id: 1363603920892 request_client_id: manager1 Subscribes on reply topic: CTL/kura/manager1/CONF-V1/REPLY/1363603920892 Requester Sends MQTT request CTL/kura/device1/CONF-V1/GET/configurations Responder Handles request and generates response using request specific parameters in the payload of the request • [request_id] and [request_client_id] included in request payload • Manditory response code • Optional application specific parameters • Optional logs, exceptions, stacktraces, etc Responder Sends response to requesting client CTL/kura/manager1/CONF-V1/REPLY/1363603920892
  • 7. Response Codes • response_code – 200 (RESPONSE_CODE_OK) – 400 (RESPONSE_CODE_BAD_REQUEST) – 404 (RESPONSE_CODE_NOTFOUND) – 500 (RESPONSE_CODE_ERROR) • response_exception_message – Optional and contains error message if an error occurred • response_stacktrace_message – Optional and contains a stacktrace HTTP Like
  • 8. Kura Cloudlet • Uses Kura Cloud Client – Allows for one MQTT connection across many applications – Built in configurable store/forward of messages on device – Handles callback routing to applications based on [app_id] • Offers simple overrides for request/response operations