Re: Storing JSON via Erlang Client

2013-10-17 Thread Daniil Churikov
To Konstantin Kalin: This is not a good place to start discussion about NIFS, but check this http://ferd.ca/rtb-where-erlang-blooms.html especially last passage. -- View this message in context: http://riak-users.197444.n3.nabble.com/Storing-JSON-via-Erlang-Client-tp4029489p4029509.html Sent

Re: Storing JSON via Erlang Client

2013-10-17 Thread Konstantin Kalin
;, <<"my_key">>, >> <<"{\"key\":\"\val\"}">>, >> <<"application/json">>), >> ok = riakc_pb_socket:put(Worker, Obj), >> ok = riakc_pb_socket:stop(Worker). >> >> >> >

Re: Storing JSON via Erlang Client

2013-10-17 Thread Christopher Meiklejohn
w(<<"my_bucket">>, <<"my_key">>, <<"{\"key\":\"\val\"}">>, > > <<"application/json">>), > > ok = riakc_pb_socket:put(Worker, Obj), > > ok = riakc_pb_socket:stop(Worker). > > > > &

Re: Storing JSON via Erlang Client

2013-10-17 Thread Eric Redmond
y_key">>, > <<"{\"key\":\"\val\"}">>, > <<"application/json">>), > ok = riakc_pb_socket:put(Worker, Obj), > ok = riakc_pb_socket:stop(Worker). > > > > > -- > View this message in c

Re: Storing JSON via Erlang Client

2013-10-17 Thread Daniil Churikov
pb_socket:put(Worker, Obj), ok = riakc_pb_socket:stop(Worker). -- View this message in context: http://riak-users.197444.n3.nabble.com/Storing-JSON-via-Erlang-Client-tp4029489p4029491.html Sent from the Riak Users mailing list archive at Nabble.com. _

Storing JSON via Erlang Client

2013-10-16 Thread Ari King
Hi, Does anyone know of any examples illustrating how to store json values via the erlang client? I've recently started learning riak & erlang, so straight forward/simple examples would be appreciated. Thanks. -Ari ___ riak-users mailing list riak-users

storing JSON

2013-08-30 Thread akonsu
Hello, I am just starting with Riak, please forgive my ignorance. I have read the tutorial that demonstrates how to store Ruby (I am using Ruby for now) hashes in Riak. The client will serialise my hash into JSON and post it to Riak. I already have JSON, and I do not want to parse it to submit it

Re: storing JSON

2013-08-30 Thread Sean Cribbs
Riak does not parse the incoming data; whatever your client has sent to Riak is what gets stored, verbatim. The client library is solely responsible for (de-)serializing Ruby types into JSON. On Fri, Aug 30, 2013 at 10:00 AM, akonsu wrote: > Hello, > > I am just starting with Riak, please forgi

Postcommit hook and storing json object

2012-08-25 Thread Yousuf Fauzan
Hello, In a postcommit hook, I am storing an object in another bucket where data is equal to Data = iolist_to_binary(mochijson2:encode({struct, [ {<<"status">>, list_to_binary(Status)}, {<<"recorddate">>, list_to_binary(Recorddate)}, {<<"memberlo

Storing JSON Objects in Buckets as value [JAVA CLIENT]

2012-02-21 Thread Rajat Mathur
Hi I am simply storing JSONObject as value in a bucket instead of converting it to String and then storing. IRiakObject stored = null; stored = (IRiakObject) client.createBucket("Employee").execute().store(key,jsonObject).execute(); It gives following error Exception

Re: Pros/Cons to not storing JSON

2011-06-14 Thread Jonathan Langevin
Ah, gotcha. I'll have to stick with JSON then, thanks :-) - Jon Langevin -- sent from my Android phone On Jun 14, 2011 12:58 PM, "Will Moss" wrote: > You wouldn't be able to do it in Javascript, you'd have to use Erlang. Then, > you'd just import the BSON library to parse the values. > > Will > >

Re: Pros/Cons to not storing JSON

2011-06-14 Thread Will Moss
You wouldn't be able to do it in Javascript, you'd have to use Erlang. Then, you'd just import the BSON library to parse the values. Will On Tue, Jun 14, 2011 at 9:50 AM, Jonathan Langevin < jlange...@loomlearning.com> wrote: > How would we tell the m/r that the data type is BSON? Does the js e

Re: Pros/Cons to not storing JSON

2011-06-14 Thread Jonathan Langevin
How would we tell the m/r that the data type is BSON? Does the js engine already have BSON support included? - Jon Langevin -- sent from my Android phone On Jun 14, 2011 12:47 PM, "Will Moss" wrote: > I still haven't had a chance to try out using BSON for a map-reduce, but in > general, parsing B

Re: Pros/Cons to not storing JSON

2011-06-14 Thread Will Moss
I still haven't had a chance to try out using BSON for a map-reduce, but in general, parsing BSON is faster than parsing JSON and I'd imagine that's true in Erlang as well. So, I'd assume using BSON is faster, but you know what they say about assumptions... Will On Tue, Jun 14, 2011 at 9:40 AM,

Re: Pros/Cons to not storing JSON

2011-06-14 Thread Jonathan Langevin
Would the Riak standard map/reduce be able to deal with BSON properly, or would map/reduce functionality be less efficient than if it were inspecting JSON objects? *Jonathan Langevin Systems Administrator Loom Inc. Wilmington, NC: (910) 241-0433 - jlange...@loomlearn

Re: Pros/Cons to not storing JSON

2011-06-14 Thread Runar Jordahl
I am also experimenting with storing objects serialized as binary data. I think this is a great way to use Riak, and you covered the pros and cons. The upcoming support for secondary indices will use metadata, so you will be able to index your binary data too: http://blog.epigent.com/2011/05/soon-

Re: Pros/Cons to not storing JSON

2011-06-09 Thread Andrew Berman
t; {ok,[{one,1},{two,2},{three,3}]} > > > > /Matt > > > -- > > *From:* riak-users-boun...@lists.basho.com [mailto: > riak-users-boun...@lists.basho.com] *On Behalf Of *Will Moss > *Sent:* Thursday, June 09, 2011 5:27 PM > *To:* Sean Cri

Re: Pros/Cons to not storing JSON

2011-06-09 Thread Andrew Berman
Cool, I've looked at BSON before for another project, and it might make sense in this case as well. Thanks! On Thu, Jun 9, 2011 at 2:26 PM, Will Moss wrote: > Hey Andrew, > > We're using BSON (bsonspec.org), because it stores binary (and other) data > types better than JSON and is also faster a

Re: Pros/Cons to not storing JSON

2011-06-09 Thread Andrew Berman
Ah, yes, you're right. Basically I'd have to either update all previous record docs with the new field or I'd have to have multiple record implementations to support the history of that particular record. That could be really, really ugly. Thanks Sean! On Thu, Jun 9, 2011 at 2:24 PM, Sean Cribb

RE: Pros/Cons to not storing JSON

2011-06-09 Thread Evans, Matthew
_ From: riak-users-boun...@lists.basho.com [mailto:riak-users-boun...@lists.basho.com] On Behalf Of Will Moss Sent: Thursday, June 09, 2011 5:27 PM To: Sean Cribbs Cc: riak-users Subject: Re: Pros/Cons to not storing JSON Hey Andrew, We're using BSON (bsonspec.org<http:

Re: Pros/Cons to not storing JSON

2011-06-09 Thread Will Moss
Hey Andrew, We're using BSON (bsonspec.org), because it stores binary (and other) data types better than JSON and is also faster and more wire efficient (sounds like about the same reasons you're considering leaving JSON). There are also libraries to parse BSON it in just about every language. I

Re: Pros/Cons to not storing JSON

2011-06-09 Thread Sean Cribbs
Andrew, I think you're on the right track here, but I might add that you'll want to have upgrade paths available if 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 B

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