Modern Messaging for
Distributed Systems
Andrea Rabbaglietti
Agenda
● Who funk is Andrea Rabbaglietti
● Disclaimer
● Pre-requisites
○ Agentful vs. Agentless
○ Scale Up Vs. Scale Out
○ Sync Vs. Async
● IPC / Language interoperability
● Channel
○ HTTP RESTful
○ Custom
● Use Case: Facebook
● One (working & in-production) example
Who funk is Andrea Rabbaglietti
● Computer Science @ DIB alumnus
● ex-CTO Bauzaar.it
● co-founder Serverable.io
● founder JetDeploy.io
● Django Framework contributor
● Software/System Engineer
● Business coach & tutor
Context
Disclaimer
Beware!
Success..
Pre-requisites
Scaling
Stateless
Vs. Stateful
Async vs.
Sync
IPC
Scalability
Scale up
● Make a single node as fast as possible
● Increase clock speed
● Add RAM
● Make disk I/O go faster
Scale out
● Make many nodes work together
● Manage the distributed nodes
● Let the system be fault-tolerant
● Learn how to divide your problems into
independent subproblems
But is that
possible?
Stateful Vs. Stateless
class MyClass:
i = 12345
def f(self):
return 'hello world: ' + self.i
class MyClass:
def f(self):
i = 1234
return 'hello world: ' + self.i
Stateless
sessions
in-memory
cache
Stateful
Sync Vs. Async
programs have an inherent attribute:
each line executes in order
Sync
Async
Async could reveal HELL
Inter-process Communication (IPC)
● File (or memory-mapped file)
● Signal (kill)
● Socket (unix socket)
● Message queue
● Pipe
● Shared Memory
● Message passing
Legenda:
Most operating-systems
POSIX only
Language Interoperability
○ RabbitMQ
○ ZeroMQ
○ Apache Thrift
Facebook
Actor Model
Erlang VM
User (you..)
a2 a2
a3
a4
a5
a1
Java
Actor Model (2)
● No shared state
● Lightweight processes
● Asynchronous message-passing
● Mailboxes to buffer incoming messages
JetDeploy.io
Q & A
thank you so
much guys
Andrea Rabbaglietti
rabbagliettiandrea@gmail.com
GIT repo @
https://github.com/silverfix/gdgipc

Modern Messaging for Distributed Systems