Re: Continuous HTTP POSTs to Riak

2016-03-06 Thread Qiang Cao
or you, make sure > your Riak's clocks are in sync (NTP?). I would also suggest to pass vector > clocks anyway. > > Hope this helps. Everyone is welcome to correct/clarify. > > Vitaly > > > On Mar 5, 2016 11:07 PM, "Qiang Cao" wrote: > >> Thanks,

Re: Continuous HTTP POSTs to Riak

2016-03-05 Thread Qiang Cao
;s hard to say why or where you have > concurrency. But since concurrency is ultimately unavoidable using riak, > why the concern? Can your application/data model handle it is the main > question? > > > On 5 Mar 2016, at 19:04, Qiang Cao wrote: > > Thanks, Russell! I do

Re: Continuous HTTP POSTs to Riak

2016-03-05 Thread Qiang Cao
Thanks, Russell! I do a GET immediately after a POST is done. I use apache httpclient, which handles requests synchronously. On the client, POSTs and GETs are sent out sequentially. On Sat, Mar 5, 2016 at 1:57 PM, Russell Brown wrote: > > On 5 Mar 2016, at 18:43, Qiang Cao wrote: >

Re: Continuous HTTP POSTs to Riak

2016-03-05 Thread Qiang Cao
Just curious. The POSTs are sent out sequentially and a quorum is set up on Riak. I wonder how would it happen that Riak still considers the POST requests concurrent? -Qiang On Fri, Mar 4, 2016 at 12:27 PM, Qiang Cao wrote: > This worked! Thank you, Vitaly! > > > On Fri, Mar 4,

Re: Continuous HTTP POSTs to Riak

2016-03-04 Thread Qiang Cao
This worked! Thank you, Vitaly! On Fri, Mar 4, 2016 at 3:18 AM, Vitaly E <13vitam...@gmail.com> wrote: > Hi Qiang, > > Since you are running with allow_mult=false, make sure the clocks of your > Riak nodes are synchronized. If they are out of sync, newer values may get > overridden by older one

Re: Continuous HTTP POSTs to Riak

2016-03-03 Thread Qiang Cao
Sargun, do you mean I should also pass back the vclock with the GET request? On Thu, Mar 3, 2016 at 10:05 PM, Qiang Cao wrote: > Thanks, Sargun and Alexander! I tried setting pr, pw, and sloppy_quorum. > It looks that these help. I got less stale values. But the issue wasn't &

Re: Continuous HTTP POSTs to Riak

2016-03-03 Thread Qiang Cao
e > the > >> data. > >> > >> > >> > >> Thanks, > >> > >> > >> > >> - Mark Schmidt > >> > >> > >> > >> From: riak-users [mailto:riak-users-boun...@lists.basho.com] On Be

Re: Continuous HTTP POSTs to Riak

2016-03-03 Thread Qiang Cao
> Thanks, >> >> >> >> - Mark Schmidt >> >> >> >> *From:* riak-users [mailto:riak-users-boun...@lists.basho.com] *On >> Behalf Of *Qiang Cao >> *Sent:* Thursday, March 03, 2016 6:13 PM >> *To:* Dave King >> *Cc:*

Re: Continuous HTTP POSTs to Riak

2016-03-03 Thread Qiang Cao
On Thu, Mar 3, 2016 at 6:53 PM, Dave King wrote: > You need to google 'Eventual consistency'. > > - Peace > Dave > > > On Thu, Mar 3, 2016 at 4:23 PM, Qiang Cao wrote: > >> Hi All, >> >> I use Riak as a KV store and send http requests to its RES

Continuous HTTP POSTs to Riak

2016-03-03 Thread Qiang Cao
Hi All, I use Riak as a KV store and send http requests to its REST API to update entries. Instead of using curl, I use Apache HttpClient to send requests. One thing bothering me is that sometimes I find the entry isn't properly updated after an HTTP POST/PUT. For example, if I do an HTTP GET on