-1

Can you please help me in these questions:

  1. Is the write operation in RIAK atomic?
  2. Is the write operation durable?
  3. How is concurrent write handled?
  4. Does RIAK support transactions?

Thank you

Charlie
  • 4,197
  • 5
  • 42
  • 59
user3341697
  • 305
  • 4
  • 12
  • 4
    While this is far too broad and off-topic for SO, quite frankly, you wouldn't be asking any of these questions if you'd read a single thing about Riak. I highly suggest [starting here](http://docs.basho.com/riak/latest/theory/why-riak/). – Brian Roach Mar 30 '14 at 00:03

2 Answers2

2
  1. Riak does not support ACID. It however uses the CAP Theorem. In other words, Riak does noy use the concept of Atomicity.
  2. Yes. The write operation is durable. dw (durable write quorum) is a configuration setting used to specify how many replicas to commit to durable storage before returning a successful response.
  3. This is done through eventual consistency. Basically, you can set how many nodes data has to be replicated into/ read from for a successful write/read.
  4. Riak does not support ACID transactions.
Mardwan
  • 139
  • 3
  • 14
  • Thank you, isn't the write operation on a single key atomic ??. is there a case where for example you have a value: aaaaaa, and someone update the value to: bbbbbb. at the same time another user read the value and found: bbbaaa – user3341697 Apr 06 '14 at 13:43
  • Your welcome. However, Brian Roach was right. You need to do some reading. The concept you are asking about is clearly covered under eventual consistency. – Mardwan Apr 07 '14 at 14:43
  • The write operation is durable IF dw is greater than 0. The default is 0 though. So the server returns success once it's in memory, before it writes to disk. There is a narrow windows where a crash will prevent the write to disk and the data can be lost – Brian White Oct 29 '15 at 17:11
0

the most interesting characteristic of riak is how it handles concurrent writes to the same key. While Writes are not atomic, Riak is able to detect those conflicts and will keep all conflicting versions of the value. the next time you request those, riak will return all of them letting you decide how you go about that. (this means, that you can resolve that conflict in software, pretty much like you can resolve a merge conflict in your IDE)

Matthias
  • 2,622
  • 1
  • 18
  • 29
  • Just to clarify: this idea is taken from Amazon's Dynamo ([ref](http://dl.acm.org/citation.cfm?id=1294281) and [PDF](http://s3.amazonaws.com/AllThingsDistributed/sosp/amazon-dynamo-sosp2007.pdf)), as many of the design principles of Riak. – Dinei Feb 05 '17 at 22:27