P.S. Actually, I'm thinking about Erlang binding and some kind of controller daemon, which will be able to accept commands as from local commands (af_unix), network (via ssh) or from web-interface. I have been developing such a framework for my work, but I could probably adopt it for such task nicely.