basho/riak-python-client — pull request #142 by ixmatus (2012-08-09 06:53:13+00:00)
Title: Riak ConnectionManager implemented with gevent.queue.Queue

I tweaked the ConnectionManager API a little bit, used gevent's Queue (riak client operations are now concurrent, thread-safe, and much more lightweight).

The RiakClient args have been shuffled a little bit to make more sense:

To create a connection pool for just one host (default number is 10 connections):
client = riak.RiakClient(host=("10.8.0.1", 8087), transport_class=riak.RiakPbcTransport)

To create a connection pool for multiple hosts:
client = riak.RiakClient(host=[("10.8.0.1", 8087), (10.8.0.2", 8087)], pool_size=2, transport_class=riak.RiakPbcTransport)

Please note: unit tests have not been written for this new functionality and it DOES break backwards compatibility. Even if a pull isn't accepted it may (hopefully) give someone at Basho something to work with in using gevent for the connection pooler.