rtbkit/rtbkit — pull request #192 by oktal (2014-06-16 14:08:03+00:00)
Title: Banker rearchitecture

This Pull Request includes a bunch of changes:

SlaveBanker and SlaveBudgetController now communicate with the MasterBanker via REST over HTTP rather than zmq. The MasterBanker still provides a zmq interface so we are backward-compatible but does not register it ZooKeeper anymore
The MasterBanker does not query the monitor anymore. Instead, this is the SlaveBanker that has a health check.
The SlaveBanker is considered in a bad state if it can't synchronize correctly with the MasterBanker either because it can't connect to the MasterBanker or because the persistence of the MasterBanker is down (for example redis crashed)
Since the MasterBanker zmq and http endpoints are not published in ZooKeeper anymore, this means that we now need a way to specify the url for the router and PAS SlaveBanker. A --banker-uri has been added both to the router_runner and post_auction_runner. This means that the user now must specify the correct uri in the launch_sequence (the MasterBanker is not discovered through ZooKeeper anymore).
As of 11/06:

We decided to maintain the compatibility between the MasterBanker and the SlaveBanker. Thus. a new ApplicationLayer class has been introduced. This class defines a communication protocol between the SlaveBanker and the MasterBanker. By default, the SlaveBanker uses the ZmqLayer class that uses the MasterBanker zmq endpoint (discovered back through ZooKeeper).