问题
Actually, I\'ve done some work with Pyro and RPyC, but there is more RPC implementation than these two. Can we make a list of them?
Native Python-based protocols:
- PyRo4 (Python Remote Objects)
- RPyC (Remote Python Call)
- Circuits
RPC frameworks with a lot of underlying protocols:
- Spyne (see lightning talk)
JSON-RPC based frameworks:
- python-symmetric-jsonrpc
- rpcbd
- Ladon
- jsonrpc2-zeromq-python
SOAP:
- ZSI
- SOAPpy
- Ladon
- Spyne
XML-RPC based frameworks:
- XMLRPC, using the xmlrpclib and SimpleXMLRPCServer modules in the standard library.
Others:
- WAMP (RPC + PubSub, JSON + MsgPack)
- Twisted Spread
- ZMQRPC (ZeroMQ and BSON based)
- VPy (Versile Python) - AGPLv3
- zerorpc (Python or Node.js, msgpack + ZeroMQ)
回答1:
XML-RPC is part of the Python standard library:
- Python 2: xmlrpclib and SimpleXMLRPCServer
- Python 3: xmlrpc (both client and server)
回答2:
Apache Thrift is a cross-language RPC option developed at Facebook. Works over sockets, function signatures are defined in text files in a language-independent way.
回答3:
Since I've asked this question, I've started using python-symmetric-jsonrpc. It is quite good, can be used between python and non-python software and follow the JSON-RPC standard. But it lacks some examples.
回答4:
You could try Ladon. It serves up multiple web server protocols at once so you can offer more flexibility at the client side.
http://pypi.python.org/pypi/ladon
回答5:
There are some attempts at making SOAP work with python, but I haven't tested it much so I can't say if it is good or not.
SOAPy is one example.
回答6:
We are developing Versile Python (VPy), an implementation for python 2.6+ and 3.x of a new ORB/RPC framework. Functional AGPL dev releases for review and testing are available. VPy has native python capabilities similar to PyRo and RPyC via a general native objects layer (code example). The product is designed for platform-independent remote object interaction for implementations of Versile Platform.
Full disclosure: I work for the company developing VPy.
回答7:
maybe ZSI which implements SOAP. I used the stub generator and It worked properly. The only problem I encountered is about doing SOAP throught HTTPS.
回答8:
You missed out omniORB. This is a pretty full CORBA implementation, so you can also use it to talk to other languages that have CORBA support.
来源:https://stackoverflow.com/questions/1879971/what-is-the-current-choice-for-doing-rpc-in-python