msgpack_rpc_server

This is a template for implementing daemonized MessagePack-RPC servers running as a non-priviled user. This is useful if you want or have to start the server as root, for example to read certificates.

You only need to provide a handler class that contains the methods you want the server to implement. See example-server.rb, example-client.rb and haskell/ping.hs.

At the time of writing, logger library seemed to be incompatible with Daemons library. Therefore logging is now implemented in a simple way (stdout).

I created this for my own purposes and I'm running this in small-scale production use, but I'm not familiar with the internals of the MessagePack-RPC library, and there may be something that I have not taken into consideration. Feel free to send suggestions for improvement.

Note: the server needs to be started with root privileges. The example script logs to the directory where the script was started. Uncomment the relevant configuration line in the startup script if you want it to log into /var/log.

sudo ruby examples/server.rb
ruby examples/client.rb
sudo kill `cat rpc-server-template.pid`
rm -f rpc-server-template.log rpc-server-template.output rpc-server-template.pid

Installation

gem install msgpack_rpc_server

Copyright (c) 2011 opiskelijarekisteri-devel. License: LGPLv3. See LICENSE.txt for further details.