Skip to main content

RPC between distributed workers

Project description

A distributed RPC solution based on ØMQ and gevent. Follow the features:

  • A worker can return, yield, raise any picklable object to the remote customer.

  • A customer can invoke to any remote worker in the worker cluster.

  • A customer can invoke to all remote workers in the worker cluster.



The address is The worker will listen at 24600.

import as zmq
import zeronimo

class Application(object):

    def rycbar123(self):
        for word in 'run, you clever boy; and remember.'.split():
            yield word

ctx = zmq.Context()

# make worker
worker_sock = ctx.socket(zmq.PULL)
worker = zeronimo.Worker(Application(), [worker_sock])

# run worker forever


The address is The reply collector will listen at 24601.

import as zmq
import zeronimo

ctx = zmq.Context()

# make remote result collector
collector_sock = ctx.socket(zmq.PULL)
collector = zeronimo.Collector(collector_sock, 'tcp://')

# make customer
customer_sock = ctx.socket(zmq.PUSH)
customer = zeronimo.Customer(customer_sock, collector)

# rpc
remote_result = customer.emit('rycbar123')
for line in remote_result.get():
    print line

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zeronimo-0.7.2.tar.gz (25.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page