What are the pros and cons of PyRo and RPyC python libs?
Asked Answered
M

2

16

I am looking for a remote procedure call engine for Python and I've found that PyRo (Python Remote Object) and RPyC (Remote Python Call) are both the kind of thing I am searching for.

However, I am curious to know how they compare to each other and what are their pros and cons ?

Mesonephros answered 11/9, 2009 at 11:20 Comment(1)
I didn't know that questions about pros and cons are valid on SO. I'm not against it, just surprised.Leodora
S
22

I personally find them roughly equivalent, but RPyC's author (here) claims more simplicity (and maybe for somebody not all that used to distributed computing he's got a point; I may be too used to it to make a good judge;-). Quoting him...:

although PYRO has a long list of considerable projects in its resumè, I find setting up a server too complicated, if you take into account the amount of code needed, registering objects, running name servers, etc. Not to mention the number of different concepts you have to consider (events, rebinding, with or without name servers, proxy vs. attribute-proxy, names have to be unique, etc.). And it's limited (remote objects must be picklable so you can't work with remote files, etc.). All in all, PYRO has too many special cases and is generally too complicated (yes, I consider this complicated). So of course I'm not an independent reviewer -- but judge for yourself. Isn't RPyC simpler and cleaner?

On the other side of the coin, PyRO does try to provide some security (which RPyC's author claim is too weak anyway, and underlies many of PyRO's claimed complications).

A more independent voice, David Mertz, offers here a good explanation of RPyC (PyRO has been around much longer and David points to previous articles covering it). The "classic mode" is the totally generally and simple and zero-security part, "essentially identical to Pyro (without Pyro's optional security framework)"; the "services mode" is more secure (everything not explicitly permitted is by default forbidden) and, David says, " the service mode is essentially RPC (for example, XML_RPC), modulo some details on calling conventions and implementation". Seems a fair assessment to me.

BTW, I'm not particularly fond of single-language RPC systems -- even if Python covers 99% of my needs (and it's not quite THAT high;-), I love the fact that I can use any language for the remaining 1%... I don't want to give that up at the RPC layer!-) I'd rather do e.g. JSON-RPC via this module, or the like...!-).

Shechem answered 11/9, 2009 at 15:2 Comment(1)
Re. the last paragraph: Pyro recently acquired a native Java and C# implementations, so it's not "python-only". It's called Pyrolite: irmen.home.xs4all.nl/pyroliteSusie
T
12

YMMV, but here are my results from evaluating RPyC, Pyro4 and ZeroRPC for use on an upcoming project. Note that there are not in-depth tests, nor is this intended to be an in-depth review, just my notes on how well each works for the needs of my upcoming project.

ZeroRPC:

  • quite a few dependencies
  • very young project (main support from dotCloud)
  • very little documentation
  • can't access remote object's attributes, just methods
  • Due to lack of attribute access, IPython tab completion does not work on remote objects

Pyro4:

  • Python3 support
  • Nice, plentiful documentation
  • mature project
  • No attribute access/IPython tab completion

Pyro3:

  • support for attribute access (claimed in docs; have not verified)
  • No Python3 support

RPyC:

  • attribute access, IPython tab completion on remote objects
  • Python3 support (claimed in docs; not yet verified)
  • spotty documentation

FWIW:

I tend to like RPyC (maybe because it was my first? ;-), but it's documentation is sparse. It was my first exposure to an RPC, and it took me a long time to "grok" how to get things working. The author (Tomer) is very helpful and does respond to Qs on the Google RPyC list.

If you're new to RPC, I would suggest starting with Pyro and take advantage of its solid documentation to learn the ropes. Move on to RPyC, ZeroRPC, etc. as your needs require.

Tunnage answered 22/12, 2012 at 0:41 Comment(3)
I have recently started a small project named Pizco that does RPC via ZMQ. It needs no modification of the served app and facilitates connecting to Qt signals. It is still a young but you could check it out pizco.readthedocs.org/en/latestConlon
Thanks Hernan, I'll check it out!Tunnage
Note that Pyro4 has learned to do IPython/bpython/etc.. tab-completion on proxy objects a long time ago (it works since 2014). Same for attribute access.Esque

© 2022 - 2024 — McMap. All rights reserved.