Is there any Python module similar to Distributed Ruby

1k views Asked by At

I am new to Python. Just want to know is there any module in python similar to ruby's drb? Like a client can use object provided by the drb server?

6

There are 6 answers

0
Van Gale On BEST ANSWER

This is generally called "object brokering" and a list of some Python packages in this area can be found by browsing the Object Brokering topic area of the Python Package Index here.

The oldest and most widely used of these is Pyro.

1
mavnn On

Pyro does what I think you're discribing (although I've not used drb).

From the website:

Pyro is short for PYthon Remote Objects. It is an advanced and powerful Distributed Object Technology system written entirely in Python, that is designed to be very easy to use. Never worry about writing network communication code again, when using Pyro you just write your Python objects like you would normally. With only a few lines of extra code, Pyro takes care of the network communication between your objects once you split them over different machines on the network. All the gory socket programming details are taken care of, you just call a method on a remote object as if it were a local object!

0
mthurlin On

I have no idea what drb is, but from the little information you have given, it might be something like the Perspective Broker in Twisted

Introduction

Suppose you find yourself in control of both ends of the wire: you have two programs that need to talk to each other, and you get to use any protocol you want. If you can think of your problem in terms of objects that need to make method calls on each other, then chances are good that you can use twisted's Perspective Broker protocol rather than trying to shoehorn your needs into something like HTTP, or implementing yet another RPC mechanism.

The Perspective Broker system (abbreviated PB, spawning numerous sandwich-related puns) is based upon a few central concepts:

serialization: taking fairly arbitrary objects and types, turning them into a chunk of bytes, sending them over a wire, then reconstituting them on the other end. By keeping careful track of object ids, the serialized objects can contain references to other objects and the remote copy will still be useful.

remote method calls: doing something to a local object and causing a method to get run on a distant one. The local object is called a RemoteReference, and you do something by running its .callRemote method.

0
Anand Chitipothu On

Have you looked at execnet?

http://codespeak.net/execnet/

0
Eric O. Lebigot On

The standard multiprocessing module might do what you want.

0
whatnick On

For parallel processing and distributed computing I use parallel python.