SlideShare a Scribd company logo
1 of 10
Download to read offline
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

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Recently uploaded (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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