Agreed with all of the above. Another thing that could maybe happen is have the transport classes less coupled with RiakObjects, RiakClient, and RiakBucket. Right now the whole thing is very circular and it seems that RiakObject basically is a wrapper of the transports, except in a somewhat weird manner.
Shuhao On Tue, Jul 24, 2012 at 9:53 AM, Sean Cribbs <[email protected]> wrote: > Hey riak-users, > > I've begun adding Riak 1.2-related features to the Python client. As I am > doing so, I am reminded about how much technical debt exists in the client, > as discussed at length previously on Github and this mailing list. Because I > know some of you are using the client in production or as a component of > another library, I'd like to assess what risks there are in removing or > changing certain features. Here's my plan: > > Remove all the set_r/get_r-style methods for quorums. Instead, RiakBucket > will have custom object-properties for these that let you set the > corresponding quorums in the bucket-properties, but will not be the sort of > cascading-preference behavior that it is currently. If you want to change a > quorum when fetching, storing, or deleting a key, you can pass it with > keyword arguments to the appropriate method. > Remove the edge-case-ridden ConnectionManager for a pair of resource pools > for each protocol, like what is available in the Ruby client. Access to a > connection would be granted via a 'with' statement, naturally, and the > protocol selected would be based on the stated preference of the user, or on > whether the transport supports the given feature. For example, stats would > always use HTTP. We could also take this opportunity to add error-sensitive > host selection and automatic retries to the client. > Merge the RiakSearch class into the RiakClient class and push some of its > functionality down into the connection classes. > > I intend to make the Python client ready for the 1.2 release without these > refactorings, but I would greatly appreciate your feedback before starting > the above items. > > -- > Sean Cribbs <[email protected]> > Software Engineer > Basho Technologies, Inc. > http://basho.com/ > > > _______________________________________________ > riak-users mailing list > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > _______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
