Riak Recap for 9/1 - 9/2
Afternoon, Evening, Morning to all, I love writing Recaps like this. Here's why: Blog posts, new wiki pages, great stuff from #riak, slide decks, and much more. Have a great weekend! Mark Community Manager Basho Technologies wiki.basho.com twitter.com/pharkmillups Riak Recap for 9/1 - 9/2 1) @thecolonial put together an extensive post that covers getting a Riak-backed dev environment up and running. This is a great post and should especially tug at the heart strings of you hardcore Erlangers. Post here ---> http://buffered.io/2010/09/01/webmachine-erlydtl-and-riak-part-1/ Thanks for the write up, OJ! 2) @siculars posted on using Riak's map/reduce for sorting. This is great post with extensive code examples. Check it out here ---> http://post.ly/v4UE 3) @roidrage presented on Riak at yesterday's RUG meetup in Berlin. He also posted his slides shortly after. These are excellent. Check them out here ---> http://riak-rugb.heroku.com/#1 He also posted a blog entitled, "Why I Love and Hate Distributed Systems." It's good. Read it here ---> http://www.paperplanes.de/2010/9/3/why_i_love_and_hate_distributed_systems.html 4) We posted a quick blurb on the Basho Blog about adding a new Community Editor Read it here ---> http://blog.basho.com/2010/09/01/a-new-community-editor---marten-gustafson/ 5) On a related note, I threw together a "Riak Community" Section for the wiki. Check it out here ---> https://wiki.basho.com/display/RIAK/The+Riak+Community Admiteddly, this section is a bit sparse, but it's only a short term solution until we get a new Basho site launched (which is slated to happen in the not so distant future). In the mean time, if anyone has any ideas for the this part of the wiki, we would love to hear them. 6) Basically all that went down in #riak from Wednesday, September 1st is worth reading, so to save myself some copy and pasting and your some clicking, I'm simply going to point you at all of it. ---> http://irclogger.com/riak/2010-09-01 7) nfo and hemulen had a quick chat about some map reduce specifics. Gist here ---> http://gist.github.com/564449 8) Q --- Is there a reason why the default n value for riak is 3? (via mheld from #riak) A --- It's a sensible default - Lamport says you need at least 3 computers for fault-tolerance. It's also because 3 is the lowest value at which quorum and all are not the same . 9) benblack, seancribbs and drewr had a discussion in #riak that started with, "This is probably a faq, but why do R, W, and DW need to be less than n_val?" Gist here ---> http://gist.github.com/564464 10) So check this out: At 17:40 yesterday, solidsnack asked, "Does Riak support HTTPS?" At 22:28, benblack made it work ---> https://gist.github.com/4413fafc14fc18696643 The repo for his branch is here ---> http://github.com/b/riak/tree/https ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Riak and no of clients limit?
Hi, I am using Riak with distributed Erlang and I wanted to know what's the limit on # of riak clients (I used it before erlang pb client, so yet to migrate). I am using single client to talk to Riak, is it better? or in web, is it ok to create a client per request? I looked riak_kv_wm_raw.erl which seems using a connection per request but it is a erlang local_client. -- Regards, Senthilkumar Peelikkampatti, ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
Re: PBC API questions
Hi Mingfai, Don't worry, you didn't come off ranting :) 1. The symbolic names are mapped to high values of r/w one = 0xfffe quorum = 0xfffd all = 0xfffc default = 0xfffb 2. The PBC API does not currently support any of the conditional updates the REST API provides. I've filed a bug https://issues.basho.com/show_bug.cgi?id=690 to track the issue. 3. yes - it is referring to allow_mult. If you cant to know about conflicts on write you can set allow_mult=true on your bucket and use the return_body option on the put. If you get back multiple values then there was a conflict. 4. We don't have any enhancements to the interface planned for the moment. Improved API access to the cluster is desirable, but what to expose and how to do it needs thought. Exposing admin operations without any authentication seems dangerous. Good luck with your client. Mail the list if you get stuck. Jon Meredith -- Basho On 8/26/10 12:32 AM, Mingfai wrote: hi, I'm new to Riak and learning it rapidly. Other than Riak, I also tried MongoDB, CouchDB, and Voldemort (and also Cassandra ) briefly. Riak is quite suitable for my needs. Thanks for releasing it as an open source project. I got a number of questions but let me ask those about the PBC API first only. Just some backgrounds: I am implementing my own Java ProtoBuf client. I do it for several reasons: Kresten claims his Java PB client performs ~10X better than the Java REST client, PB is preferred to HTTP/REST "officially" for Erlang development, and I want to take a different approach to use PB by using Java NIO/Netty instead of making direct socket connection. My questions are as follows: 1. For put and delete operations, the 'w' and 'dw' parameters are defined as integer, but in the documentation, it says "possible values include 'default', 'one', 'quorum', 'all', or any integer <= N". so what value represents 'default', 'quorum', and 'all'? does 0 means default? how about -1? 2. REST API allows "If-None-Match, If-Match, If-Modified-Since, and If-Unmodified-Since" checking. PBC API does not have equivalent, right? I read that for Erlang, PB is the preferred client. But it doesn't provide all features that REST API provide? It seems to me the REST and BPC APIs are not very consistent atm. for example, REST API doesn't provide a way to list buckets (Issue 78); other than those "If-None-Match .." criterias, the document also mentioned a number of missing features in BPC API and suggested us to use REST API for those cases. 3. I want to clarify the expected response for a "Store a new or existing object with a key" cases * From the doc, "Riak can allow the last update to automatically "win" or Riak can return both versions of the object to the client.", I suppose it refer to the "allow_multi" bucket parameter. I watched the Wriaki video and roughly know how allow_multi=true works in keeping versions. * for a bucket with allow_multi=false, when an update is executed: o if vclock is not provided, Riak won't know I try to update an existing object so any update shall always be successful. o if supplied vclock doesn't match the the vlock value of the current object, would it return error(RpbErrorResp)? or just "allow the last update to automatically win"? or would it return the sibling like allow_multi=true? The following sequence is for illustrating the scenario of the above question: 1) client A (or whoever) put a new k1,v1, with vclock c1 2) client A and B both read the entry with c1 3) client A updates the entry to k1,v2, supplied c1, the vclock is updated to c2 4) client B tries to update k1, supplied v3 and c1. Because the vclock is updated to c2 in step 3, i expect it to return an error, or at least there should an easy way for to know about conflict. 4. I wonder what interface will be added to the PBC API in your roadmap. there is essential no administrative interface (except set bucket properties) or any SPI. Take Voldemort as an example, they provides an AdminClient interface (http://project-voldemort.com/javadoc/client/index.html?voldemort/client/protocol/admin/AdminClient.html) and they also have API to get the node list for a key. (DefaultStoreClient.getResponsibleNodes() ) Riak doesn't provide these kind of interface.In Erlang console, I could get the virtual node list in the ring with riak_core_ring_manager:get_my_ring(), could this kind of
Python client doesn't implement bucket.get_keys() for probuffers
Hi, I'm doing some tests with riak and python client. I've got this error when trying to get keys of a bucket: In [1]: from connection import db In [2]: b = db.bucket('test') In [3]: b.get_keys() --- AttributeErrorTraceback (most recent call last) /workspace/ag/src/lib/db/ in () AttributeError: 'Bucket' object has no attribute 'get_keys' In [4]: b.bucket.get_keys() --- AttributeErrorTraceback (most recent call last) /workspace/ag/src/lib/db/ in () /usr/local/lib/python2.6/dist-packages/riak-1.1.1-py2.6.egg/riak/bucket.pyc in get_keys(self) 324 t = self._client.get_transport() 325 return t.get_bucket_props(self) 326 327 def get_keys(self): --> 328 return self._client.get_transport().get_keys(self) AttributeError: 'RiakPbcTransport' object has no attribute 'get_keys' Is this a bug? ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com