Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

ZeroMQ - Sockets on steroids!

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 30 Anzeige
Anzeige

Weitere Verwandte Inhalte

Diashows für Sie (20)

Ähnlich wie ZeroMQ - Sockets on steroids! (20)

Anzeige

Aktuellste (20)

ZeroMQ - Sockets on steroids!

  1. 1. 0MQ SOCKETS ON STEROIDS!!!
  2. 2. AGENDA Overview Message Oriented Disconnected Async Bindings / Platforms Patterns Request / Reply Async Req /Rep Pub / Sub Pipeline Pairing
  3. 3. WTF IS 0MQ??
  4. 4. WTF IS 0MQ?
  5. 5. WTF IS 0MQ? "ZEROMQ IS WHAT BSD SOCKETS MAY LOOK LIKE IF THEY WERE DESIGN TODAY"
  6. 6. WTF IS 0MQ? ZEROMQ IS A MESSAGE ORIENTED COMMUNICATION LIBRARY!!
  7. 7. OVERVIEW C++ Implementation In-memory queue Atomic Messages API for ZMTP Protocol Zero copy Multipart messages support
  8. 8. OVERVIEW Disconnected Sockets Background I/O to send/receive Queues at sender and receiver Automatic Reconnect Message size limited by memory size
  9. 9. OVERVIEW Async Polling over BSD sockets Batch messages over the wire Fast Over 8M msg/s
  10. 10. OVERVIEW Protocol Support with i nterchangeability inproc: in memory ipc: inter process tcp pgm/epgm: multicast
  11. 11. OVERVIEW Platform support Linux Windows iOS Android Raspabery Pi
  12. 12. OVERVIEW +30 Bindings Ruby Node-js .NET Java C++ Cobol Go ...
  13. 13. OVERVIEW What you will not have out of the box Message Persistency (Pirate pattern) Data serialisation: use what ever you desire msgpack json protobuff ... Data compression Message encryption Security Protocol Include in the next version of ZMTP
  14. 14. API Socket Types REQ: Request REP: Reply DEALER: Async Request/Reply ROUTER: Routing PUB: Publisher SUB: Subscriber PUSH: Pipeline writer PULL: Pipeline consumer
  15. 15. API - NODE JS $ npm install zmq $ node var zmq = require( 'zmq'); var socket = zmq.socket( 'rep'); socket.bind( 'inproc://queue'); // server socket.connect(<span style= "font-family: monospace; font-size: socket. on('message', function(frame1, frame2){}); socket. on('error',function(error){}); socket.send( 'something'); socket.send([ 'multipart1', 'multipart2']);<br>socket.close();
  16. 16. PATTERNS REQUEST / REPLY ASYNC REQUEST / REPLY PUBLISHER / SUBSCRIBERS PIPELINE PAIR
  17. 17. REQUEST / REPLY
  18. 18. DOJO - REQUEST /REPLY
  19. 19. ASYNC REQUEST / REPLY
  20. 20. DOJO - REQUEST /REPLY ASYNC
  21. 21. PUB / SUB
  22. 22. DOJO - PUB /SUB
  23. 23. PIPELINE
  24. 24. PAIR
  25. 25. MAJORDOMO PATTERN http://rfc.zeromq.org/spec:7
  26. 26. DOJO - MAJORDOMO
  27. 27. LINKS 0MQ Guide http://zguide.zeromq.org/page:all 0MQ Guide Examples git clone --depth=1 git://github.com/imatix/zguide.git
  28. 28. ANY DOUBTS
  29. 29. PEDRO JANUÁRIO THANKS!!! http://shared-mind.tumblr.com https://www.linkedin.com/in/pjanuario https://twitter.com/prnjanuario https://github.com/pjanuario
  30. 30. COMING NEXT ZMQ SOA SERVICE SUITE http://pjanuario.github.io/zmq-service-suite-specs/

×