Hi all,

I've got a rough first cut of a modified RiakHttpTransport class. You
can review it here:
  https://github.com/gstein/riak-python-client/commits/newhttp

(note that it includes changes from my 'relax-deps' and 'simplify'
branches; just look at the most recent commit(s))


This code has been tested in very simple form. I haven't done an
extensive series of testing. No multi-thread, multiple hosts, etc. I
*have* verified that the HTTP connection is persistent, as expected,
so it should be much faster than normal. But I don't have any
performance tests to run. ... my hope is that some more experience
Riak python developers can do some testing.

This is just a rough draft for initial review on the approach. It
needs comments and documentation, if people like the direction.

Some comments on the ConnectionManager:

* when creating a ConnectionManager, you can specify multiple hosts
(eg. all the riak servers)
* in a single-threaded environment, only one connection will be opened
right now. my next change will be to pre-open one connection to each
host.
* when new connections are needed (ie. in a multi-threaded
environment), it round-robins across the set of servers
* higher-level logic can remove hosts if they go down (I stlll need to
remove existing conns)
* similarly, hosts can be added as they are discovered or added to the ring


With some more work to pass along multiple hosts to the constructor of
RiakHttpTransport, then the full capability is reached and
RiakHttpReuseTransport and RiakHttpPoolTransport can be removed.

Similar changes can be made in pbc.py to use a ConnectionManager for
connections to the server(s), and RiakPbcCachedTransport can be
removed.

Cheers,
-g

_______________________________________________
riak-users mailing list
[email protected]
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to