-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Highest Write Wins flag, register, map and set #40
base: master
Are you sure you want to change the base?
Conversation
Bit lacking on comments now, will add more info later. |
@drewhk This looks great at a first overflight. Is it described in some paper, or is it invented by Varga? It will require protobuf serialization, i.e. |
|
||
def value: Boolean = (state & 1) == 1 | ||
|
||
def setValue(b: Boolean): HWWFlag = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setValue
is a bit strange for an immutable data type, perhaps withValue
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about this. The problem is that a name that is passive does not convey the meaning that you should not just cache True/False values but always operate on the latest value by setting it. I don't know what name would be nice here.
I don't know if this is invented or reinvented by me, but I haven't read about such a structure before. I will add the serialization formats later, I just wanted a validation first so I flushed what I had here. |
Btw, according to this: http://www.bailis.org/blog/linearizability-versus-serializability/ |
@@ -0,0 +1,24 @@ | |||
package akka.contrib.datareplication | |||
|
|||
object HWWFlag { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to understand the end user semantics.
In the case of concurrent updates during a partition the most active replica (or side of the partition) will win. By "most active" I mean changing the flag back and forth most number of times.
Is that correct understanding?
Only for discussion not finished yet