Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Zaqar Messaging for Microservices and IoT

vkmc
April 27, 2016

Zaqar Messaging for Microservices and IoT

OpenStack Summit Austin 2016

vkmc

April 27, 2016
Tweet

More Decks by vkmc

Other Decks in Technology

Transcript

  1. 3 TL;DR Messaging and Notifications for OpenStack To produce an

    OpenStack messaging service that affords a variety of distributed application patterns in an efficient, scalable and highly-available manner, and to create and maintain associated Python libraries and documentation. Mission statement
  2. 4 Main goal ...and in OpenStack itself!* It aims to

    connect applications running on the cloud... *for certain scenarios… don’t get too excited
  3. 5 What Zaqar is not - It’s not a replacement

    RabbitMQ or QPID - It’s not a queue service - It’s not an email service
  4. 10 Storage backends - Redis - Ephemeral by default -

    High-throughput - In-memory - MongoDB - HA - Persistent - Disk-backed
  5. 11 Storage MongoDB SQLAlchemy Redis Transport WSGI Juno Kilo Zaqar

    architecture Storage backends and transmission mechanisms supported over time Liberty Storage MongoDB SQLAlchemy (mgmt only) Redis Transport WSGI Websocket Msgpack Mitaka Storage MongoDB SQLAlchemy (mgmt only) Redis Transport WSGI Websocket (beta) Storage MongoDB SQLAlchemy (mgmt only) Redis Transport WSGI Websocket
  6. 13 Notifications Within OpenStack - Polling - Between services -

    To users - Not a replacement for oslo.messaging - Standardize on message format - oslo.versionedobjects
  7. 14 Dead letter queue - A place for failed or

    undeliverable messages - Planned for Newton
  8. 17 Work Queue Sender - Send job - Listen on

    finished queue Worker - Listen on job queue - Receive job Sender Zaqar Worker {“job”: 123} {“job”: 123}
  9. 18 Work Queue Sender - Send job - Listen on

    finished queue Worker - Listen on job queue - Receive job - Claim message Sender Zaqar Worker Claim job 123
  10. 19 Work Queue Sender - Send job - Listen on

    finished queue Worker - Listen on job queue - Receive job - Claim message - Delete message Sender Zaqar Worker Delete job 123
  11. 20 Expiration and Lifetimes - Time-To-Live settings - Subscriptions -

    Claims - Messages - Stale data can be worse than no data
  12. 22 Client Notifications Websockets, email, and webhooks - Web browser

    notifications - Horizon! - Email for people and legacy systems - Webhooks for cross-service collaboration
  13. 23 Messaging for Services Shares lots with work queueing -

    Push or pull - Long-lived messages mean systems can go offline without losing commands
  14. 24 Stack CREATE Instance CREATE Heat Notifications Integrate Heat with

    more workflows Actions Register w/ load balancer Add to inventory system Register metric metadata Zaqar event Listener Can have many listeners
  15. 26 Stack CREATE Create some stuff Heat Hooks Wait before/after

    resource actions Actions Manual verification Legacy systems Hook event Finish extra work Wait for external action Continue CREATE
  16. 28 Signed URLs Narrow, specific credentials - Per action, per

    queue - Write-only or read-only - TTLs too!
  17. 29 Sensor data Many, many writers - Short TTL -

    High volume - Missed messages are fine
  18. 30 Example IoT Application Climate control on campus - Multiple

    buildings - Control systems in every office - Company directive to “go green”
  19. 31 Mobile app Zaqar Server Climate Control Thermostat Web interface

    Websocket connection HTTP API connection Commands Air Conditioner 1 Send metrics Receive commands Air Conditioner 2
  20. 32 Mobile app Zaqar Server Changes Thermostat Web interface Set

    temp to 22C Air Conditioner 1 Air Conditioner 2 Notifications
  21. 33 Mobile app Zaqar Server Changes Thermostat Web interface Air

    Conditioner 1 Air Conditioner 2 23.4C 24C