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:
         - if vclock is not provided, Riak won't know I try to update an
         existing object so any update shall always be successful.

         - 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
   information be exposed as an admin client interface?

   There are two related issues from my search:
   https://issues.basho.com/show_bug.cgi?id=271
   https://issues.basho.com/show_bug.cgi?id=421

   For Issue 421, does HTTP APIs refers to the the admin interface that I
   mentioned above?

   Riak provides a map reduce framework/feature, but I don't really prefer
   to write complex mapreduce job in javascript or to learn Erlang. If there
   are SPI for resolving the physical node for keys, I may use an external map
   reduce framework like GridGain (or Hadoop) and run map-reduce process the
   process data in Riak with local data affinity.

Please don't get me wrong as I like Riak very much so far. I am writing to
clarify things rather than ranting, ;-) as I'm new and probably may
understand the things incorrectly . thank you very much.

regards,
mingfai
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to