SlideShare a Scribd company logo
1 of 18
Copyright © 2015 Mirantis, Inc. All rights reserved
www.mirantis.com
ZMQ driver
Current state and further development
Oleksii Zamiatin
Software Engineer
ozamiatin@mirantis.com
IRC, launchpad: ozamiatin
Copyright © 2015 Mirantis, Inc. All rights reserved
Well known HLD
Copyright © 2015 Mirantis, Inc. All rights reserved
Old Driver Message Path
request
reply
Copyright © 2015 Mirantis, Inc. All rights reserved
New Driver Message Path
request
reply
Copyright © 2015 Mirantis, Inc. All rights reserved
What Have Changed
Reduced Proxy-receiver. Dynamic port binding instead of
static + proxy. (Thanks Alec Hothan for the idea! :))
Changed PUSH/PULL+PUB/SUB to REQ/REP BP:zmq-req-
rep
Internal architecture become more flexible - easy to
extend BP:zmq-patterns-usage, BP:zmq-driver-folder
Not depends on eventlet directly BP:zmq-work-without-eventlet
More clear topics management and message serialization
Copyright © 2015 Mirantis, Inc. All rights reserved
Client proxy to avoid blocking
request
reply
cfg.BoolOpt('zmq_use_broker', default=True) - controlled by the option
Copyright © 2015 Mirantis, Inc. All rights reserved
Why we still need a proxy?
Eventlet
libzmq - c-library
BLOCKING call to DEALER by specification
DEALER socket blocks when no listeners present
eventlet.green.zmq - wouldn’t handle the situation…
Copyright © 2015 Mirantis, Inc. All rights reserved
Driver’s architecture from the inside
So-called pipeline. Driver consists of publisher-consumer pairs,
each implements some OM patterns in terms of ZMQ.
Copyright © 2015 Mirantis, Inc. All rights reserved
Driver’s architecture from the inside
Basic publishers/consumers compatibility
Based on ZeroMQ socket types compatibility
Copyright © 2015 Mirantis, Inc. All rights reserved
Driver’s architecture from the inside
Each pipeline serves for some subset of OM patterns. Overlapping takes place.
Based on ZeroMQ socket types compatibility
Patterns:
R - CALL
C - CAST
Cf - CAST+Fanout
N - Notify
Nf - Notify+Fanout
<-,C,Cf,N,Nf>
<R, - , - , - , - >
< - , - ,Cf, - ,Nf>
< - ,C, - ,N, - >
Copyright © 2015 Mirantis, Inc. All rights reserved
Driver’s architecture from the inside
How can the old driver’s pattern fit into current architecture
Patterns:
R - CALL
C - CAST
Cf - CAST+Fanout
N - Notify
Nf - Notify+Fanout
<R, C, Cf, N, Nf>
Hybrid publishers/consumers are possible with current approach
Copyright © 2015 Mirantis, Inc. All rights reserved
Driver’s architecture from the inside
ZmqClient combines publishers in order to make a complete <R,C,Cf,N,Nf>.
Patterns:
R - CALL
C - CAST
Cf - CAST+Fanout
N - Notify
Nf - Notify+Fanout
<-,C,Cf,N,Nf>
<R, - , - , - , - >
< - , - ,Cf, - ,Nf>
< - ,C, - ,N, - >
ZmqServer should match the client with corresponding consumers combination.
Copyright © 2015 Mirantis, Inc. All rights reserved
Driver’s architecture from the inside
Patterns:
R - CALL
C - CAST
Cf - CAST+Fanout
N - Notify
Nf - Notify+Fanout
<-,C,Cf,N,Nf>
<R, - , - , - , - >
< - , - ,Cf, - ,Nf>
< - ,C, - ,N, - >
Just as an example
Copyright © 2015 Mirantis, Inc. All rights reserved
Driver’s architecture Client
Copyright © 2015 Mirantis, Inc. All rights reserved
Driver’s architecture Server
Copyright © 2015 Mirantis, Inc. All rights reserved
Driver’s architecture from the inside
What we have now - the basic “reliable” pipeline to start from
More reliable but
slower
Unreliable but faster
Blocking, so makes sense
only with blocking executor
<-,C,Cf,N,Nf>
<R, - , - , - , - >
Copyright © 2015 Mirantis, Inc. All rights reserved
What ZMQ doesn’t cover
Comparatively to RabbitMQ, ZMQ doesn’t provide:
Nodes discovery and management
Users management and security (just experimental
encryption functionality)
Persistence of messaging queues
Supporting of this functionality makes zmq-driver more
complicated.
Copyright © 2015 Mirantis, Inc. All rights reserved
What should be done for production-readiness
Heartbeats, keeping connections, reconnects
Acks based retries (in progress)
Persistence for queues (at least research possibilities)
Performance optimizations (optimize calls to Redis
implement ttl-based cache)
Testing HA, scaling.
Fix all bugs in the list

More Related Content

Similar to Zmq driver (mitaka summit)

03_MAX-NG_OVERVIEW_CORE.pptx
03_MAX-NG_OVERVIEW_CORE.pptx03_MAX-NG_OVERVIEW_CORE.pptx
03_MAX-NG_OVERVIEW_CORE.pptx
nitin_009
 
Open mic mediaarchitecture_121113
Open mic mediaarchitecture_121113Open mic mediaarchitecture_121113
Open mic mediaarchitecture_121113
a8us
 
Architecting an ibm sametime 9.0 audio visual deployment
Architecting an ibm sametime 9.0 audio visual deploymentArchitecting an ibm sametime 9.0 audio visual deployment
Architecting an ibm sametime 9.0 audio visual deployment
a8us
 
migrating your dcs system to plantpax-phpapp01
migrating your dcs system to plantpax-phpapp01migrating your dcs system to plantpax-phpapp01
migrating your dcs system to plantpax-phpapp01
Shashi Ranjan Singh
 

Similar to Zmq driver (mitaka summit) (20)

CA Service Virtualization 9.0—What's the Latest and Greatest
CA Service Virtualization 9.0—What's the Latest and GreatestCA Service Virtualization 9.0—What's the Latest and Greatest
CA Service Virtualization 9.0—What's the Latest and Greatest
 
Tech talk with lampro mellon an open source solution for accelerating verific...
Tech talk with lampro mellon an open source solution for accelerating verific...Tech talk with lampro mellon an open source solution for accelerating verific...
Tech talk with lampro mellon an open source solution for accelerating verific...
 
SHARE.ORG Orlando 2015
SHARE.ORG Orlando 2015SHARE.ORG Orlando 2015
SHARE.ORG Orlando 2015
 
Proactive Outreach Manager Presentation - pds_user_group_sept_2013_2
Proactive Outreach Manager Presentation - pds_user_group_sept_2013_2Proactive Outreach Manager Presentation - pds_user_group_sept_2013_2
Proactive Outreach Manager Presentation - pds_user_group_sept_2013_2
 
Pivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptxPivotal microservices spring_pcf_skillsmatter.pptx
Pivotal microservices spring_pcf_skillsmatter.pptx
 
03_MAX-NG_OVERVIEW_CORE.pptx
03_MAX-NG_OVERVIEW_CORE.pptx03_MAX-NG_OVERVIEW_CORE.pptx
03_MAX-NG_OVERVIEW_CORE.pptx
 
Approaching hyperconvergedopenstack
Approaching hyperconvergedopenstackApproaching hyperconvergedopenstack
Approaching hyperconvergedopenstack
 
Access Management with Aruba ClearPass
Access Management with Aruba ClearPassAccess Management with Aruba ClearPass
Access Management with Aruba ClearPass
 
Open mic mediaarchitecture_121113
Open mic mediaarchitecture_121113Open mic mediaarchitecture_121113
Open mic mediaarchitecture_121113
 
Architecting an ibm sametime 9.0 audio visual deployment
Architecting an ibm sametime 9.0 audio visual deploymentArchitecting an ibm sametime 9.0 audio visual deployment
Architecting an ibm sametime 9.0 audio visual deployment
 
Vision2015-CBS-1148-Final
Vision2015-CBS-1148-FinalVision2015-CBS-1148-Final
Vision2015-CBS-1148-Final
 
Programmable infrastructure with FlyScript
Programmable infrastructure with FlyScriptProgrammable infrastructure with FlyScript
Programmable infrastructure with FlyScript
 
2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion2015 UJUG, Servlet 4.0 portion
2015 UJUG, Servlet 4.0 portion
 
IBM Systems Technical Symposium Melbourne, 2015
IBM Systems Technical Symposium Melbourne, 2015IBM Systems Technical Symposium Melbourne, 2015
IBM Systems Technical Symposium Melbourne, 2015
 
migrating your dcs system to plantpax-phpapp01
migrating your dcs system to plantpax-phpapp01migrating your dcs system to plantpax-phpapp01
migrating your dcs system to plantpax-phpapp01
 
Mule soft riyadh virtual meetup_25_jul
Mule soft riyadh virtual meetup_25_julMule soft riyadh virtual meetup_25_jul
Mule soft riyadh virtual meetup_25_jul
 
Next Generation Campus Switching: Are You Ready
Next Generation Campus Switching: Are You ReadyNext Generation Campus Switching: Are You Ready
Next Generation Campus Switching: Are You Ready
 
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
Running Kubernetes with Amazon EKS - AWS Online Tech Talks
Running Kubernetes with Amazon EKS - AWS Online Tech TalksRunning Kubernetes with Amazon EKS - AWS Online Tech Talks
Running Kubernetes with Amazon EKS - AWS Online Tech Talks
 
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
[2015-11월 정기 세미나] Cloud Native Platform - Pivotal
 

Recently uploaded

No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
Sheetaleventcompany
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
raffaeleoman
 

Recently uploaded (20)

BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 97 Noida Escorts >༒8448380779 Escort Service
 
Mathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptxMathematics of Finance Presentation.pptx
Mathematics of Finance Presentation.pptx
 
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara ServicesVVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
VVIP Call Girls Nalasopara : 9892124323, Call Girls in Nalasopara Services
 
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptxMohammad_Alnahdi_Oral_Presentation_Assignment.pptx
Mohammad_Alnahdi_Oral_Presentation_Assignment.pptx
 
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
Night 7k Call Girls Noida Sector 128 Call Me: 8448380779
 
Presentation on Engagement in Book Clubs
Presentation on Engagement in Book ClubsPresentation on Engagement in Book Clubs
Presentation on Engagement in Book Clubs
 
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
No Advance 8868886958 Chandigarh Call Girls , Indian Call Girls For Full Nigh...
 
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdfThe workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
The workplace ecosystem of the future 24.4.2024 Fabritius_share ii.pdf
 
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
Andrés Ramírez Gossler, Facundo Schinnea - eCommerce Day Chile 2024
 
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort ServiceBDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
BDSM⚡Call Girls in Sector 93 Noida Escorts >༒8448380779 Escort Service
 
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
Governance and Nation-Building in Nigeria: Some Reflections on Options for Po...
 
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docxANCHORING SCRIPT FOR A CULTURAL EVENT.docx
ANCHORING SCRIPT FOR A CULTURAL EVENT.docx
 
Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)Introduction to Prompt Engineering (Focusing on ChatGPT)
Introduction to Prompt Engineering (Focusing on ChatGPT)
 
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
Re-membering the Bard: Revisiting The Compleat Wrks of Wllm Shkspr (Abridged)...
 
Air breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animalsAir breathing and respiratory adaptations in diver animals
Air breathing and respiratory adaptations in diver animals
 
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night EnjoyCall Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
Call Girl Number in Khar Mumbai📲 9892124323 💞 Full Night Enjoy
 
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptxChiulli_Aurora_Oman_Raffaele_Beowulf.pptx
Chiulli_Aurora_Oman_Raffaele_Beowulf.pptx
 
Report Writing Webinar Training
Report Writing Webinar TrainingReport Writing Webinar Training
Report Writing Webinar Training
 
George Lever - eCommerce Day Chile 2024
George Lever -  eCommerce Day Chile 2024George Lever -  eCommerce Day Chile 2024
George Lever - eCommerce Day Chile 2024
 
Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
 

Zmq driver (mitaka summit)

  • 1. Copyright © 2015 Mirantis, Inc. All rights reserved www.mirantis.com ZMQ driver Current state and further development Oleksii Zamiatin Software Engineer ozamiatin@mirantis.com IRC, launchpad: ozamiatin
  • 2. Copyright © 2015 Mirantis, Inc. All rights reserved Well known HLD
  • 3. Copyright © 2015 Mirantis, Inc. All rights reserved Old Driver Message Path request reply
  • 4. Copyright © 2015 Mirantis, Inc. All rights reserved New Driver Message Path request reply
  • 5. Copyright © 2015 Mirantis, Inc. All rights reserved What Have Changed Reduced Proxy-receiver. Dynamic port binding instead of static + proxy. (Thanks Alec Hothan for the idea! :)) Changed PUSH/PULL+PUB/SUB to REQ/REP BP:zmq-req- rep Internal architecture become more flexible - easy to extend BP:zmq-patterns-usage, BP:zmq-driver-folder Not depends on eventlet directly BP:zmq-work-without-eventlet More clear topics management and message serialization
  • 6. Copyright © 2015 Mirantis, Inc. All rights reserved Client proxy to avoid blocking request reply cfg.BoolOpt('zmq_use_broker', default=True) - controlled by the option
  • 7. Copyright © 2015 Mirantis, Inc. All rights reserved Why we still need a proxy? Eventlet libzmq - c-library BLOCKING call to DEALER by specification DEALER socket blocks when no listeners present eventlet.green.zmq - wouldn’t handle the situation…
  • 8. Copyright © 2015 Mirantis, Inc. All rights reserved Driver’s architecture from the inside So-called pipeline. Driver consists of publisher-consumer pairs, each implements some OM patterns in terms of ZMQ.
  • 9. Copyright © 2015 Mirantis, Inc. All rights reserved Driver’s architecture from the inside Basic publishers/consumers compatibility Based on ZeroMQ socket types compatibility
  • 10. Copyright © 2015 Mirantis, Inc. All rights reserved Driver’s architecture from the inside Each pipeline serves for some subset of OM patterns. Overlapping takes place. Based on ZeroMQ socket types compatibility Patterns: R - CALL C - CAST Cf - CAST+Fanout N - Notify Nf - Notify+Fanout <-,C,Cf,N,Nf> <R, - , - , - , - > < - , - ,Cf, - ,Nf> < - ,C, - ,N, - >
  • 11. Copyright © 2015 Mirantis, Inc. All rights reserved Driver’s architecture from the inside How can the old driver’s pattern fit into current architecture Patterns: R - CALL C - CAST Cf - CAST+Fanout N - Notify Nf - Notify+Fanout <R, C, Cf, N, Nf> Hybrid publishers/consumers are possible with current approach
  • 12. Copyright © 2015 Mirantis, Inc. All rights reserved Driver’s architecture from the inside ZmqClient combines publishers in order to make a complete <R,C,Cf,N,Nf>. Patterns: R - CALL C - CAST Cf - CAST+Fanout N - Notify Nf - Notify+Fanout <-,C,Cf,N,Nf> <R, - , - , - , - > < - , - ,Cf, - ,Nf> < - ,C, - ,N, - > ZmqServer should match the client with corresponding consumers combination.
  • 13. Copyright © 2015 Mirantis, Inc. All rights reserved Driver’s architecture from the inside Patterns: R - CALL C - CAST Cf - CAST+Fanout N - Notify Nf - Notify+Fanout <-,C,Cf,N,Nf> <R, - , - , - , - > < - , - ,Cf, - ,Nf> < - ,C, - ,N, - > Just as an example
  • 14. Copyright © 2015 Mirantis, Inc. All rights reserved Driver’s architecture Client
  • 15. Copyright © 2015 Mirantis, Inc. All rights reserved Driver’s architecture Server
  • 16. Copyright © 2015 Mirantis, Inc. All rights reserved Driver’s architecture from the inside What we have now - the basic “reliable” pipeline to start from More reliable but slower Unreliable but faster Blocking, so makes sense only with blocking executor <-,C,Cf,N,Nf> <R, - , - , - , - >
  • 17. Copyright © 2015 Mirantis, Inc. All rights reserved What ZMQ doesn’t cover Comparatively to RabbitMQ, ZMQ doesn’t provide: Nodes discovery and management Users management and security (just experimental encryption functionality) Persistence of messaging queues Supporting of this functionality makes zmq-driver more complicated.
  • 18. Copyright © 2015 Mirantis, Inc. All rights reserved What should be done for production-readiness Heartbeats, keeping connections, reconnects Acks based retries (in progress) Persistence for queues (at least research possibilities) Performance optimizations (optimize calls to Redis implement ttl-based cache) Testing HA, scaling. Fix all bugs in the list