MessagePack RPC implementation based on Tornado.
Example
Server
import msgpackrpc class SumServer: def sum(x, y): return x + y server = msgpackrpc.Server(SumServer()) server.listen(msgpackrpc.Address("localhost", 18800)) server.start()
Client
import msgpackrpc client = msgpackrpc.Client(msgpackrpc.Address("localhost", 18800)) result = client.call('sum', 1, 2) # = > 3
Installation
or
easy_install msgpack-rpc-python
Dependent modules
- msgpack-python (0.1.12)
- tornado (2.1.1)
Performance
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 |
TODO
- Add advanced and async return to Server.
- UDP, UNIX Domain support
- Utilities (MultiFuture, SessionPool)
- Support pyev for performance if needed
Copyright
| Author | Masahiro Nakagawa |
| Copyright | Copyright (c) 2011- Masahiro Nakagawa |
| License | Apache License, Version 2.0 |