MessagePack RPC implementation based on Tornado.
import msgpackrpc
class SumServer:
def sum(x, y):
return x + y
server = msgpackrpc.Server(SumServer())
server.listen(msgpackrpc.Address("localhost", 18800))
server.start()
import msgpackrpc
client = msgpackrpc.Client(msgpackrpc.Address("localhost", 18800))
result = client.call('sum', 1, 2) # = > 3
python setup.py install
or
easy_install msgpack-rpc-python
- msgpack-python (0.1.12)
- tornado (2.1.1)
OS: Mac OS X ver 10.6.8
CPU: Intel Core 2 Duo 2.13GHz
Memory: 4GB 1067MHz DDR3
Request(call/s) | Notify(call/s) | |
---|---|---|
2.7.1 | 3076 | 14182 |
3.2.2 | 2957 | 13472 |
- Add advanced and async return to Server.
- UDP, UNIX Domain support
- Utilities (MultiFuture, SessionPool)
- Support pyev for performance if needed
Author | Masahiro Nakagawa |
Copyright | Copyright (c) 2011- Masahiro Nakagawa |
License | Apache License, Version 2.0 |