SlideShare une entreprise Scribd logo
1  sur  71
Télécharger pour lire hors ligne
ØMQ @ NodeJS
ØMQ: Small Pieces for Scalable Software
Fernando D. Alonso
1. Facts about ØMQ
[ ]
Facts about ØMQ
Low level messaging library
○ It is written in C++.
○ A thin layer between application and transport
layers.
○ Message-passing using in-memory queues.
○ Concise API which talks over the ZMTP protocol.
○ Works on top of TCP, IPC, in-memory, and
PGM/EPGM communication protocols.
○ Philosophy: horizontal scalability to reduce points
of failure.
○ Network topology aware. Point to point
communication reduce latencies.
○ Communication is reduced to a few patterns, which
combined are powerful.
○ No need to have a multitenant service.
Facts about ØMQ
A broker is not mandatory
Facts about ØMQ
Messaged oriented communication
○ Messages as first-class citizen. No need to fight
with framing or buffering.
○ You can send multipart messages.
○ Messages are atomic.
○ Asynchronous messaging. A single background I/O
thread does the job for ØMQ sockets.
"A ØMQ message is a discrete unit of data passed between
applications or components of the same application. ØMQ messages
have no internal structure and from the point of view of ØMQ itself
they are considered to be opaque binary data."
Facts about ØMQ
Fast for development
○ Interchangeable transports: e.g, scaling from one
IPC server to a bunch of TCP.
○ Automatic reconnections.
○ Multicore made easy.
○ Provides zmq_poll to read BSD sockets.
○ It doesn't provide message persistence.
○ It doesn't provide data serialization.
○ It doesn't provide data compression.
○ It doesn't provide message encryption.
○ It doesn't provide security mechanisms. Not in the
next version of the ZMTP protocol !
(*) ZTMP 3.0 draft protocol: http://hintjens.com/blog:39
Facts about ØMQ
Aims for simplicity
Facts about ØMQ
Platforms & Languages
○ Bindings for 30+ languages including NodeJS, Ruby,
Python, Java, C, C++, Scala, Erlang, Perl, PHP, .NET.
○ Linux & Windows.
○ Raspberry PI.
○ Android OS.
2. Install
[ , ]
Install
On Linux from source
sudo apt-get install build-essential libtool autoconf automake uuid-dev
wget http://download.zeromq.org/zeromq-3.2.3.tar.gz
tar xvzf zeromq-3.2.3.tar.gz
./configure
make
sudo make install
sudo ldconfig
NOTES:
(*) Check http://download.zeromq.org/ for more versions.
(**) Avoid 3.0.x, 3.1.x, 3.2.0, 3.2.1 versions. They lack backwards
compatibility.
(***) Check ./configure --help for more options on build.
(****) ./configure --with-pgm
Install
On Linux using packages
Libzmq 3.2:
● Debian Sid: sudo apt-get install libzmq3-dev
Libzmq 2.2:
● Debian Wheezy, Jessie, Sid: sudo apt-get install libzmq-dev
● Debian Squeeze backport: http://packages.debian.org/squeeze-
backports/libzmq1
Install
On Mac
brew install zmq
Install
NodeJS bindings
NPM Packages:
● zmq (https://github.com/JustinTulloss/zeromq.node) [RECOMMENDED]
● zmq-stream (https://github.com/Schoonology/zmq-stream)
npm install zmq
node
> var zmq = require('zmq');
Install
Bindings in other languages
Ruby: https://github.com/chuckremes/ffi-rzmq [RECOMMENDED]
Python: https://github.com/zeromq/pyzmq
Erlang: https://github.com/zeromq/erlzmq2
Java JZMQ (uses JNI): https://github.com/zeromq/jzmq
Java JeroMQ: https://github.com/zeromq/jeromq
Scala ZeroMQ: https://github.com/mDialog/scala-zeromq
Scala ZeroMQ (official): https://github.com/valotrading/zeromq-scala-binding
...
3. Sockets
Sockets
Creation
(*) http://api.zeromq.org/3-2:zmq-socket
ØMQ C API
NodeJS ZMQ
req ZMQ_REQ
rep ZMQ_REP
dealer ZMQ_DEALER
router ZMQ_ROUTER
push ZMQ_PUSH
pull ZMQ_PULL
ØMQ C APINodeJS ZMQ
pub ZMQ_PUB
sub ZMQ_SUB
xsub ZMQ_XSUB
xpub ZMQ_XPUB
var sock = zmq.socket
("<SOCKET_TYPE>");
zmq_socket(context, <SOCKET_TYPE>);
Request
Reply
Dealer (async Request)
Router (async Reply)
Push
Pull
Publisher
Subscriber
XSubscriber
XPublisher
Sockets
Bind & Connect
sock.bind("tcp://10.0.0.1:5555",
function(err) {
..
});
sock.connect("tcp://10.0.0.1:5555");
sock.close();
(*) http://api.zeromq.org/3-2:zmq-bind
(**) http://api.zeromq.org/3-2:zmq-connect
(***) http://api.zeromq.org/3-2:zmq-close
ØMQ C API
zmq_bind(socket, "tcp://10.0.0.1:5555");
zmq_connect(socket, "tcp://10.0.0.1:
5555");
zmq_close(socket);
NodeJS ZMQ
Bind
Connect
Close
Sockets
Bind & Connect
sock.bindSync("tcp://10.0.0.1:5555");
// This line gets executed once the socket
// is binded, but it breaks on error.
NodeJS ZMQ
BindSync
Sockets
Transports
TCP
● usage: tcp://<address>:<port>
sock.bind("tcp://192.168.1.100:5555");
sock.bind("tcp://eth0:5555");
// binds to the first eth0 interface
sock.bind("tcp://*:5555");
// binds to all interfaces
(*) http://api.zeromq.org/3-2:zmq-tcp
ØMQ C API
zmq_bind(socket, "tcp://192.168.1.100:
5555");
zmq_bind(socket, "tcp://eth0:5555");
zmq_bind(socket, "tcp://*:5555");
NodeJS ZMQ
Sockets
Transports
Inter-Process Communication (IPC)
● usage: ipc://<address>
● Requires RW permissions on the specified path.
(*) http://api.zeromq.org/3-2:zmq-ipc
sock.bind("ipc:///tmp/mysocket");
ØMQ C API
zmq_bind(socket, "ipc:///tmp/mysocket");
NodeJS ZMQ
Sockets
Transports
In-process Communication (in-memory)
● usage: inproc://<address>
● Requires to bind before connect.
● Max. address name length is 256.
(*) http://api.zeromq.org/3-2:zmq-inproc
(**) Buggy on node-zmq package.
sock.bind("inproc://queue");
ØMQ C API
zmq_bind(socket, "ipc://queue");
NodeJS ZMQ
Sockets
Transports
PGM (multicast)
● usage: pgm://<address>;<multicast_address>:<port>
● Requires sudo privileges to access raw IP sockets.
● Needs ØMQ built with PGM extension (./configure --with-pgm).
(*) http://api.zeromq.org/3-2:zmq-pgm
sock.bind(
"pgm://192.168.1.100;239.192.1.1:3055"
);
ØMQ C API
zmq_bind(socket, "pgm://192.168.1.100;
239.192.1.1:3055");
NodeJS ZMQ
Sockets
Transports
Encapsulated PGM (multicast)
● usage: epgm://<address>;<multicast_address>:<port>
● Needs ØMQ built with PGM extension (./configure --with-pgm).
(*) http://api.zeromq.org/3-2:zmq-pgm
sock.bind(
"epgm://192.168.1.100;239.192.1.1:3055"
);
ØMQ C API
zmq_bind(socket, "epgm://192.168.1.100;
239.192.1.1:3055");
NodeJS ZMQ
Sockets
Send & Receive
Send
sock.send("My message");
sock.on("message", function(msg) {
console.log(msg.toString());
});
(*) http://api.zeromq.org/3-2:zmq-send
(**) http://api.zeromq.org/3-2:zmq-recv
Receive
sock.on("message", function(msg) {
console.log("Received " + msg);
});
// <msg> is a Buffer object.
Sockets
Multipart messages
ØMQ Queue
zmq_send(socket, "Como", 4, ZMQ_SNDMORE);
Messages are atomic
A ØMQ message is composed of 1 or more
message parts.
zmq_send(socket, "andas", 5, 0);
4 ComoPart 1
5 andasPart 2
ØMQ ensures that peers receive either all message parts of a message or
none at all.
The total number of message parts is unlimited except by available memory.
Sockets
Multipart messages
sock.send("First part", zmq.ZMQ_SNDMORE);
sock.send("Second part");
sock.send(["First part", "Second part"]);
Send
var r = sock.send("Como", zmq.
ZMQ_SNDMORE);
console.log(r);
Check the outgoing buffer and socket state:
running this
will output ->
> { type: 'req',
_zmq: { state: 0, onReady:
[Function] },
_outgoing: [ [ <Buffer 43 6f
6d 6f>, 2 ] ],
_shouldFlush: true,
_events: { message: [Function]
} }
Sockets
Multipart messages
sock.on("message", function(first_part, second_part) {
console.log(first_part.toString());
console.log(second_part.toString());
});
sock.on("message", function() {
for(var key in arguments) {
console.log("Part " + key + ": " + arguments[key]);
};
});
Receive
sock.on("message", function() {
var messages = Array.prototype.slice.call(arguments);
messages.forEach(function(msg) {
console.log("Part:" + msg);
});
});
Sockets
Batched messaging
ØMQ Queue
3 Msg
"ØMQ batches messages in opportunistic manner. It sends all the
messages available at the moment in one go. Latency of subsequent
messages will be improved because sending single batch to the card
is faster then sending lot of small messages."
sock.send("Part A",
zmq.ZMQ_SNDMORE);
sock.send("Msg");
sock.send("Part
B");
6 Part A
6 Part B
ØMQ Socket
send
send
send
<write busy>
<write ready>
Client Thread ØMQ I/O Thread
send
batch
<write busy>
Patterns
Plugging multiple transports
Example
var zmq = require('zmq'),
pub = zmq.socket('pub');
pub.bindSync('tcp://127.0.0.1:5555');
pub.bindSync('ipc:///tmp/zmq.sock');
setInterval(function() {
pub.send("I am polyglot!");
}, 1000);
sub = zmq.socket('sub');
sub.connect('ipc:///tmp/zmq.sock');
sub.subscribe('');
sub.on('message', function(msg) {
console.log("Received: " + msg);
});
var zmq = require('zmq'),
sub = zmq.socket(sub');
sub.connect('tcp://127.0.0.1:5555');
sub.subscribe('');
sub.on('message', function(msg) {
console.log(Received: ' + msg);
});
Sockets
Setting Socket Options
(*) http://api.zeromq.org/3-2:zmq-setsockopt
Setsockopt
● usage (NodeJS ZMQ API): sock.setsockopt(<option>, <value>);
or sock.<option> = <value>;
sock.identity = 'monitor-1';
sock.setsockopt('identity', 'monitor-1');
Identity:
// value can be any string up to 255 length.
// identity is required on sockets
// connecting to a Router.
Sockets
Setting Socket Options
Setsockopt
subscriber.subscribe('MUSIC');
subscriber.setsockopt('subscribe',
'MUSIC');
Subscribe:
// sets a message filter for subscriber sockets.
subscriber.unsubscribe('MUSIC');
susbscriber.setsockopt('subscribe',
'POP');
Unsubscribe:
// sets off a message filter for subscriber
sockets.
4. Patterns
[ ]
Patterns
Request / Reply
Synchronous task distribution
Ø REP #1
Ø REP # 2
Ø REQ
< round robin >
...
< synchronous >
Used when each message needs to be matched with a response. Handles
only one message at time. Strict send-recv cycle.
Patterns
Request / Reply
Ø REP #1 Ø REP # 2Ø REQ
send
recv (wait response)
send
recv (dont wait response)
recv (dont wait response)
Patterns
Request / Reply
Ø REP #1 Ø REP # 2Ø REQ
send
recv
recv
send
send
-> REP #1 is down
FAILURE
REQ #1 will not recover !
Patterns
Request / Reply
Basic Request / Reply
var zmq = require('zmq');
reply = zmq.socket('rep');
reply.bind('tcp://127.0.0.1:5555',
function(err) {
if (err) throw err;
}
);
reply.on('message', function(msg) {
console.log('Received: ' + msg);
reply.send('Pong!');
});
var zmq = require('zmq');
request = zmq.socket('req');
request.connect('tcp://127.0.0.1:5555');
request.send('Ping');
request.on('message', function(msg) {
console.log('Response: ' + msg);
});
Patterns
Request / Reply
Dealer socket message delivery
Messages have to be multipart, consisting on: an empty delimiter header,
followed by the content body parts.
sock.send("Body");
Outgoing Queue
0
6 Body
sock.send(new Buffer([]), zmq.
ZMQ_SNDMORE);
send
send
Patterns
Request / Reply
Dealer socket message delivery
Outgoing messages are round-robined among all connected peers.
However, sending depends on the availability of the receiver.
sock.send(
["", "Msg"]);
Outgoing Queue
3 Msg
6 Part A
Peer Socket A Peer Socket B
sock.send(
["", "Bla");
sock.send(
["", "Msg2"]);
send
send
send
To A
To B
To A
send
<write
ready>
<write
busy>
<write
ready>
0
0
4 Msg2
0
Patterns
Request / Reply
Dealer socket message delivery
Reconnections are handled automatically: messages are asynchronously
delivered. Response time does not block sending more messages.
Outgoing Queue Peer Socket A Peer Socket B
send
-> Up again
sock.send(
["", "Msg"]);
3 Msg
sock.send(
["", "Msg2"]);
send
send
To A
To A
0
4 Msg2
0
Patterns
Request / Reply
Ø REP #1 Ø REP # 2Ø DEALER
enqueue < Msg A >
send < Msg B >
-> REP #1 is down
enqueue < Msg C >
send < Msg A, Msg C >
send < Msg D >
Dealer socket handles peer reconnection automatically. It will send
messages that queued for that peer once it has established connection.
Patterns
Request / Reply
> Response from: 5001
> Response from: 5001
> Response from: 5002
> Response from: 5001
> Response from: 5001
> Response from: 5002
> ...
Dealer example
var dealer = zmq.socket('dealer');
dealer.connect('tcp://127.0.0.1:5001');
dealer.connect('tcp://127.0.0.1:5002');
setInterval(function() {
dealer.send(["", "Msg"]);
}, 1000);
dealer.on('message', function(h, msg) {
console.log('Response from: ' + msg);
});
running this
'might' output
->
Patterns
Request / Reply
Router socket messaging
Messages have to be multipart, consisting on: an identity frame, an empty
delimiter frame, followed by the content body parts. This applies to both
incoming and outgoing messages.
sock.send("Body");
Outgoing Queue
0
6 Body
sock.send("", zmq.
ZMQ_SNDMORE);
send
send
sock.send(
"worker-1", zmq.
ZMQ_SNDMORE); 8 worker-1
send
Patterns
Request / Reply
Router is asynchronous
Incoming messages are fair-queued among all connected and available
peers.
Peer Socket A Peer Socket B
ØMQ Router
Incoming Queue
Socketsend
send
send
Patterns
Request / Reply
Router is asynchronous
Receiving depends on the availability of the sender.
Peer Socket A Peer Socket B
ØMQ Router
Incoming Queue
Socketsend
send
Patterns
Push / Pull
Unidirectional data distribution
The Push / Pull pattern fits well on pipelined communication, i.e., when no
response is required for a given message.
Ø
Ø
...
ØØ
Patterns
Push / Pull
Binding the Push socket
Outgoing messages are round-robined among all connected and available
peers.
push.send("Msg");
push.send("Part
B");
Outgoing Queue Peer Socket A Peer Socket B
push.send("Part A",
zmq.ZMQ_SNDMORE);
push.send("Msg2");
3 Msg
6 Part A
6 Part B
4 Msg2
send
send
send
send
Patterns
Push / Pull
Binding the Push socket
Outgoing messages are round-robined among all connected and available
peers.
Outgoing Queue Peer Socket A Peer Socket B
-> Down3 Msg
6 Part A
6 Part B
4 Msg2
send
send
send
push.send("Msg");
push.send("Part
B");
push.send("Part A",
zmq.ZMQ_SNDMORE);
push.send("Msg2");
send
send
send
send
Patterns
Push / Pull
Binding the Push socket
Disconnections and reconnections are handled automatically.
Outgoing Queue Peer Socket A Peer Socket B
4 More
6 Part 1
6 Part 2
5 Other
send
send
send
push.send("More"); send
push.send("Part
2");
push.send("Part 1",
zmq.ZMQ_SNDMORE);
send
send
push.send("Other");
send
Patterns
Push / Pull
Parallel task distribution
Ø PULL #1
Ø PULL # 2
Ø PUSH
< round robin >
...
Patterns
Push / Pull
Passive agents / Monitor
Ø PULLØ PUSH
...
Ø PUSH
Patterns
Push / Pull
Binding the Pull socket
Push's outgoing messages are round-robined among all connected peers.
push.send("Msg");
push.send("Part
B");
Outgoing Queue Peer Socket A Peer Socket B
push.send("Part A",
zmq.ZMQ_SNDMORE);
push.send("Msg2");
send
send
send
send
3 Msg
6 Part A
6 Part B
4 Msg2
To A
To B
To A
Patterns
Push / Pull
Binding the Pull socket
Push's outgoing messages are round-robined among all connected peers.
push.send("Msg");
push.send("Part
B");
Outgoing Queue Peer Socket A Peer Socket B
push.send("Part A",
zmq.ZMQ_SNDMORE);
push.send("Msg2");
send
send
send
send
send
send
send
3 Msg
6 Part A
6 Part B
4 Msg2
To A
To B
To A
Patterns
Push / Pull
Binding the Pull socket
Disconnections and reconnections are handled automatically.
Outgoing Queue Peer Socket A Peer Socket B
send
send
-> Down4 More
6 Part 1
6 Part 2
5 Other
To A
To A
To B
push.send("More"); send
push.send("Part
2");
push.send("Part 1",
zmq.ZMQ_SNDMORE);
send
send
push.send("Other");
send
Patterns
Push / Pull
Binding the Pull socket
Sending is asynchronous, it depends on the availability of the receiver.
Outgoing Queue Peer Socket A Peer Socket B
send
-> Up again
5 OtherTo B
push.send("More"); send
push.send("Part
2");
push.send("Part 1",
zmq.ZMQ_SNDMORE);
send
send
push.send("Other");
send
Patterns
Push / Pull
Ø PULLØ PUSH #1
...
Ø PUSH #2
Active agents / collector pattern
Patterns
Publish / Subscribe
Broadcast data distribution
Ø SUB #1
Ø PUB #1
...
Ø SUB #2
Ø SUB #2
Message distribution
Patterns
Publish / Subscribe
sock.send("Msg");
Outgoing Queue
3 Msg
Subscriber A
Subscriber B
send
send
Outgoing messages are send to each connected and available peers.
Subscriber C
Message distribution
Patterns
Publish / Subscribe
sock.send("Msg");
Outgoing Queue
3 Msg
Subscriber A
Subscriber B
send
send
Outgoing messages are send to each connected and available peers.
Subscriber C
5 Othersock.send("Other");
send
Subscribers can register to a specific topic.
Data filtering
Patterns
Publish / Subscribe
ØMQ Publisher
Subscriber A
Subscriber B
Subscriber C
Outgoing Queue
subscribe AR
subscribe VE
Socket
subscribe VE
Subscribers can register to a specific topic.
Data filtering
Patterns
Publish / Subscribe
ØMQ Publisher
Subscriber A
Subscriber B
Subscriber C
Outgoing Queue
subscribe AR
subscribe VE
Socket
subscribe VE
sock.send("AR
news");
send
7 AR news
send
Subscribers can register to a specific topic.
Data filtering
Patterns
Publish / Subscribe
ØMQ Publisher
Subscriber A
Subscriber B
Subscriber C
Outgoing Queue
subscribe AR
subscribe VE
Socket
subscribe VE
sock.send("VE
news");
send
7 VE news
sendsend
Patterns
Publish / Subscribe
Data filtering example
pub = zmq.socket('pub');
pub.bindSync("tcp://10.0.0.12:3055");
count = 0
setInterval(function() {
pub.send("TEST " + count++);
}, 1000);
sub = zmq.socket('sub');
sub.connect("tcp://10.0.0.12:3055");
sub.subscribe("TEST");
sub.on("message", function(msg) {
console.log("Received: " + msg);
});
// older messages won't be
// received
> TEST 6
> TEST 7
> TEST 8
> TEST 9
> TEST 10
running this
'might'
output ->
Patterns
Publish / Subscribe
Multicast example
var zmq = require('zmq'),
pub = zmq.socket('pub');
pub.bind(
"epgm://10.0.0.12;239.192.1.1:3055",
function(err) {
if(err) throw err;
}
)
setInterval(function() {
pub.send("From pid: " + process.pid);
}, 1000);
var zmq = require('zmq'),
sub = zmq.socket('sub');
sub.connect(
"epgm://10.0.0.13;239.192.1.1:3055"
);
sub.subscribe("");
sub.on('message', function(msg) {
console.log("Received " + msg);
});
(*) See running demo at http://youtu.be/NQrH0SATPk0
"XSUB and XPUB are exactly like SUB and PUB except they expose
subscriptions as special messages."
Data distribution proxy
Patterns
XSUB / XPUB
XSUB/XPUB Proxy
Subscriber A
Subscriber B
Subscriber C
XPUB Socket
XSUB Socket
Publisher A
Publisher B
Publisher C
subscribe
PY
forward
subscription
Messages are forwarded by the proxy to the registered subscribers.
Data distribution proxy
Patterns
XSUB / XPUB
XSUB/XPUB Proxy
Subscriber A
Subscriber B
Subscriber C
XPUB Socket
XSUB Socket
Publisher A
Publisher B
Publisher C
forward
message
send "PY<msg>"
send
5. Useful links
[ ]
Useful Links
Workshop examples
http://github.com/krakatoa/node_zmq_workshop
Useful Links
The Guide
http://zguide.zeromq.org/page:all
Useful Links
Pieter Hintjens personal blog
http://hintjens.com/
Useful Links
API References
http://api.zeromq.org/3-2:zmq-socket
http://api.zeromq.org/3-2:zmq-setsockopt
Preguntas ?
fedario@gmail.com
github.com/krakatoa
Fernando Dario Alonso
Gracias !

Contenu connexe

Tendances

超絶技巧 Ruby プログラミング - Esoteric, Obfuscated Ruby Programming
超絶技巧 Ruby プログラミング - Esoteric, Obfuscated Ruby Programming超絶技巧 Ruby プログラミング - Esoteric, Obfuscated Ruby Programming
超絶技巧 Ruby プログラミング - Esoteric, Obfuscated Ruby Programmingmametter
 
GemFire In Memory Data Grid
GemFire In Memory Data GridGemFire In Memory Data Grid
GemFire In Memory Data GridDmitry Buzdin
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquareApigee | Google Cloud
 
Introduction to Qt Creator
Introduction to Qt CreatorIntroduction to Qt Creator
Introduction to Qt CreatorQt
 
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with Cassandracodecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with CassandraDataStax Academy
 
Battlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integrationBattlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integrationElectronic Arts / DICE
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript IntroductionDmitry Sheiko
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers OverviewVadym Lotar
 
WASM(WebAssembly)入門 ペアリング演算やってみた
WASM(WebAssembly)入門 ペアリング演算やってみたWASM(WebAssembly)入門 ペアリング演算やってみた
WASM(WebAssembly)入門 ペアリング演算やってみたMITSUNARI Shigeo
 
[수정본] 우아한 객체지향
[수정본] 우아한 객체지향[수정본] 우아한 객체지향
[수정본] 우아한 객체지향Young-Ho Cho
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbiteElectronic Arts / DICE
 
The Enterprise Case for Node.js
The Enterprise Case for Node.jsThe Enterprise Case for Node.js
The Enterprise Case for Node.jsNodejsFoundation
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node jsAkshay Mathur
 
Akka-intro-training-public.pdf
Akka-intro-training-public.pdfAkka-intro-training-public.pdf
Akka-intro-training-public.pdfBernardDeffarges
 
Introducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring StatemachineIntroducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring StatemachineVMware Tanzu
 

Tendances (20)

超絶技巧 Ruby プログラミング - Esoteric, Obfuscated Ruby Programming
超絶技巧 Ruby プログラミング - Esoteric, Obfuscated Ruby Programming超絶技巧 Ruby プログラミング - Esoteric, Obfuscated Ruby Programming
超絶技巧 Ruby プログラミング - Esoteric, Obfuscated Ruby Programming
 
GemFire In Memory Data Grid
GemFire In Memory Data GridGemFire In Memory Data Grid
GemFire In Memory Data Grid
 
gRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at SquaregRPC: The Story of Microservices at Square
gRPC: The Story of Microservices at Square
 
Introduction Node.js
Introduction Node.jsIntroduction Node.js
Introduction Node.js
 
Introduction to Qt Creator
Introduction to Qt CreatorIntroduction to Qt Creator
Introduction to Qt Creator
 
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with Cassandracodecentric AG: CQRS and Event Sourcing Applications with Cassandra
codecentric AG: CQRS and Event Sourcing Applications with Cassandra
 
Battlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integrationBattlelog - Building scalable web sites with tight game integration
Battlelog - Building scalable web sites with tight game integration
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
JMS Providers Overview
JMS Providers OverviewJMS Providers Overview
JMS Providers Overview
 
WASM(WebAssembly)入門 ペアリング演算やってみた
WASM(WebAssembly)入門 ペアリング演算やってみたWASM(WebAssembly)入門 ペアリング演算やってみた
WASM(WebAssembly)入門 ペアリング演算やってみた
 
[수정본] 우아한 객체지향
[수정본] 우아한 객체지향[수정본] 우아한 객체지향
[수정본] 우아한 객체지향
 
React/Redux
React/ReduxReact/Redux
React/Redux
 
React
React React
React
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in Frostbite
 
The Enterprise Case for Node.js
The Enterprise Case for Node.jsThe Enterprise Case for Node.js
The Enterprise Case for Node.js
 
Introduction to Node js
Introduction to Node jsIntroduction to Node js
Introduction to Node js
 
Node js Introduction
Node js IntroductionNode js Introduction
Node js Introduction
 
Akka-intro-training-public.pdf
Akka-intro-training-public.pdfAkka-intro-training-public.pdf
Akka-intro-training-public.pdf
 
Mern stack developement
Mern stack developementMern stack developement
Mern stack developement
 
Introducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring StatemachineIntroducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring Statemachine
 

En vedette

Ten Key Factors that Influence Successful Bilingualism and Multilingualism
Ten Key Factors that Influence Successful Bilingualism and MultilingualismTen Key Factors that Influence Successful Bilingualism and Multilingualism
Ten Key Factors that Influence Successful Bilingualism and MultilingualismSjoerd Heeringa
 
On-line book store presentation
On-line book store presentation On-line book store presentation
On-line book store presentation Smit Patel
 
Key Passages in Jane Eyre
Key Passages in Jane EyreKey Passages in Jane Eyre
Key Passages in Jane EyreJ Aragonite
 
4. heredity and evolution
4. heredity and evolution4. heredity and evolution
4. heredity and evolutionAbhay Goyal
 
Internet of Things (IOT) - Technology and Applications
Internet of Things (IOT) - Technology and ApplicationsInternet of Things (IOT) - Technology and Applications
Internet of Things (IOT) - Technology and ApplicationsDr. Mazlan Abbas
 
Environmental Impact Assessment (EIA) report on Rampal 1320MW coal-based powe...
Environmental Impact Assessment (EIA) report on Rampal 1320MW coal-based powe...Environmental Impact Assessment (EIA) report on Rampal 1320MW coal-based powe...
Environmental Impact Assessment (EIA) report on Rampal 1320MW coal-based powe...Probir Bidhan
 
Mathematics high school level quiz - Part I
Mathematics high school level quiz - Part IMathematics high school level quiz - Part I
Mathematics high school level quiz - Part IITfC-Edu-Team
 
61 Beautiful & Inspirational Timeline Cover on Facebook
61 Beautiful & Inspirational Timeline Cover on Facebook61 Beautiful & Inspirational Timeline Cover on Facebook
61 Beautiful & Inspirational Timeline Cover on FacebookConsonaute
 
Thai tech startup ecosystem report 2017
Thai tech startup ecosystem report 2017Thai tech startup ecosystem report 2017
Thai tech startup ecosystem report 2017Techsauce Media
 
Engaging Learners with Technology
Engaging Learners with TechnologyEngaging Learners with Technology
Engaging Learners with TechnologyDean Shareski
 
Vernacular Architecture (Case Study- H.P.)
Vernacular Architecture (Case Study- H.P.)Vernacular Architecture (Case Study- H.P.)
Vernacular Architecture (Case Study- H.P.)divya_binu
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyMike Brittain
 

En vedette (20)

Ten Key Factors that Influence Successful Bilingualism and Multilingualism
Ten Key Factors that Influence Successful Bilingualism and MultilingualismTen Key Factors that Influence Successful Bilingualism and Multilingualism
Ten Key Factors that Influence Successful Bilingualism and Multilingualism
 
On-line book store presentation
On-line book store presentation On-line book store presentation
On-line book store presentation
 
The Power of Color in Branding
The Power of Color in BrandingThe Power of Color in Branding
The Power of Color in Branding
 
Key Passages in Jane Eyre
Key Passages in Jane EyreKey Passages in Jane Eyre
Key Passages in Jane Eyre
 
Biofertilizer
BiofertilizerBiofertilizer
Biofertilizer
 
5000 Sat Words With Definitions
5000 Sat Words With Definitions5000 Sat Words With Definitions
5000 Sat Words With Definitions
 
4. heredity and evolution
4. heredity and evolution4. heredity and evolution
4. heredity and evolution
 
Internet of Things (IOT) - Technology and Applications
Internet of Things (IOT) - Technology and ApplicationsInternet of Things (IOT) - Technology and Applications
Internet of Things (IOT) - Technology and Applications
 
New Time Mgt
New Time MgtNew Time Mgt
New Time Mgt
 
BUSINESS QUIZ -Round 1
 BUSINESS QUIZ -Round 1 BUSINESS QUIZ -Round 1
BUSINESS QUIZ -Round 1
 
Environmental Impact Assessment (EIA) report on Rampal 1320MW coal-based powe...
Environmental Impact Assessment (EIA) report on Rampal 1320MW coal-based powe...Environmental Impact Assessment (EIA) report on Rampal 1320MW coal-based powe...
Environmental Impact Assessment (EIA) report on Rampal 1320MW coal-based powe...
 
Mathematics high school level quiz - Part I
Mathematics high school level quiz - Part IMathematics high school level quiz - Part I
Mathematics high school level quiz - Part I
 
61 Beautiful & Inspirational Timeline Cover on Facebook
61 Beautiful & Inspirational Timeline Cover on Facebook61 Beautiful & Inspirational Timeline Cover on Facebook
61 Beautiful & Inspirational Timeline Cover on Facebook
 
Thai tech startup ecosystem report 2017
Thai tech startup ecosystem report 2017Thai tech startup ecosystem report 2017
Thai tech startup ecosystem report 2017
 
Mri brain anatomy Dr Muhammad Bin Zulfiqar
Mri brain anatomy Dr Muhammad Bin ZulfiqarMri brain anatomy Dr Muhammad Bin Zulfiqar
Mri brain anatomy Dr Muhammad Bin Zulfiqar
 
Lean Manufacturing - Toyota Production System
Lean Manufacturing - Toyota Production SystemLean Manufacturing - Toyota Production System
Lean Manufacturing - Toyota Production System
 
Engaging Learners with Technology
Engaging Learners with TechnologyEngaging Learners with Technology
Engaging Learners with Technology
 
Vernacular Architecture (Case Study- H.P.)
Vernacular Architecture (Case Study- H.P.)Vernacular Architecture (Case Study- H.P.)
Vernacular Architecture (Case Study- H.P.)
 
Principles and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at EtsyPrinciples and Practices in Continuous Deployment at Etsy
Principles and Practices in Continuous Deployment at Etsy
 
BIOLOGICAL DIVERSITY
BIOLOGICAL DIVERSITYBIOLOGICAL DIVERSITY
BIOLOGICAL DIVERSITY
 

Similaire à ZeroMQ with NodeJS

ZeroMQ - Sockets on steroids!
ZeroMQ - Sockets on steroids!ZeroMQ - Sockets on steroids!
ZeroMQ - Sockets on steroids!Pedro Januário
 
Network-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQNetwork-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQICS
 
Overview of ZeroMQ
Overview of ZeroMQOverview of ZeroMQ
Overview of ZeroMQpieterh
 
Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)Anil Madhavapeddy
 
MQTT enabling the smallest things
MQTT enabling the smallest thingsMQTT enabling the smallest things
MQTT enabling the smallest thingsIan Craggs
 
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati Python Ireland
 
CurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious CharactersCurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious Characterspieterh
 
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSBuilding a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSFernando Luiz Cola
 
Where is My Message
Where is My MessageWhere is My Message
Where is My MessageMatt Leming
 
Zmq in context of openstack
Zmq in context of openstackZmq in context of openstack
Zmq in context of openstackYatin Kumbhare
 
NUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioNUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioHajime Tazaki
 
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystemDCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystemrudndccn
 
Exploiting Network Protocols To Exhaust Bandwidth Links 2008 Final
Exploiting Network Protocols To Exhaust Bandwidth Links 2008 FinalExploiting Network Protocols To Exhaust Bandwidth Links 2008 Final
Exploiting Network Protocols To Exhaust Bandwidth Links 2008 Finalmasoodnt10
 
Attacks and their mitigations
Attacks and their mitigationsAttacks and their mitigations
Attacks and their mitigationsMukesh Chaudhari
 
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Jakub Botwicz
 
Bar-BoF session about Simplemux at IETF93, Prague
Bar-BoF session about Simplemux at IETF93, PragueBar-BoF session about Simplemux at IETF93, Prague
Bar-BoF session about Simplemux at IETF93, PragueJose Saldana
 
Mom those things v1
Mom those things v1 Mom those things v1
Mom those things v1 von gosling
 
Where is my MQ message on z/OS?
Where is my MQ message on z/OS?Where is my MQ message on z/OS?
Where is my MQ message on z/OS?Matt Leming
 

Similaire à ZeroMQ with NodeJS (20)

ZeroMQ - Sockets on steroids!
ZeroMQ - Sockets on steroids!ZeroMQ - Sockets on steroids!
ZeroMQ - Sockets on steroids!
 
Network-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQNetwork-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQ
 
Overview of ZeroMQ
Overview of ZeroMQOverview of ZeroMQ
Overview of ZeroMQ
 
Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)Mirage: ML kernels in the cloud (ML Workshop 2010)
Mirage: ML kernels in the cloud (ML Workshop 2010)
 
MQTT enabling the smallest things
MQTT enabling the smallest thingsMQTT enabling the smallest things
MQTT enabling the smallest things
 
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
Python Ireland 2012 - Message brokers and Python by Fernando Ciciliati
 
CurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious CharactersCurveZMQ, ZMTP and other Dubious Characters
CurveZMQ, ZMTP and other Dubious Characters
 
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOSBuilding a QT based solution on a i.MX7 processor running Linux and FreeRTOS
Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS
 
Where is My Message
Where is My MessageWhere is My Message
Where is My Message
 
Zmq in context of openstack
Zmq in context of openstackZmq in context of openstack
Zmq in context of openstack
 
NUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioNUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osio
 
mTCP使ってみた
mTCP使ってみたmTCP使ってみた
mTCP使ってみた
 
Tcpdump
TcpdumpTcpdump
Tcpdump
 
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystemDCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
DCCN 2016 - Tutorial 2 - 4G for SmartGrid ecosystem
 
Exploiting Network Protocols To Exhaust Bandwidth Links 2008 Final
Exploiting Network Protocols To Exhaust Bandwidth Links 2008 FinalExploiting Network Protocols To Exhaust Bandwidth Links 2008 Final
Exploiting Network Protocols To Exhaust Bandwidth Links 2008 Final
 
Attacks and their mitigations
Attacks and their mitigationsAttacks and their mitigations
Attacks and their mitigations
 
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
Cotopaxi - IoT testing toolkit (Black Hat Asia 2019 Arsenal)
 
Bar-BoF session about Simplemux at IETF93, Prague
Bar-BoF session about Simplemux at IETF93, PragueBar-BoF session about Simplemux at IETF93, Prague
Bar-BoF session about Simplemux at IETF93, Prague
 
Mom those things v1
Mom those things v1 Mom those things v1
Mom those things v1
 
Where is my MQ message on z/OS?
Where is my MQ message on z/OS?Where is my MQ message on z/OS?
Where is my MQ message on z/OS?
 

Dernier

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Dernier (20)

Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

ZeroMQ with NodeJS

  • 1. ØMQ @ NodeJS ØMQ: Small Pieces for Scalable Software Fernando D. Alonso
  • 2. 1. Facts about ØMQ [ ]
  • 3. Facts about ØMQ Low level messaging library ○ It is written in C++. ○ A thin layer between application and transport layers. ○ Message-passing using in-memory queues. ○ Concise API which talks over the ZMTP protocol. ○ Works on top of TCP, IPC, in-memory, and PGM/EPGM communication protocols.
  • 4. ○ Philosophy: horizontal scalability to reduce points of failure. ○ Network topology aware. Point to point communication reduce latencies. ○ Communication is reduced to a few patterns, which combined are powerful. ○ No need to have a multitenant service. Facts about ØMQ A broker is not mandatory
  • 5. Facts about ØMQ Messaged oriented communication ○ Messages as first-class citizen. No need to fight with framing or buffering. ○ You can send multipart messages. ○ Messages are atomic. ○ Asynchronous messaging. A single background I/O thread does the job for ØMQ sockets. "A ØMQ message is a discrete unit of data passed between applications or components of the same application. ØMQ messages have no internal structure and from the point of view of ØMQ itself they are considered to be opaque binary data."
  • 6. Facts about ØMQ Fast for development ○ Interchangeable transports: e.g, scaling from one IPC server to a bunch of TCP. ○ Automatic reconnections. ○ Multicore made easy. ○ Provides zmq_poll to read BSD sockets.
  • 7. ○ It doesn't provide message persistence. ○ It doesn't provide data serialization. ○ It doesn't provide data compression. ○ It doesn't provide message encryption. ○ It doesn't provide security mechanisms. Not in the next version of the ZMTP protocol ! (*) ZTMP 3.0 draft protocol: http://hintjens.com/blog:39 Facts about ØMQ Aims for simplicity
  • 8. Facts about ØMQ Platforms & Languages ○ Bindings for 30+ languages including NodeJS, Ruby, Python, Java, C, C++, Scala, Erlang, Perl, PHP, .NET. ○ Linux & Windows. ○ Raspberry PI. ○ Android OS.
  • 10. Install On Linux from source sudo apt-get install build-essential libtool autoconf automake uuid-dev wget http://download.zeromq.org/zeromq-3.2.3.tar.gz tar xvzf zeromq-3.2.3.tar.gz ./configure make sudo make install sudo ldconfig NOTES: (*) Check http://download.zeromq.org/ for more versions. (**) Avoid 3.0.x, 3.1.x, 3.2.0, 3.2.1 versions. They lack backwards compatibility. (***) Check ./configure --help for more options on build. (****) ./configure --with-pgm
  • 11. Install On Linux using packages Libzmq 3.2: ● Debian Sid: sudo apt-get install libzmq3-dev Libzmq 2.2: ● Debian Wheezy, Jessie, Sid: sudo apt-get install libzmq-dev ● Debian Squeeze backport: http://packages.debian.org/squeeze- backports/libzmq1
  • 13. Install NodeJS bindings NPM Packages: ● zmq (https://github.com/JustinTulloss/zeromq.node) [RECOMMENDED] ● zmq-stream (https://github.com/Schoonology/zmq-stream) npm install zmq node > var zmq = require('zmq');
  • 14. Install Bindings in other languages Ruby: https://github.com/chuckremes/ffi-rzmq [RECOMMENDED] Python: https://github.com/zeromq/pyzmq Erlang: https://github.com/zeromq/erlzmq2 Java JZMQ (uses JNI): https://github.com/zeromq/jzmq Java JeroMQ: https://github.com/zeromq/jeromq Scala ZeroMQ: https://github.com/mDialog/scala-zeromq Scala ZeroMQ (official): https://github.com/valotrading/zeromq-scala-binding ...
  • 16. Sockets Creation (*) http://api.zeromq.org/3-2:zmq-socket ØMQ C API NodeJS ZMQ req ZMQ_REQ rep ZMQ_REP dealer ZMQ_DEALER router ZMQ_ROUTER push ZMQ_PUSH pull ZMQ_PULL ØMQ C APINodeJS ZMQ pub ZMQ_PUB sub ZMQ_SUB xsub ZMQ_XSUB xpub ZMQ_XPUB var sock = zmq.socket ("<SOCKET_TYPE>"); zmq_socket(context, <SOCKET_TYPE>); Request Reply Dealer (async Request) Router (async Reply) Push Pull Publisher Subscriber XSubscriber XPublisher
  • 17. Sockets Bind & Connect sock.bind("tcp://10.0.0.1:5555", function(err) { .. }); sock.connect("tcp://10.0.0.1:5555"); sock.close(); (*) http://api.zeromq.org/3-2:zmq-bind (**) http://api.zeromq.org/3-2:zmq-connect (***) http://api.zeromq.org/3-2:zmq-close ØMQ C API zmq_bind(socket, "tcp://10.0.0.1:5555"); zmq_connect(socket, "tcp://10.0.0.1: 5555"); zmq_close(socket); NodeJS ZMQ Bind Connect Close
  • 18. Sockets Bind & Connect sock.bindSync("tcp://10.0.0.1:5555"); // This line gets executed once the socket // is binded, but it breaks on error. NodeJS ZMQ BindSync
  • 19. Sockets Transports TCP ● usage: tcp://<address>:<port> sock.bind("tcp://192.168.1.100:5555"); sock.bind("tcp://eth0:5555"); // binds to the first eth0 interface sock.bind("tcp://*:5555"); // binds to all interfaces (*) http://api.zeromq.org/3-2:zmq-tcp ØMQ C API zmq_bind(socket, "tcp://192.168.1.100: 5555"); zmq_bind(socket, "tcp://eth0:5555"); zmq_bind(socket, "tcp://*:5555"); NodeJS ZMQ
  • 20. Sockets Transports Inter-Process Communication (IPC) ● usage: ipc://<address> ● Requires RW permissions on the specified path. (*) http://api.zeromq.org/3-2:zmq-ipc sock.bind("ipc:///tmp/mysocket"); ØMQ C API zmq_bind(socket, "ipc:///tmp/mysocket"); NodeJS ZMQ
  • 21. Sockets Transports In-process Communication (in-memory) ● usage: inproc://<address> ● Requires to bind before connect. ● Max. address name length is 256. (*) http://api.zeromq.org/3-2:zmq-inproc (**) Buggy on node-zmq package. sock.bind("inproc://queue"); ØMQ C API zmq_bind(socket, "ipc://queue"); NodeJS ZMQ
  • 22. Sockets Transports PGM (multicast) ● usage: pgm://<address>;<multicast_address>:<port> ● Requires sudo privileges to access raw IP sockets. ● Needs ØMQ built with PGM extension (./configure --with-pgm). (*) http://api.zeromq.org/3-2:zmq-pgm sock.bind( "pgm://192.168.1.100;239.192.1.1:3055" ); ØMQ C API zmq_bind(socket, "pgm://192.168.1.100; 239.192.1.1:3055"); NodeJS ZMQ
  • 23. Sockets Transports Encapsulated PGM (multicast) ● usage: epgm://<address>;<multicast_address>:<port> ● Needs ØMQ built with PGM extension (./configure --with-pgm). (*) http://api.zeromq.org/3-2:zmq-pgm sock.bind( "epgm://192.168.1.100;239.192.1.1:3055" ); ØMQ C API zmq_bind(socket, "epgm://192.168.1.100; 239.192.1.1:3055"); NodeJS ZMQ
  • 24. Sockets Send & Receive Send sock.send("My message"); sock.on("message", function(msg) { console.log(msg.toString()); }); (*) http://api.zeromq.org/3-2:zmq-send (**) http://api.zeromq.org/3-2:zmq-recv Receive sock.on("message", function(msg) { console.log("Received " + msg); }); // <msg> is a Buffer object.
  • 25. Sockets Multipart messages ØMQ Queue zmq_send(socket, "Como", 4, ZMQ_SNDMORE); Messages are atomic A ØMQ message is composed of 1 or more message parts. zmq_send(socket, "andas", 5, 0); 4 ComoPart 1 5 andasPart 2 ØMQ ensures that peers receive either all message parts of a message or none at all. The total number of message parts is unlimited except by available memory.
  • 26. Sockets Multipart messages sock.send("First part", zmq.ZMQ_SNDMORE); sock.send("Second part"); sock.send(["First part", "Second part"]); Send var r = sock.send("Como", zmq. ZMQ_SNDMORE); console.log(r); Check the outgoing buffer and socket state: running this will output -> > { type: 'req', _zmq: { state: 0, onReady: [Function] }, _outgoing: [ [ <Buffer 43 6f 6d 6f>, 2 ] ], _shouldFlush: true, _events: { message: [Function] } }
  • 27. Sockets Multipart messages sock.on("message", function(first_part, second_part) { console.log(first_part.toString()); console.log(second_part.toString()); }); sock.on("message", function() { for(var key in arguments) { console.log("Part " + key + ": " + arguments[key]); }; }); Receive sock.on("message", function() { var messages = Array.prototype.slice.call(arguments); messages.forEach(function(msg) { console.log("Part:" + msg); }); });
  • 28. Sockets Batched messaging ØMQ Queue 3 Msg "ØMQ batches messages in opportunistic manner. It sends all the messages available at the moment in one go. Latency of subsequent messages will be improved because sending single batch to the card is faster then sending lot of small messages." sock.send("Part A", zmq.ZMQ_SNDMORE); sock.send("Msg"); sock.send("Part B"); 6 Part A 6 Part B ØMQ Socket send send send <write busy> <write ready> Client Thread ØMQ I/O Thread send batch <write busy>
  • 29. Patterns Plugging multiple transports Example var zmq = require('zmq'), pub = zmq.socket('pub'); pub.bindSync('tcp://127.0.0.1:5555'); pub.bindSync('ipc:///tmp/zmq.sock'); setInterval(function() { pub.send("I am polyglot!"); }, 1000); sub = zmq.socket('sub'); sub.connect('ipc:///tmp/zmq.sock'); sub.subscribe(''); sub.on('message', function(msg) { console.log("Received: " + msg); }); var zmq = require('zmq'), sub = zmq.socket(sub'); sub.connect('tcp://127.0.0.1:5555'); sub.subscribe(''); sub.on('message', function(msg) { console.log(Received: ' + msg); });
  • 30. Sockets Setting Socket Options (*) http://api.zeromq.org/3-2:zmq-setsockopt Setsockopt ● usage (NodeJS ZMQ API): sock.setsockopt(<option>, <value>); or sock.<option> = <value>; sock.identity = 'monitor-1'; sock.setsockopt('identity', 'monitor-1'); Identity: // value can be any string up to 255 length. // identity is required on sockets // connecting to a Router.
  • 31. Sockets Setting Socket Options Setsockopt subscriber.subscribe('MUSIC'); subscriber.setsockopt('subscribe', 'MUSIC'); Subscribe: // sets a message filter for subscriber sockets. subscriber.unsubscribe('MUSIC'); susbscriber.setsockopt('subscribe', 'POP'); Unsubscribe: // sets off a message filter for subscriber sockets.
  • 33. Patterns Request / Reply Synchronous task distribution Ø REP #1 Ø REP # 2 Ø REQ < round robin > ... < synchronous > Used when each message needs to be matched with a response. Handles only one message at time. Strict send-recv cycle.
  • 34. Patterns Request / Reply Ø REP #1 Ø REP # 2Ø REQ send recv (wait response) send recv (dont wait response) recv (dont wait response)
  • 35. Patterns Request / Reply Ø REP #1 Ø REP # 2Ø REQ send recv recv send send -> REP #1 is down FAILURE REQ #1 will not recover !
  • 36. Patterns Request / Reply Basic Request / Reply var zmq = require('zmq'); reply = zmq.socket('rep'); reply.bind('tcp://127.0.0.1:5555', function(err) { if (err) throw err; } ); reply.on('message', function(msg) { console.log('Received: ' + msg); reply.send('Pong!'); }); var zmq = require('zmq'); request = zmq.socket('req'); request.connect('tcp://127.0.0.1:5555'); request.send('Ping'); request.on('message', function(msg) { console.log('Response: ' + msg); });
  • 37. Patterns Request / Reply Dealer socket message delivery Messages have to be multipart, consisting on: an empty delimiter header, followed by the content body parts. sock.send("Body"); Outgoing Queue 0 6 Body sock.send(new Buffer([]), zmq. ZMQ_SNDMORE); send send
  • 38. Patterns Request / Reply Dealer socket message delivery Outgoing messages are round-robined among all connected peers. However, sending depends on the availability of the receiver. sock.send( ["", "Msg"]); Outgoing Queue 3 Msg 6 Part A Peer Socket A Peer Socket B sock.send( ["", "Bla"); sock.send( ["", "Msg2"]); send send send To A To B To A send <write ready> <write busy> <write ready> 0 0 4 Msg2 0
  • 39. Patterns Request / Reply Dealer socket message delivery Reconnections are handled automatically: messages are asynchronously delivered. Response time does not block sending more messages. Outgoing Queue Peer Socket A Peer Socket B send -> Up again sock.send( ["", "Msg"]); 3 Msg sock.send( ["", "Msg2"]); send send To A To A 0 4 Msg2 0
  • 40. Patterns Request / Reply Ø REP #1 Ø REP # 2Ø DEALER enqueue < Msg A > send < Msg B > -> REP #1 is down enqueue < Msg C > send < Msg A, Msg C > send < Msg D > Dealer socket handles peer reconnection automatically. It will send messages that queued for that peer once it has established connection.
  • 41. Patterns Request / Reply > Response from: 5001 > Response from: 5001 > Response from: 5002 > Response from: 5001 > Response from: 5001 > Response from: 5002 > ... Dealer example var dealer = zmq.socket('dealer'); dealer.connect('tcp://127.0.0.1:5001'); dealer.connect('tcp://127.0.0.1:5002'); setInterval(function() { dealer.send(["", "Msg"]); }, 1000); dealer.on('message', function(h, msg) { console.log('Response from: ' + msg); }); running this 'might' output ->
  • 42. Patterns Request / Reply Router socket messaging Messages have to be multipart, consisting on: an identity frame, an empty delimiter frame, followed by the content body parts. This applies to both incoming and outgoing messages. sock.send("Body"); Outgoing Queue 0 6 Body sock.send("", zmq. ZMQ_SNDMORE); send send sock.send( "worker-1", zmq. ZMQ_SNDMORE); 8 worker-1 send
  • 43. Patterns Request / Reply Router is asynchronous Incoming messages are fair-queued among all connected and available peers. Peer Socket A Peer Socket B ØMQ Router Incoming Queue Socketsend send send
  • 44. Patterns Request / Reply Router is asynchronous Receiving depends on the availability of the sender. Peer Socket A Peer Socket B ØMQ Router Incoming Queue Socketsend send
  • 45. Patterns Push / Pull Unidirectional data distribution The Push / Pull pattern fits well on pipelined communication, i.e., when no response is required for a given message. Ø Ø ... ØØ
  • 46. Patterns Push / Pull Binding the Push socket Outgoing messages are round-robined among all connected and available peers. push.send("Msg"); push.send("Part B"); Outgoing Queue Peer Socket A Peer Socket B push.send("Part A", zmq.ZMQ_SNDMORE); push.send("Msg2"); 3 Msg 6 Part A 6 Part B 4 Msg2 send send send send
  • 47. Patterns Push / Pull Binding the Push socket Outgoing messages are round-robined among all connected and available peers. Outgoing Queue Peer Socket A Peer Socket B -> Down3 Msg 6 Part A 6 Part B 4 Msg2 send send send push.send("Msg"); push.send("Part B"); push.send("Part A", zmq.ZMQ_SNDMORE); push.send("Msg2"); send send send send
  • 48. Patterns Push / Pull Binding the Push socket Disconnections and reconnections are handled automatically. Outgoing Queue Peer Socket A Peer Socket B 4 More 6 Part 1 6 Part 2 5 Other send send send push.send("More"); send push.send("Part 2"); push.send("Part 1", zmq.ZMQ_SNDMORE); send send push.send("Other"); send
  • 49. Patterns Push / Pull Parallel task distribution Ø PULL #1 Ø PULL # 2 Ø PUSH < round robin > ...
  • 50. Patterns Push / Pull Passive agents / Monitor Ø PULLØ PUSH ... Ø PUSH
  • 51. Patterns Push / Pull Binding the Pull socket Push's outgoing messages are round-robined among all connected peers. push.send("Msg"); push.send("Part B"); Outgoing Queue Peer Socket A Peer Socket B push.send("Part A", zmq.ZMQ_SNDMORE); push.send("Msg2"); send send send send 3 Msg 6 Part A 6 Part B 4 Msg2 To A To B To A
  • 52. Patterns Push / Pull Binding the Pull socket Push's outgoing messages are round-robined among all connected peers. push.send("Msg"); push.send("Part B"); Outgoing Queue Peer Socket A Peer Socket B push.send("Part A", zmq.ZMQ_SNDMORE); push.send("Msg2"); send send send send send send send 3 Msg 6 Part A 6 Part B 4 Msg2 To A To B To A
  • 53. Patterns Push / Pull Binding the Pull socket Disconnections and reconnections are handled automatically. Outgoing Queue Peer Socket A Peer Socket B send send -> Down4 More 6 Part 1 6 Part 2 5 Other To A To A To B push.send("More"); send push.send("Part 2"); push.send("Part 1", zmq.ZMQ_SNDMORE); send send push.send("Other"); send
  • 54. Patterns Push / Pull Binding the Pull socket Sending is asynchronous, it depends on the availability of the receiver. Outgoing Queue Peer Socket A Peer Socket B send -> Up again 5 OtherTo B push.send("More"); send push.send("Part 2"); push.send("Part 1", zmq.ZMQ_SNDMORE); send send push.send("Other"); send
  • 55. Patterns Push / Pull Ø PULLØ PUSH #1 ... Ø PUSH #2 Active agents / collector pattern
  • 56. Patterns Publish / Subscribe Broadcast data distribution Ø SUB #1 Ø PUB #1 ... Ø SUB #2 Ø SUB #2
  • 57. Message distribution Patterns Publish / Subscribe sock.send("Msg"); Outgoing Queue 3 Msg Subscriber A Subscriber B send send Outgoing messages are send to each connected and available peers. Subscriber C
  • 58. Message distribution Patterns Publish / Subscribe sock.send("Msg"); Outgoing Queue 3 Msg Subscriber A Subscriber B send send Outgoing messages are send to each connected and available peers. Subscriber C 5 Othersock.send("Other"); send
  • 59. Subscribers can register to a specific topic. Data filtering Patterns Publish / Subscribe ØMQ Publisher Subscriber A Subscriber B Subscriber C Outgoing Queue subscribe AR subscribe VE Socket subscribe VE
  • 60. Subscribers can register to a specific topic. Data filtering Patterns Publish / Subscribe ØMQ Publisher Subscriber A Subscriber B Subscriber C Outgoing Queue subscribe AR subscribe VE Socket subscribe VE sock.send("AR news"); send 7 AR news send
  • 61. Subscribers can register to a specific topic. Data filtering Patterns Publish / Subscribe ØMQ Publisher Subscriber A Subscriber B Subscriber C Outgoing Queue subscribe AR subscribe VE Socket subscribe VE sock.send("VE news"); send 7 VE news sendsend
  • 62. Patterns Publish / Subscribe Data filtering example pub = zmq.socket('pub'); pub.bindSync("tcp://10.0.0.12:3055"); count = 0 setInterval(function() { pub.send("TEST " + count++); }, 1000); sub = zmq.socket('sub'); sub.connect("tcp://10.0.0.12:3055"); sub.subscribe("TEST"); sub.on("message", function(msg) { console.log("Received: " + msg); }); // older messages won't be // received > TEST 6 > TEST 7 > TEST 8 > TEST 9 > TEST 10 running this 'might' output ->
  • 63. Patterns Publish / Subscribe Multicast example var zmq = require('zmq'), pub = zmq.socket('pub'); pub.bind( "epgm://10.0.0.12;239.192.1.1:3055", function(err) { if(err) throw err; } ) setInterval(function() { pub.send("From pid: " + process.pid); }, 1000); var zmq = require('zmq'), sub = zmq.socket('sub'); sub.connect( "epgm://10.0.0.13;239.192.1.1:3055" ); sub.subscribe(""); sub.on('message', function(msg) { console.log("Received " + msg); }); (*) See running demo at http://youtu.be/NQrH0SATPk0
  • 64. "XSUB and XPUB are exactly like SUB and PUB except they expose subscriptions as special messages." Data distribution proxy Patterns XSUB / XPUB XSUB/XPUB Proxy Subscriber A Subscriber B Subscriber C XPUB Socket XSUB Socket Publisher A Publisher B Publisher C subscribe PY forward subscription
  • 65. Messages are forwarded by the proxy to the registered subscribers. Data distribution proxy Patterns XSUB / XPUB XSUB/XPUB Proxy Subscriber A Subscriber B Subscriber C XPUB Socket XSUB Socket Publisher A Publisher B Publisher C forward message send "PY<msg>" send
  • 69. Useful Links Pieter Hintjens personal blog http://hintjens.com/