localshred/protobuf — pull request #34 by localshred (2012-11-06 22:17:39+00:00)
Title: Normalize rpc_server internal option usage. Support PB_CLIENT_TYPE... again.

The options passed from the CLI class behind the rpc_server program were not being read correctly by all the underlyling server runners. In particular, the socket server was looking for a `thread_threshold` option in the given hash when only `threshold` was being passed.

An additional issue is that all options extracted also had fallback defaults spread throughout each server class, in addition to the CLI providing defaults. This only facilitated lazier tests and mostly made debugging difficult.

I've added back the `PB_CLIENT_TYPE` env variable to pass so that client code can specify which "mode" to run connections in:

* zmq
* socket
* evented

Provided options will simply be required against protobuf. The value of the variable is case insensitive.

The final thing we've done is to de-memoize the Protobuf.connector_type to provide better flexibility in switching your connector type after everything has loaded.