MessagePack (de)serializer implementation for Erlang / msgpack.org[Erlang]
Go to file
2011-04-26 14:25:14 +09:00
ebin .gitignore 2011-04-25 23:23:29 +09:00
priv initial import from git://github.com:msgpack/msgpack-rpc.git 2011-04-25 23:12:54 +09:00
src copyright notice and edoc 2011-04-26 14:25:14 +09:00
test rebar'ized again 2011-04-26 14:16:44 +09:00
.gitignore copyright notice and edoc 2011-04-26 14:25:14 +09:00
crosslang_test.sh rebar'ized again 2011-04-26 14:16:44 +09:00
Makefile initial import from git://github.com:msgpack/msgpack-rpc.git 2011-04-25 23:12:54 +09:00
README.md initial import from git://github.com:msgpack/msgpack-rpc.git 2011-04-25 23:12:54 +09:00
rebar initial import from git://github.com:msgpack/msgpack-rpc.git 2011-04-25 23:12:54 +09:00
rebar.config modified 2011-04-26 01:15:59 +09:00
test_forever.sh rebar'ized again 2011-04-26 14:16:44 +09:00

MessagePack-RPC Erlang

This code is in alpha-release. Synchronous RPC seems working.

prequisites

Erlang runtime system (http://erlang.org/)

client

usage

  1. connect to server with specifying address and port.
  2. append mp_client after some supervisor if you want to keep connection.
  3. close it after RPC call ends.

supervision tree

(your supervisor) - mp_client

mp_client is implemented over gen_server, so you can link mp_client under your supervisor

server

usage

  1. write a module that behaves as a mp_session.

  2. call mp_server:start/1 with your setting:

    [{module, Mod}, {addr, Address}, {port, Port}].

supervision tree

(your supervisor) - mp_server_sup -+- mp_server_srv +- mp_server_sup2 -+- mp_session

see sample_app.erl and sample_srv.erl for detailed usages. the latter is a sample implementation of RPC callbacks, overriding mp_session

install

//checkout

  1. $ git clone git//github.com/msgpack/msgpack-rpc.git
  2. $ cd msgpack-rpc/erlang
  3. $ omake ct # if you have omake
  4. $ make ct # else
  5. escript scripts/setup.es install

TODO

  • error handling -- what if happens when badarg/noproc/bad_clause, and exceptions.
  • (client) automatic random session-id generator
  • (server) multiple identifier (is it needed?)
  • asynchronous-RPC