The Big Transport Refactor - #179
Conversation
* Connection manager and monitor are gone. * PBC transport is broken up into multiple files for clarity. * Outline of streaming operations (currently only PBC). * All requests go through the RiakClient object, which handles the connection pools. Accessing the transport directly is now forbidden. * The client can connect to multiple nodes, and each node has an associated error rate (to be used later when implementing error recovery). The node selected for new connections depends on the error rate. TODO: * Break up HTTP into smaller files and add resource detection (for URL generation). * Add streaming operations to HTTP.
* RiakClient.transport is now RiakClient._transport (via RiakClientTransport mixin). * HTTP and PBC transports define their own version of what are retryable exceptions.
|
@evanmcc @coderoshi @reiddraper @shuhaowu @glassresistor I believe I have resolved all remaining issues on the feature list. Aside from adding a few tests about retries, I believe this is done. |
|
Docs needs to be updated as well. |
There was a problem hiding this comment.
if we're breaking the API, it might be simpler to collapse put and put_new into the same function.
|
Tests all pass on 2.6 and 2.7, code looks fine other than a few quibbles I commented on. |
|
I'll fix those bits in the morning, thanks. Sean Cribbs On Jan 30, 2013, at 7:31 PM, Evan Vigil-McClanahan notifications@github.com wrote:
|
|
Looking at this retrospectively, should Edit: should be 2 element tuple instead of 3. |
|
@shuhaowu |
The internal structure of the client has limited us from doing several important things listed below. This branch is an effort to restructure the internals, while maintaining some amount of API compatibility with the old version, and warning users of deprecated/removed/disabled patterns. The partially-completed items are:
Poolclass, one for each transport type. The monitor never worked anyway!