Python client: three issues

2011-09-04 Thread Greg Stein
Hi all, I'm digging into Riak, and its Python client. I've discovered several issues and would like to provide feedback and get some input, please. 1. I'd like Riak to generate keys for some of my objects, and I'm using the HTTP API. Pretty simple: do a POST, and the Location: header will tell me

Re: Python client: three issues

2011-09-05 Thread Greg Stein
On Sun, Sep 4, 2011 at 22:12, Brett Hoerner wrote: > On Sun, Sep 4, 2011 at 7:05 PM, Greg Stein wrote: >> 1. I'd like Riak to generate keys for some of my objects, and I'm >> using the HTTP API. Pretty simple: do a POST, and the Location: header >> will tell me t

more Python client questions

2011-09-05 Thread Greg Stein
I've got a couple more questions: 1. Why is "pycurl" used in the http transport? What benefits does it offer? Based on reading the code, I see no additional functionality, so I don't understand why this complexity exists. I'd like to submit a changeset that just removes it, but would like to under

Re: more Python client questions

2011-09-05 Thread Greg Stein
ving the static values? > (just curious)* > > <http://www.loomlearning.com/> > Jonathan Langevin > Systems Administrator > Loom Inc. > Wilmington, NC: (910) 241-0433 - jlange...@loomlearning.com - > www.loomlearning.com - Skype: intel352 > * > > > On Mo

Re: Python client: three issues

2011-09-05 Thread Greg Stein
On Mon, Sep 5, 2011 at 16:14, Mark Phillips wrote: >... > I just wanted to jump in here and reiterate that patches, issues, and > opinions about how the python code works/should work are all > encouraged. Mathias Meyer and Jared Morrow (among others) have been > handling issues, pull requests, rel

incorrect link, or missing download

2011-09-05 Thread Greg Stein
Hello, I went to download Riak for Mac OS, and started to follow the instructions on: http://wiki.basho.com/Installing-on-Mac-OS-X.html It says to download: http://downloads.basho.com/riak/riak-0.14/riak-0.14.2-osx-i386.tar.gz However, that resource does not exist. There is only 0.14.0: ht

Re: incorrect link, or missing download

2011-09-05 Thread Greg Stein
1 or 0.14.2.   OSX packaging has been added to riak mainline now > though, so all future releases will be built for OSX.   For now, you can > produce your own binaries in the way I mentioned above. > Sorry for the inconvenience and confusion. > -Jared > > On Mon, Sep 5, 2011 at 8

Review request: revamped http transport

2011-09-07 Thread Greg Stein
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 bee

Re: Review request: revamped http transport

2011-09-07 Thread Greg Stein
On Wed, Sep 7, 2011 at 20:42, Brett Hoerner wrote: > Greg, can you make a Github pull request from your branch? > > It'd be easier to review the commits together (well, git log is easy) > but more importantly comment in-line. Done: https://github.com/basho/riak-python-client/pull/56 Thanks! -g

Python transports

2011-09-08 Thread Greg Stein
Hey, all... After a couple comments on my recent work, and some archaeology on the Python/Riak work over the past month... I've realized that I might have a very different view of RiakTransport compared to what I'm seeing in the current work. I figured it best to bring that to the forefront and di

Re: Riak 1.0 pre-release series

2011-09-08 Thread Greg Stein
On Wed, Sep 7, 2011 at 19:24, David Smith wrote: >... > The first stage is "pre-release" (aka PR) builds that represent the > feature-complete Riak 1.0, with minor cleanup and tweaks still > ongoing. You WILL find some rough edges with packaging and the > features -- we're still working through th

Re: Riak 1.0 pre-release series

2011-09-08 Thread Greg Stein
On Thu, Sep 8, 2011 at 07:47, David Smith wrote: > On Thu, Sep 8, 2011 at 5:41 AM, Greg Stein wrote: > >> I just checked out the link (provided below) and did not find a >> *source* distribution. Could you work that into the distribution? > > Yes, there should be one of

Re: Python transports

2011-09-08 Thread Greg Stein
e ring for > particular operations is the best practice. But it may be necessary to do so > in order to validate and do certain types of testing to prove or disprove > certain access patterns. > -phil > > On Thu, Sep 8, 2011 at 7:31 AM, Greg Stein wrote: >> >> Hey, all

Re: Riak 1.0 pre-release series

2011-09-08 Thread Greg Stein
ut the lack of a source package, that was my oversight.   I just > uploaded one to downloads.basho.com. > Thanks for the feedback, > -Jared > On Thu, Sep 8, 2011 at 5:52 AM, Greg Stein wrote: >> >> On Thu, Sep 8, 2011 at 07:47, David Smith wrote: >> > On Thu, Sep

Re: Python transports

2011-09-08 Thread Greg Stein
o your changes make anything new possible or are they just about cleanup? > > > > On Thu, Sep 8, 2011 at 5:17 AM, Greg Stein wrote: >> Yup, agreed. I can certainly see use-cases where a client may have >> particular knowledge about data/server locality, and wants to open >

Re: Python transports

2011-09-10 Thread Greg Stein
Hi all, I've been putting more thought into this problem, particularly in contrast to the "client manages N transport [connections]." I believe that the latter is not very workable given the variance in underlying transports. Not enough information is available to the client to manage the connecti

Question about Content-Type

2011-09-10 Thread Greg Stein
Hey all, I just ran into a questionable situation. On the following doc page: http://wiki.basho.com/HTTP-Store-Object.html It says: " Important headers: Content-Type must be set for the stored object. Set what you expect to receive back when next requesting it. " So I ran the following test v

[RFC] Python client: move to properties

2011-09-14 Thread Greg Stein
Hi all, There are some non-Pythonic patterns in riak-python-client that should be pretty easy to switch. Things like client.get_r() and client.set_r() are kinda silly. Python long ago moved past the getter/setter paradigm, with the notion of directly exposing instance attributes. As Guido has said

Re: [RFC] Python client: move to properties

2011-09-15 Thread Greg Stein
On Wed, Sep 14, 2011 at 10:40, Russell Brown wrote: > > On 14 Sep 2011, at 12:37, Mathias Meyer wrote: > >> The short answer: yes, we can and we should. I had that on my radar for a >> while too, because it felt un-Pythonic. >> >> As for deprecation, there's no specific rule for the Python client

Re: Anyone going to Surge?

2011-09-25 Thread Greg Stein
I'll be there Wednesday/Thursday. Not attending the conference itself, but "around" (hanging in the hallway or the bar). On Sun, Sep 25, 2011 at 20:00, Mark Phillips wrote: > I mentioned this in Friday's Recap but I figured it was worth asking > again: anyone going to Surge [1] next week? I'll be

Re: Running the python client's test suite

2011-10-03 Thread Greg Stein
Your search/luwak tests are failing, presumably because those options are not enabled in your Riak installation. You can disable them in the test suite by doing: $ SKIP_SEARCH=1 SKIP_LUWAK=1 python setup.py test You also seem to be running into a problem with leftover keys in one of the test buck

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Greg Stein
I'm with Kyle on this one. Even better, my 'newhttp' branch on Github enables this kind of multiple-connection and automatic fail-over. That branch does have a basic sketch for automatic addition/removal of Riak nodes as you manipulate your cluster. I'll need it one day, but not "now", so I haven'

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Greg Stein
On Oct 4, 2011 7:04 PM, "Mike Oxford" wrote: > > On Tue, Oct 4, 2011 at 3:59 PM, Greg Stein wrote: > > Regarding security: it is the same for option A and B and C (you're > > just shifting stuff around, but it is pretty much all the same). Put > > your we

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Greg Stein
On Oct 4, 2011 7:01 PM, "Mike Oxford" wrote: > > You'll want to run protobufs if you're looking to optimize your > response time; HTTP sockets (even to localhost) will require much more > overhead and time. Hmm? The protocol seems moot, compared to inter-node comms when r > 1. Protocol parsing ju

Re: Have Riak servers in separate cluster behind a load balancer, or on same machines as web server?

2011-10-04 Thread Greg Stein
P > setup/teardown latency at either end of a request. In read-write heavy > apps, protobufs outperforms HTTP in throughput by 2x or more, against > objects of 500-4000 bytes. That's with the ruby client; ymmv. > > --Kyle > > On 10/04/2011 07:18 PM, Greg Stein wrote: >

Hey, Python client users

2011-10-15 Thread Greg Stein
Hey all, The Basho folks have been slow to integrate changes, given their busy schedule with the 1.0 release. I've had a couple branches hanging out for a while to deal with HTTP problems and to deal with Issue #53. They've been separate for better review/merging by Basho, but it finally created t

Re: Hey, Python client users

2011-10-18 Thread Greg Stein
On Mon, Oct 17, 2011 at 15:13, Russell Brown wrote: > > On 16 Oct 2011, at 06:18, Greg Stein wrote: > >> Hey all, >> >> The Basho folks have been slow to integrate changes, given their busy >> schedule with the 1.0 release. > > This is true. Sorry. But we ar

Re: Hey, Python client users

2011-10-18 Thread Greg Stein
On Tue, Oct 18, 2011 at 10:53, Soren Hansen wrote: > 2011/10/16 Greg Stein : >> Anyhow, enough description. If you're using Python, then I'd highly >> recommend: >>  https://github.com/gstein/riak-python-client/tree/proper >> >> I hope that helps, a

Re: Hey, Python client users

2011-10-20 Thread Greg Stein
On Oct 18, 2011 11:12 AM, "Greg Stein" wrote: >... > The short answer: my branch puts connection management into the > transport, and Brett's patches puts that into the client. A decision > needs to be made, and that will determine future work. I've previously &

Re: Hey, Python client users

2011-10-20 Thread Greg Stein
On Oct 20, 2011 7:44 AM, "Russell Brown" wrote: >... > I had a chat with Reid Draper about it (he is much more pythonic than me), he concurs. I just need to do a bit more reading through the code, and unless anyone here objects (anyone? class? anyone?), I'll start work at merging your fork into th

Re: key garbage collection

2011-11-03 Thread Greg Stein
On Thu, Nov 3, 2011 at 02:39, Justin Karneges wrote: >... > Say you have an operation that requires creating two keys, A and B, and you > succeed in creating A but fail in creating B.  How do you delete A after the > fact?  I have two ideas: > > 1) Run periodic MapReduce operations that do full db

Re: Problem installing Riak Python client

2011-11-10 Thread Greg Stein
On Thu, Nov 10, 2011 at 11:51, Nate Lawson wrote: >... > BTW, are there any plans for the Riak python client to use the protobuf C > library directly via ctypes? The pure python implementation of protobuf seems > a little slow. Not that I've seen. I plan to use the HTTP interface because I can

Re: Problem installing Riak Python client

2011-11-10 Thread Greg Stein
On Nov 10, 2011 4:26 PM, "Nate Lawson" wrote: > > > On Nov 10, 2011, at 4:04 PM, Greg Stein wrote: > > > On Thu, Nov 10, 2011 at 11:51, Nate Lawson wrote: > >> ... > >> BTW, are there any plans for the Riak python client to use the protobuf

Re: Luwak PUT Content-Range

2011-11-29 Thread Greg Stein
On Nov 29, 2011 5:08 AM, "John Axel Eriksson" wrote: > > Is it possible to incrementally add to a file in Luwak using PUT and the Content-Range header. I just assumed that it was but I can't seem to > get the expected results, it just overwrites whatever the key contents were before. The reason I

Re: Connection Pooling with the python-riak-client

2012-01-23 Thread Greg Stein
On Fri, Jan 20, 2012 at 15:53, Michael Clemmons wrote: >... > I've decided to go back and cleanup that approach and reapply it to the > current master branch.  To my surprise I found that the ConnectionManager > supports multiple connections and has the tools to add and remove them. > Looking at t

Re: Connection Pooling with the python-riak-client

2012-01-24 Thread Greg Stein
On Tue, Jan 24, 2012 at 12:34, Michael Clemmons wrote: > Greg, > Your amazing thanks.  In my application its failing on the start of the > application, I do not believe while trying to do a request but its possible > let me grok and get back to you with some trace backs. Sounds good. I just looke

Re: Python Client Thread Safe?

2012-02-27 Thread Greg Stein
IIRC, that error was seen when connecting to Riak 0.14.0. What version of Riak are you connecting to? I might also suggest using the current, unreleased Python client from the master branch on GitHub. It has much better support for threads and persistent connections. Just don't use variant client_

Re: Python Client Thread Safe?

2012-02-27 Thread Greg Stein
jects to get access to Objects, and keep those per-thread. The underlying transport will manage multiple connections, persistently, in a thread-safe manner. (and I'm unclear on threading issues for the 1.3.0 python client) Cheers, -g On Mon, Feb 27, 2012 at 22:37, Greg Stein wrote: &g

Re: licenses (was Re: riakkit, a python riak object mapper, has hit beta!(

2012-03-04 Thread Greg Stein
Hey Andrey, I've spent well over a decade dealing with licensing issues. One thing that I've learned is that licensing is a personal choice and decision, and it is nearly impossible to alter somebody's philosophy. I find people fall into the GPL camp ("free software"), or the Apache/BSD camp ("per

Re: riak-python-client2, a rewrite of the official client

2012-03-16 Thread Greg Stein
On Thu, Mar 15, 2012 at 11:13, Shuhao Wu wrote: >... > Erlang. In my client, a chunk of the code actually comes from the original > client as they work with a few adaptations. Yes, I noticed that you retain transports/connection.py, but why did you strip out all the comments?! That is definitely

Re: riak-python-client2, a rewrite of the official client

2012-03-16 Thread Greg Stein
On Thu, Mar 15, 2012 at 14:08, Armon Dadgar wrote: >> Message: 4 >> Date: Thu, 15 Mar 2012 11:13:03 -0400 >> From: Shuhao Wu >> To: "Andrey V. Martyanov" >> Cc: riak-users@lists.basho.com >> Subject: Re: riak-python-client2, a rewrite of the official client >> Message-ID: >>       >> Content-Ty