emqtt/emqtt — pull request #19 by mworrell (2013-11-05 08:03:04+00:00)
Title: Combination of changes: binaries, access control, subscription-monitoring

This is a combination branch of changes we made to emqtt for the use in Zotonic.

Main changes are:

* Use binaries for the topic paths
* Optional access control callback for subscribe and publish actions
* Ensure that any subscribed process Pid is monitored

The binaries for the topic paths make the storage smaller, and manipulation of the topic faster and simpler.
It also uses atoms for the wildcards, which makes tests simpler and faster.

The access control is a simple extra callback (hook), which will be called before any subscribe or publish action is done. In Zotonic this hooks into the ACL and user management (together with the already present authentication callback).

Any subscribing Pid is now monitored, before only the listeners were monitored. The client-monitor gen_server can be safely called multiple times for a subscribing Pid.