Skip to content

Latest commit

 

History

History
80 lines (58 loc) · 1.33 KB

README.md

File metadata and controls

80 lines (58 loc) · 1.33 KB

MessagePack RPC for Python

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

python setup.py install

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.1307614182
3.2.2295713472

TODO

  • Add advanced and async return to Server.
  • UDP, UNIX Domain support
  • Utilities (MultiFuture, SessionPool)
  • Support pyev for performance if needed

Copyright

AuthorMasahiro Nakagawa
CopyrightCopyright (c) 2011- Masahiro Nakagawa
LicenseApache License, Version 2.0