Erlang Client: get_update_metadata vs get_metadata

2012-06-12 Thread Andrew Berman
Can someone explain the difference between the get_update_metadata and get_metadata functions in the Erlang PB Client for Riak? It's very confusing... Thanks, Andrew ___ riak-users mailing list riak-users@lists.basho.com http://lists.basho.com/mailman/

Re: Erlang Client: get_update_metadata vs get_metadata

2012-06-13 Thread Andrew Berman
should prefer one metadata over another, then the client > >> library should give the user some way to decide. > > There are definitely cases where the user wants to choose one metadata > > over another, or perhaps more commonly, "merge" them to

Re: riak-erlang-client search changes

2012-08-02 Thread Andrew Berman
The more fields the better. I like this change. Andrew On Aug 2, 2012 8:17 AM, "Dave Parfitt" wrote: > Hello - > > We're considering some changes to the Riak Search functionality in > riak-erlang-client for the upcoming Riak 1.2 release. The current behavior of > the riakc_pb_socket:search/*

Re: Riak won't start -- RHEL6

2012-08-25 Thread Andrew Berman
What do your config files look like? Do you have proper permissions on the Riak directory? On Aug 25, 2012 10:10 AM, "Vladimir Kupcov" wrote: > Hi, > > I installed Riak from .rpm package on RHEL6 on virtual machine. > Unfortunately, I can't get Riak to start. Here is the console output: > > > > [

Riak and Zookeeper

2013-03-22 Thread Andrew Berman
Hello, I'm wondering if anyone has explored the idea of using Zookeeper in front of Riak to handle locking. My thought is that a client goes to Zookeeper to get a lock on a key before updating. Any other client that wishes to update the same key must check for the existence of a lock. If it ex

Re: Riak and Zookeeper

2013-03-25 Thread Andrew Berman
/Deconstructing-Database >> >> On Fri, Mar 22, 2013 at 7:32 PM, Andrew Berman wrote: >> > Hello, >> > >> > I'm wondering if anyone has explored the idea of using Zookeeper in >> front of >> > Riak to handle locking. My thought is

Re: Urgent help with a down node.

2013-07-08 Thread Andrew Berman
Bryan, What version of Erlang? You should check this out: https://github.com/basho/riak_kv/issues/411 BTW - Google is your friend, which is how I found the above issue :) --Andrew On Sun, Jul 7, 2013 at 3:01 PM, Bryan Hughes wrote: > Hi Mark, > > DOH - sorry for the lack of detail. Didnt

Links vs Key Filters for Performance

2011-05-05 Thread Andrew Berman
I was curious if anyone has any thoughts on what is more performant, links or key filters in terms of secondary links. For example: I want to be able to look up a user by id and email: *Link implementation:* Two buckets: user and user_email, where id is the key of user and email is the key of u

Re: Links vs Key Filters for Performance

2011-05-05 Thread Andrew Berman
ich will make > fetches an O(n) operation as opposed to O(1). > > --Kyle > > > On 05/05/2011 03:35 PM, Andrew Berman wrote: > >> I was curious if anyone has any thoughts on what is more performant, >> links or key filters in terms of secondary links. For example: >&

Re: Links vs Key Filters for Performance

2011-05-05 Thread Andrew Berman
e's an example: > > https://github.com/aphyr/risky/blob/master/lib/risky/indexes.rb > > --Kyle > > > On 05/05/2011 03:49 PM, Andrew Berman wrote: > >> Ah, that makes sense. So is it the case that using the link >> implementation will always be faster? Or are there

Re: Links vs Key Filters for Performance

2011-05-05 Thread Andrew Berman
Yes, but this would be a bucket where each key would only ever have one link pointing back to the original user. --Andrew On Thu, May 5, 2011 at 3:52 PM, Jason J. W. Williams < jasonjwwilli...@gmail.com> wrote: > On Thu, May 5, 2011 at 4:49 PM, Andrew Berman wrote: > > Ah, t

Re: Link walking

2011-05-06 Thread Andrew Berman
I don't totally understand what you're doing in your code, but it looks like you have the map phase before the link phase which doesn't make sense since you want the data from the link phase passed on to the map phase, not the other way around. On Fri, May 6, 2011 at 9:37 AM, Joshua Hanson wrote:

Re: Link walking

2011-05-06 Thread Andrew Berman
t; how to express it. > > _ > Joshua Hanson > e: joshua.b.han...@gmail.com > > > On Fri, May 6, 2011 at 3:01 PM, Andrew Berman wrote: > >> I don't totally understand what you're doing in your code, but it looks >> like you have

Re: Error when trying to use a javascript custom extractor in Riaksearch

2011-05-21 Thread Andrew Berman
I'll preface this by saying I've never used this feature rs_extractfun should be set to one of the values defined in the Other Encodings section ( http://wiki.basho.com/Riak-Search---Indexing-and-Querying-Riak-KV-Data.html). In your case, {jsanon, "function(a,b){return{\"user\":\"gpascale\", \

Re: Problems starting riak

2011-06-04 Thread Andrew Berman
Have you tried it with just a default Erlang build (just a ./configure)? On Sat, Jun 4, 2011 at 1:50 PM, Alvaro Videla wrote: > > Hi, > > @roidrage told me to use an older version of Erlang. Problem is another > library I want to use only compiles with latest Erlang. > > On Jun 4, 2011, at 10:48

Re: Riak Recap as a Blog (?)

2011-06-06 Thread Andrew Berman
+1 and I love the idea of a RSS feed also. On Sun, Jun 5, 2011 at 11:51 PM, Mark Phillips wrote: > Hey All - > > Quick question: how would you feel if we turned the Riak Recap into a blog? > > I've spoken with various people in various channels about how to best > deliver the Recap, and while it

Has there been any talk of dropping the PB interface?

2011-06-07 Thread Andrew Berman
I'm curious if there has been any talk to drop the protocol buffers interface in favor of one of the more user-friendly serialization libraries which support more languages, like Bert (http://bert-rpc.org/) or MessagePack (http://msgpack.org/). I would think Bert is a perfect fit for Riak since it

Pros/Cons to not storing JSON

2011-06-09 Thread Andrew Berman
I am using Riak using the Erlang Client API (PB) and I was storing my documents as JSON and then converting them to records when I pull them out of Riak, but I got to thinking that maybe this isn't the greatest approach. I'm thinking that maybe it's better to store documents just as the record itse

Re: Pros/Cons to not storing JSON

2011-06-09 Thread Andrew Berman
gt; little hairy unless done carefully. > > That said, you could use BERT as the serialization format, making > implementing JavaScript M/R functions a little easier, and interop with > other languages. > > Sean Cribbs > Developer Advocate > Basho Technologies, Inc. > htt

Re: Pros/Cons to not storing JSON

2011-06-09 Thread Andrew Berman
serialization format, making >> implementing JavaScript M/R functions a little easier, and interop with >> other languages. >> >> Sean Cribbs >> Developer Advocate >> Basho Technologies, Inc. >> http://basho.com/ >> >> On Jun 9, 2011, at 5:14 PM, Andrew

Re: Pros/Cons to not storing JSON

2011-06-09 Thread Andrew Berman
you're using records -- that is, version > them -- so that you can evolve their structure over time. That could be a > little hairy unless done carefully. > > That said, you could use BERT as the serialization format, making > implementing JavaScript M/R functions a little ea

Link Walking via Map Reduce

2011-06-22 Thread Andrew Berman
Hello, I'm having issues link walking using the Map Reduce link function. I am using HEAD from Git, so it's possible that's the issue, but here is what is happening. I've got two buckets, user and user_email where user_email contains a link to the user. When I run this: { "inputs": [

Re: Link Walking via Map Reduce

2011-06-22 Thread Andrew Berman
voke_anon_js,3},{riak_kv_js_vm,handle_call,3},{gen_server,handle_msg,5},{proc_lib,init_p_do_apply,3}]}      Offender: [{pid,<0.5996.21>},{name,undefined},{mfargs,{riak_kv_js_vm,start_link,undefined}},{restart_type,temporary},{shutdown,2000},{child_type,worker}] On Wed, Jun 22, 2011 at 6:10

Re: Link Walking via Map Reduce

2011-06-23 Thread Andrew Berman
t; is less prone to encoding/decoding issues with JSON. > > Mathias Meyer > Developer Advocate, Basho Technologies > > [1] > http://lists.basho.com/pipermail/riak-users_lists.basho.com/2011-June/004447.html > [2] > http://lists.basho.com/pipermail/riak-users_lists.basho.com/

Re: Link Walking via Map Reduce

2011-06-23 Thread Andrew Berman
e value, shouldn't I be getting the all the info above which is JSON encoded? Thank you all for your help, Andrew On Thu, Jun 23, 2011 at 8:17 AM, Sean Cribbs wrote: > The object has to be JSON-encoded to be marshalled into the Javascript VM, > and also on the way out if the Accept heade

Re: Link Walking via Map Reduce

2011-06-23 Thread Andrew Berman
gt; agnosticism only goes as far as the set of legal characters allows. > > On a side note, if the data were a valid representation of a string, you > would see it as a string in the log file as well, not just as a list of > numbers. > > Mathias Meyer > Developer Advocate, Bash

Re: Link Walking via Map Reduce

2011-06-23 Thread Andrew Berman
records from > Riak. > --- > Jeremiah Peschka > Founder, Brent Ozar PLF, LLC > > On Thursday, June 23, 2011 at 8:52 AM, Andrew Berman wrote: > > Ah, ok, that makes sense. One more question, when I use the HTTP link > walking, I do get the data back as expected, so is there a way to >

Re: Link Walking via Map Reduce

2011-06-24 Thread Andrew Berman
> numbers. > > Mathias Meyer > Developer Advocate, Basho Technologies > > > On Donnerstag, 23. Juni 2011 at 17:31, Andrew Berman wrote: > >> But isn't the value itself JSON? Meaning this part: >> >> {struct, >>  [{<<"bucket">>

Re: Link Walking via Map Reduce

2011-06-24 Thread Andrew Berman
And related, does Bitcask have any sort of compression built into it? On Fri, Jun 24, 2011 at 2:58 PM, Andrew Berman wrote: > Mathias, > > I took the BERT encoding and then encoded that as Base64 which should > pass the test of valid UTF-8 characters.  However, now I'm startin

Re: Link Walking via Map Reduce

2011-06-24 Thread Andrew Berman
Has there been any talk of using compression, maybe something like Snappy (http://code.google.com/p/snappy/) since it's fast and shouldn't affect performance too much? On Fri, Jun 24, 2011 at 3:29 PM, Aphyr wrote: > Nope. > > On 06/24/2011 03:24 PM, Andrew Berman wrote: >

Controlling order of results from link phase

2011-06-26 Thread Andrew Berman
I've noticed that when I run the link function, it automatically orders the links based on Id. Is there a way to tell it not to sort the links? In other words, I want the links in the order in which they were put in the list (most recent at the head of the list) and I see from Rekon that that is

Re: Controlling order of results from link phase

2011-06-26 Thread Andrew Berman
rew On Sun, Jun 26, 2011 at 3:15 PM, Andrew Berman wrote: > I've noticed that when I run the link function, it automatically > orders the links based on Id.  Is there a way to tell it not to sort > the links?  In other words, I want the links in the order in which > they were put i

Re: Controlling order of results from link phase

2011-06-27 Thread Andrew Berman
Nevermind on the lists:sort issue below as I realized that list:umerge requires that the lists be sorted. Thanks anyway, Andrew On Sun, Jun 26, 2011 at 3:36 PM, Andrew Berman wrote: > I think I found the answer and it is no, I cannot control the sort.  I > found the code h

Re: How to setup Post-Commit Hooks

2011-06-29 Thread Andrew Berman
They should exist on each node (server-side). You set up the code path using http://wiki.basho.com/Configuration-Files.html#add_paths or -pz in vm.args for each node. Once you do that you (assuming Erlang), you would just compile the file and put the beams in the directory you stated in the path

Re: New Java Client API

2011-06-29 Thread Andrew Berman
So much better than the old API!! Thanks for the hard work on this. On Tue, Jun 28, 2011 at 10:53 AM, Russell Brown wrote: > Hi, > A while back (in March) I asked for help/feedback in defining a new API for > the riak-java-client[1].  Last week I merged a branch to master of the basho > riak-jav

Re: Riak or Cassandra for this...

2011-06-29 Thread Andrew Berman
It seems to me that you need to put weights on your requirements because I think it's going to be pretty tough to meet all of them with just one solution. For example, you can use something like Redis to do fast writes, but it doesn't have Map-Reduce queries. So, you can use Redis to write the da

When is Vclock generated?

2011-07-21 Thread Andrew Berman
I'm looking to store the vclock on my object to be used for versioning. Currently, when I get the object from Riak I fill in the version with the vclock from Riak (which I use to determine if the object is persistent and for passing back to Riak when putting) and then when the object is saved it

Re: When is Vclock generated?

2011-07-22 Thread Andrew Berman
ell be ignored, so please fetch before > storing. > > On Thu, Jul 21, 2011 at 6:13 PM, Andrew Berman wrote: >> >> I'm looking to store the vclock on my object to be used for >> versioning.   Currently, when I get the object from Riak I fill in the >> version

Connection Pool with Erlang PB Client Necessary?

2011-07-25 Thread Andrew Berman
I know that this subject has been brought up before, but I'm still wondering what the value of a connection pool is with Riak. In my app, I'm using Webmachine resources to talk to a gen_server which in turn talks to Riak. So, in other words, the Webmachine resources never talk to Riak directly, t

Re: Connection Pool with Erlang PB Client Necessary?

2011-07-26 Thread Andrew Berman
e: > On Mon, Jul 25, 2011 at 4:03 PM, Andrew Berman wrote: >> >> I know that this subject has been brought up before, but I'm still >> wondering what the value of a connection pool is with Riak. > > It's a big deal: > > It amortises TCP and PBC connection s

Re: Connection Pool with Erlang PB Client Necessary?

2011-07-26 Thread Andrew Berman
Thanks for all the replies guys! I just want to make sure I'm totally clear on this. Bob's solution would work well with my design. So basically, this would be the workflow? 1. check out connection from the pool 2. set client id on connection (which would have some static and some random comp

Re: Connection Pool with Erlang PB Client Necessary?

2011-07-26 Thread Andrew Berman
Awesome! Thanks for all your help guys. On Tue, Jul 26, 2011 at 12:20 PM, Justin Sheehy wrote: > Yes, Andrew -- that is a fine approach to using a connection pool. > > Go for it. > > -Justin > > > > On Tue, Jul 26, 2011 at 3:18 PM, Andrew Berman wrote: >>

Re: Connection Pool with Erlang PB Client Necessary?

2011-07-28 Thread Andrew Berman
Cool, I'll check it out, though there appears to be something wrong with your account as when I try to view the source, I get an error back from GitHub. On Thu, Jul 28, 2011 at 1:55 PM, Joel Meyer wrote: > > > On Tue, Jul 26, 2011 at 11:35 AM, Andrew Berman wrote: >> >

Re: Connection Pool with Erlang PB Client Necessary?

2011-08-15 Thread Andrew Berman
> Yes, Andrew -- that is a fine approach to using a connection pool. > > Go for it. > > -Justin > > > > On Tue, Jul 26, 2011 at 3:18 PM, Andrew Berman wrote: >> Thanks for all the replies guys! >> >> I just want to make sure I'm totally clear on

Using Secondary Index Result

2011-10-03 Thread Andrew Berman
Hello, I'm currently using the Riak Erlang client and when I do a get_index I only get the keys back. So, my question is, is it better to get the keys, loop through them and run a get on them one by one, or is it better to write my own MapRed job which queries the index and then runs a map phase

Re: Lager AMQP backend

2011-11-17 Thread Andrew Berman
Awesome stuff Jon! On Thu, Nov 17, 2011 at 1:49 PM, Andrew Thompson wrote: > On Thu, Nov 17, 2011 at 02:05:58PM -0600, Jon Brisbin wrote: > > I pushed to my Github a Lager backend for sending log messages to > RabbitMQ via AMQP: > > > > https://github.com/jbrisbin/lager_amqp_backend > > > > It u

Integrating Riak

2011-11-22 Thread Andrew Berman
Hello, I'm a little confused on how I would go about integrating Riak into an Erlang application. Here's my use case. I'm creating an HTTP proxy using Misultin which intercepts any requests to my backend REST services and provides all the session handling. So, I would like to use Riak to store

Re: Integrating Riak

2011-11-23 Thread Andrew Berman
Ok, cool, thanks Dave, makes sense. Keep up the great work! On Tue, Nov 22, 2011 at 9:31 PM, David Smith wrote: > On Tue, Nov 22, 2011 at 4:36 PM, Andrew Berman wrote: > > 4. Does it make more sense to just install a riak package and use the > > erlang pb client? Seems like i

Re: Best practices for using the PB client

2011-12-30 Thread Andrew Berman
You should look into using HAProxy in front of your nodes. Let HAProxy load balance between all your nodes and then if one goes down, HAProxy just pulls it out of the load balancing cluster automatically until it is restored. Then your pooler can just pool connections from HAProxy instead so it d