Re: About Protocol Buffers

2014-06-24 Thread Alex De la rosa
Sean, Thank you very much for your answer; somehow I imagined the Python library may not be updated with last code. Can't wait to be out as I can not fully test everything I need for my project. Thanks, Alex On Tue, Jun 24, 2014 at 3:35 PM, Sean Cribbs wrote: > Alex, > > Not all Riak 2.0 feat

Re: About Protocol Buffers

2014-06-24 Thread Sean Cribbs
Alex, Not all Riak 2.0 features have been merged to master on the Python client, including CRDTs. We are in final testing of that feature and will have a release candidate package of the client out soon. On Tue, Jun 24, 2014 at 5:26 AM, Alex De la rosa wrote: > Hi Luc, > > I tried your new sol

Re: About Protocol Buffers

2014-06-24 Thread Alex De la rosa
Hi Luc, I tried your new solution and gives the same error. The problem is that .bucket_type() doesn't exist: Traceback (most recent call last): File "test.py", line 18, in bucket = client.bucket_type('counters').bucket('likes') AttributeError: 'RiakClient' object has no attribute 'bucket_

Re: About Protocol Buffers

2014-06-24 Thread Luc Perkins
Alex, There's a mistake in that tutorial that I need to fix. Early in the tutorial I instruct you to create a bucket type called *counters*, and then later on I use the name *counter_bucket*. Silly mistake on my part. If you establish that as the bucket type, it should work: *bucket = client.buck

Re: About Protocol Buffers

2014-06-23 Thread Alex De la rosa
By the way, I have the following error using PBC on Riak 2.0: test.py --+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+-- import riak client = riak.RiakClient(host ='127.0.0.1', http_port = 8098, pb_port = 8087, protocol = 'pbc') b

Re: About Protocol Buffers

2014-06-23 Thread Alex De la rosa
Hi Bret, Thanks for your reply, I had used Riak since version 0.14 via HTTP... for 2.0 I decided to do the switch to PBC and I'm glad to hear all HTTP calls has been migrated to PBC too :) Does anybody know an estimate date for version 2.0 to be out? I'm starting a new project and I would love to

Re: About Protocol Buffers

2014-06-23 Thread Brett Hazen
Alex - I suspect you may be looking at some older documentation.  AFAIK all HTTP functionality is now (Riak 2.0) supported via PBC so you can pick either transport or the other for all of your communication.  In the past there was some functionality available only via HTTP.  There are now some

Re: About Protocol Buffers

2014-06-23 Thread Alex De la rosa
Hi Luc, Cool, thanks! I can see how to do it now: bucket = client.bucket_type('counter_bucket').bucket('counters') Will be checking it more to see what can I do that is not yet documented. The Python documentation says at one point: "Some requests are only valid over 'http', and will always be

Re: About Protocol Buffers

2014-06-23 Thread Alex De la rosa
Hi Sean, Thanks for your quick reply, is what i suspected, moreover after checking riak.proto file in the source. So mainly the contents to store (json or not json) is not PB encoded semantically, but is encoded as a "body" field in the Message. That's good though. Another question... is there an

Re: About Protocol Buffers

2014-06-23 Thread Sean Cribbs
Hi Alex, By default, the client assumes new objects use JSON as the encoding. The protocol buffers are only used on the wire to encode Riak's protocol. If you want to use your own protobuffs messages, I suggest two things: 1. Decide on a `content_type` property for each of your data types and be

About Protocol Buffers

2014-06-23 Thread Alex De la rosa
Hi there, I just installed RIAK 2.0 beta 1 and was playing with the Python library using 'pbc' (Protocol Buffers). test.py +++++++++++ import riak client = riak.RiakClient(host ='127.0.0.1', http_port