Build reliable, traceable, distributed systems with ZeroMQ

A session at PyCon US 2012

Friday 9th March, 2012

2:00pm to 2:40pm (PST)

We will show how to build simple yet powerful RPC code with ZeroMQ, with very few (if any!) modification to existing code. We will build fan-in and fan-out topologies with ZeroMQ special socket types to implement PUB/SUB patterns and scale up job-processing tasks. Thanks to introspection, the resulting services will be self-documented. Finally, we will show how to implement distributed tracing.

We will show how to leverage ZeroMQ to build a simple yet powerful RPC for Python code. We will focus on simplicity, the goal being to expose almost any Python module or class to network calls – with very few (if any!) modification to existing code.

We will then explain the purpose and show some use-cases for ZeroMQ special socket types (PUSH/PULL, PUB/SUB, ROUTER/DEALER) to build fan-in and fan-out topologies, as well as asynchronous processing (to avoid blocking when doing long-running requests). A by-product is the ability to scale up job-processing tasks with a message queue, which can even be made broker-less (you don’t have to deploy heavy machinery if you don’t need it).

We will also demonstrate how introspection can make development and debugging easier, exposing docstrings, and provideing a few command-line helpers to poke, debug, and experiment directly from the shell.

At the end of the talk (or in a separate talk), we will explain how to implement a tracing framework for distributed RPC. By hooking into the right places, we will show how to get full tracebacks and profiling information; more precisely:

how each complex call (involving multiple subcalls) can be accurately traced;
how to handle exceptions, and know easily when and where they happened (without checking dozens of log files);
which complex calls take too long, and where they spend their time (distributed profiling).
Those guidelines are the result of an on-going development work at dotCloud, and actively used and implemented at the core of our leading Platform-as-a-Service offering.

We don’t expect the audience to be familiar with ZeroMQ or RPC. However, it will certainly help to have basic knowledge of serialization (e.g. pickle) and sockets.

About the speaker

This person is speaking at this event.
Jérôme Petazzoni

#docker #lxc #golang #python #nodejs #postgis #django #theremin #kernel #devops #dotcloud … All opinions expressed here are my own. bio from Twitter

Next session in E4

2:40pm Throwing Together Distributed Services With Gevent by Jeff Lindsay

Coverage of this session

Sign in to add slides, notes or videos to this session

Tell your friends!

When

Time 2:00pm2:40pm PST

Date Fri 9th March 2012

Short URL

lanyrd.com/spbzp

Official session page

us.pycon.org/…e/presentation/260/

View the schedule

Share

Topics

See something wrong?

Report an issue with this session