AsyncRPC is a http rpc library, providing a manager similar to the multiprocessing.Basemanager with gevent support.
- AsyncManager allows one to get gevent asynchronous proxies to remote objects
- The manager server(s) offer an html view over the internal state of the server (for debug purposes)
- The manager server is WSGI based, so in the future other wsgi compatible servers can be used (for now, cherrypi and tornado are supported)
This software is the product of research carried out at the University of Zurich and comes with no warranty whatsoever. Have fun!
- The project is not documented (yet)
To install AsyncRPC you have two options: 1) manual installation (install requirements first) or 2) automatic with pip
Install the project manually from source (after downloading it locally):
$ python setup.py install
Install the project with pip:
$ pip install https://github.com/cosminbasca/asyncrpc
Also have a look at the test.sh scripts included in the codebase
For more information have a look at the tests inside asyncrpc.test
from asyncrpc.manager import AsyncManager
class FooClass(object):
def __init__(self, init_bar=-1):
self.bar = init_bar
def foo(self, val):
self.bar += val
return self.bar
class FooManager(AsyncManager):
pass
FooManager.register("FooClass", FooClass)
manager = FooManager(async=True)
manager.start()
my_foo = manager.FooClass(100)
# should print 100
print my_foo.foo(0)
# should print 200
print my_foo.foo(100)
# should print 200
print my_foo.foo(0)
- University of Zurich and the Swiss National Science Foundation for generously funding the research that led to this software.