SlideShare a Scribd company logo
Implementing distributed
     applications with


...and some other bad guys...
         Crippa Francesco
Scalability vs Complexity
Scalability vs Complexity

     what we want




                                      Complexity
1 Thread    2 Threads   2 Nodes   4 Nodes
Scalability vs Complexity

      reality




                                          Complexity
1 Thread        2 Threads   2 Nodes   4 Nodes
The Q in ØMQ
Europycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQ
The Ø in ØMQ
The Ø in ØMQ

Zero Broker
The Ø in ØMQ

Zero Broker

Zero Latency (as close as possible...)
The Ø in ØMQ

Zero Broker

Zero Latency (as close as possible...)

Zero administration
The Ø in ØMQ

Zero Broker

Zero Latency (as close as possible...)

Zero administration

Zero cost
The Ø in ØMQ

Zero Broker

Zero Latency (as close as possible...)

Zero administration

Zero cost

Zero waste
Sockets
Sockets
Unicast transports (inproc, ipc, tcp)
Sockets
Unicast transports (inproc, ipc, tcp)

Multicast transports (pgm or epgm)
Sockets
Unicast transports (inproc, ipc, tcp)

Multicast transports (pgm or epgm)

connect() and bind() are independent
Sockets
Unicast transports (inproc, ipc, tcp)

Multicast transports (pgm or epgm)

connect() and bind() are independent

They are asynchronous (with queues)
Sockets
Unicast transports (inproc, ipc, tcp)

Multicast transports (pgm or epgm)

connect() and bind() are independent

They are asynchronous (with queues)

They express a certain "messaging pattern"
Sockets
Unicast transports (inproc, ipc, tcp)

Multicast transports (pgm or epgm)

connect() and bind() are independent

They are asynchronous (with queues)

They express a certain "messaging pattern"

They are not necessarily one-to-one
...and, of course...

Cross Platform (Linux, Windows, Mac, etc...)

Multiple Languages (c, c++, python, java,
ruby, erlang, php, perl, ada, c#, lua, scala,
objective-c, go, haskell, racket, cl, basic...)

OpenSource
if you have a laptop...



http://www.zeromq.org/

http://zguide.zeromq.org/
Basic Message Patterns
Europycon2011: Implementing distributed application using ZeroMQ
Server
Client
Demo
Basic Message Patterns
Europycon2011: Implementing distributed application using ZeroMQ
Server
Client
Demo
Publisher
                Subscriber
The PUB-SUB socket pair is asynchronous

when you use a SUB socket you must set a
subscription using zmq_setsockopt and
SUBSCRIBE

"slow joiner" symptom
Basic Message Patterns
Europycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQ
Ventilator
Worker
Sink
Demo
Workers

Always synchronize the start of the batch

The ventilator's PUSH socket distributes
tasks to workers (load balancing)

The sink's PULL socket collects results from
workers evenly (fair-queuing)
Fair-Queuing
Basic Message Patterns
Send
messages
  back
Europycon2011: Implementing distributed application using ZeroMQ
Europycon2011: Implementing distributed application using ZeroMQ
Demo
Allowed Patterns

PUB and SUB         DEALER and DEALER

REQ and REP         ROUTER and ROUTER

REQ and ROUTER      PUSH and PULL

DEALER and REP      PAIR and PAIR

DEALER and ROUTER
Scalability
Scalability
Scalability
Scalability
A Publish-Subscribe Proxy
Europycon2011: Implementing distributed application using ZeroMQ
Built-in Devices


QUEUE (request-reply broker.)

FORWARDER (pub-sub proxy server)

STREAMER (like FORWARDER but for
pipeline flows)
Europycon2011: Implementing distributed application using ZeroMQ
Dynamic Scalability...
Dynamic Scalability...
              SCA   LOW
                  LAB
                       ILI
                  !!!!     TY
Dynamic Scalability...
ØMQ : Sockets = Python : C++
Ad

Recommended

ZeroMQ Is The Answer
ZeroMQ Is The Answer
Ian Barber
 
Overview of ZeroMQ
Overview of ZeroMQ
pieterh
 
zeromq
zeromq
Rajan Bhatt
 
gRPC Overview
gRPC Overview
Varun Talwar
 
Network-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQ
ICS
 
RabbitMQ
RabbitMQ
Lenz Gschwendtner
 
REST vs gRPC: Battle of API's
REST vs gRPC: Battle of API's
Luram Archanjo
 
gRPC Design and Implementation
gRPC Design and Implementation
Varun Talwar
 
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
Fred Posner
 
Inter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPC
Shiju Varghese
 
19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ
Woo Young Choi
 
Introduction to gRPC
Introduction to gRPC
Chandresh Pancholi
 
Intro to functional programming
Intro to functional programming
Assaf Gannon
 
The RabbitMQ Message Broker
The RabbitMQ Message Broker
Martin Toshev
 
Go Programming language, golang
Go Programming language, golang
Basil N G
 
Amqp Basic
Amqp Basic
Rahul Agrawal
 
GRPC.pptx
GRPC.pptx
Afzal Juneja
 
gRPC
gRPC
Majid Alaeinia
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streaming
Hung Thai Le
 
RabbitMQ
RabbitMQ
Sarunyhot Suwannachoti
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQ
Dmitriy Samovskiy
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventure
mylittleadventure
 
Go lang
Go lang
Suelen Carvalho
 
HTTP2 and gRPC
HTTP2 and gRPC
Guo Jing
 
Building Netty Servers
Building Netty Servers
Dani Solà Lagares
 
GraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster Everywhere
J On The Beach
 
Golang
Golang
Software Infrastructure
 
Write microservice in golang
Write microservice in golang
Bo-Yi Wu
 
øMQ Vortrag
øMQ Vortrag
mirosso25
 
Introduction to ZeroMQ - eSpace TechTalk
Introduction to ZeroMQ - eSpace TechTalk
Mahmoud Said
 

More Related Content

What's hot (20)

Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
Fred Posner
 
Inter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPC
Shiju Varghese
 
19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ
Woo Young Choi
 
Introduction to gRPC
Introduction to gRPC
Chandresh Pancholi
 
Intro to functional programming
Intro to functional programming
Assaf Gannon
 
The RabbitMQ Message Broker
The RabbitMQ Message Broker
Martin Toshev
 
Go Programming language, golang
Go Programming language, golang
Basil N G
 
Amqp Basic
Amqp Basic
Rahul Agrawal
 
GRPC.pptx
GRPC.pptx
Afzal Juneja
 
gRPC
gRPC
Majid Alaeinia
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streaming
Hung Thai Le
 
RabbitMQ
RabbitMQ
Sarunyhot Suwannachoti
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQ
Dmitriy Samovskiy
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventure
mylittleadventure
 
Go lang
Go lang
Suelen Carvalho
 
HTTP2 and gRPC
HTTP2 and gRPC
Guo Jing
 
Building Netty Servers
Building Netty Servers
Dani Solà Lagares
 
GraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster Everywhere
J On The Beach
 
Golang
Golang
Software Infrastructure
 
Write microservice in golang
Write microservice in golang
Bo-Yi Wu
 
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
Fred Posner
 
Inter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPC
Shiju Varghese
 
19 08-22 introduction to activeMQ
19 08-22 introduction to activeMQ
Woo Young Choi
 
Intro to functional programming
Intro to functional programming
Assaf Gannon
 
The RabbitMQ Message Broker
The RabbitMQ Message Broker
Martin Toshev
 
Go Programming language, golang
Go Programming language, golang
Basil N G
 
HTTP/2 standard for video streaming
HTTP/2 standard for video streaming
Hung Thai Le
 
Introduction to AMQP Messaging with RabbitMQ
Introduction to AMQP Messaging with RabbitMQ
Dmitriy Samovskiy
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventure
mylittleadventure
 
HTTP2 and gRPC
HTTP2 and gRPC
Guo Jing
 
GraalVM: Run Programs Faster Everywhere
GraalVM: Run Programs Faster Everywhere
J On The Beach
 
Write microservice in golang
Write microservice in golang
Bo-Yi Wu
 

Similar to Europycon2011: Implementing distributed application using ZeroMQ (20)

øMQ Vortrag
øMQ Vortrag
mirosso25
 
Introduction to ZeroMQ - eSpace TechTalk
Introduction to ZeroMQ - eSpace TechTalk
Mahmoud Said
 
ZeroMQ in PHP
ZeroMQ in PHP
José Lorenzo Rodríguez Urdaneta
 
Lindsay distributed geventzmq
Lindsay distributed geventzmq
Robin Xiao
 
ZeroMQ: Super Sockets - by J2 Labs
ZeroMQ: Super Sockets - by J2 Labs
James Dennis
 
Scala.io 2013 - Scala and ZeroMQ: Events beyond the JVM
Scala.io 2013 - Scala and ZeroMQ: Events beyond the JVM
RUDDER
 
High scale flavour
High scale flavour
Tomas Doran
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
Ruben Tan
 
NullMQ @ PDX
NullMQ @ PDX
Jeff Lindsay
 
Scala and ZeroMQ: Events beyond the JVM
Scala and ZeroMQ: Events beyond the JVM
RUDDER
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKX
Mike Willbanks
 
Rigadevdays - Communication in a microservice architecture
Rigadevdays - Communication in a microservice architecture
Irina Scurtu
 
ØMQ - An Introduction
ØMQ - An Introduction
Carlo Bernaschina
 
ZeroMQ
ZeroMQ
Stoyan Zhekov
 
Real time system_performance_mon
Real time system_performance_mon
Tomas Doran
 
Modern Distributed Messaging and RPC
Modern Distributed Messaging and RPC
Max Alexejev
 
Scalable Persistent Message Brokering with WSO2 Message Broker
Scalable Persistent Message Brokering with WSO2 Message Broker
Srinath Perera
 
ZeroMQ with NodeJS
ZeroMQ with NodeJS
Fernando Sanabria
 
Pyhug zmq
Pyhug zmq
芳本 林
 
ZeroMQ - Sockets on steroids!
ZeroMQ - Sockets on steroids!
Pedro Januário
 
øMQ Vortrag
øMQ Vortrag
mirosso25
 
Introduction to ZeroMQ - eSpace TechTalk
Introduction to ZeroMQ - eSpace TechTalk
Mahmoud Said
 
Lindsay distributed geventzmq
Lindsay distributed geventzmq
Robin Xiao
 
ZeroMQ: Super Sockets - by J2 Labs
ZeroMQ: Super Sockets - by J2 Labs
James Dennis
 
Scala.io 2013 - Scala and ZeroMQ: Events beyond the JVM
Scala.io 2013 - Scala and ZeroMQ: Events beyond the JVM
RUDDER
 
High scale flavour
High scale flavour
Tomas Doran
 
Distributed app development with nodejs and zeromq
Distributed app development with nodejs and zeromq
Ruben Tan
 
Scala and ZeroMQ: Events beyond the JVM
Scala and ZeroMQ: Events beyond the JVM
RUDDER
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKX
Mike Willbanks
 
Rigadevdays - Communication in a microservice architecture
Rigadevdays - Communication in a microservice architecture
Irina Scurtu
 
Real time system_performance_mon
Real time system_performance_mon
Tomas Doran
 
Modern Distributed Messaging and RPC
Modern Distributed Messaging and RPC
Max Alexejev
 
Scalable Persistent Message Brokering with WSO2 Message Broker
Scalable Persistent Message Brokering with WSO2 Message Broker
Srinath Perera
 
ZeroMQ - Sockets on steroids!
ZeroMQ - Sockets on steroids!
Pedro Januário
 
Ad

Recently uploaded (20)

Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Securing AI - There Is No Try, Only Do!.pdf
Securing AI - There Is No Try, Only Do!.pdf
Priyanka Aash
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Mastering AI Workflows with FME by Mark Döring
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
Lessons Learned from Developing Secure AI Workflows.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Priyanka Aash
 
From Manual to Auto Searching- FME in the Driver's Seat
From Manual to Auto Searching- FME in the Driver's Seat
Safe Software
 
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Using the SQLExecutor for Data Quality Management: aka One man's love for the...
Safe Software
 
Cyber Defense Matrix Workshop - RSA Conference
Cyber Defense Matrix Workshop - RSA Conference
Priyanka Aash
 
Python Conference Singapore - 19 Jun 2025
Python Conference Singapore - 19 Jun 2025
ninefyi
 
The Future of Technology: 2025-2125 by Saikat Basu.pdf
The Future of Technology: 2025-2125 by Saikat Basu.pdf
Saikat Basu
 
Securing Account Lifecycles in the Age of Deepfakes.pptx
Securing Account Lifecycles in the Age of Deepfakes.pptx
FIDO Alliance
 
Securing AI - There Is No Try, Only Do!.pdf
Securing AI - There Is No Try, Only Do!.pdf
Priyanka Aash
 
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
CapCut Pro Crack For PC Latest Version {Fully Unlocked} 2025
pcprocore
 
Mastering AI Workflows with FME by Mark Döring
Mastering AI Workflows with FME by Mark Döring
Safe Software
 
OpenPOWER Foundation & Open-Source Core Innovations
OpenPOWER Foundation & Open-Source Core Innovations
IBM
 
PyCon SG 25 - Firecracker Made Easy with Python.pdf
PyCon SG 25 - Firecracker Made Easy with Python.pdf
Muhammad Yuga Nugraha
 
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC and Open Hackathons Monthly Highlights June 2025
OpenACC
 
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Enhance GitHub Copilot using MCP - Enterprise version.pdf
Nilesh Gule
 
9-1-1 Addressing: End-to-End Automation Using FME
9-1-1 Addressing: End-to-End Automation Using FME
Safe Software
 
2025_06_18 - OpenMetadata Community Meeting.pdf
2025_06_18 - OpenMetadata Community Meeting.pdf
OpenMetadata
 
"Scaling in space and time with Temporal", Andriy Lupa.pdf
"Scaling in space and time with Temporal", Andriy Lupa.pdf
Fwdays
 
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
AI Agents and FME: A How-to Guide on Generating Synthetic Metadata
Safe Software
 
"Database isolation: how we deal with hundreds of direct connections to the d...
"Database isolation: how we deal with hundreds of direct connections to the d...
Fwdays
 
cnc-processing-centers-centateq-p-110-en.pdf
cnc-processing-centers-centateq-p-110-en.pdf
AmirStern2
 
Ad

Europycon2011: Implementing distributed application using ZeroMQ

Editor's Notes