Skip to content

Highest Write Wins flag, register, map and set#40

Open
drewhk wants to merge 4 commits into
patriknw:masterfrom
drewhk:wip-hww-structures-drewhk
Open

Highest Write Wins flag, register, map and set#40
drewhk wants to merge 4 commits into
patriknw:masterfrom
drewhk:wip-hww-structures-drewhk

Conversation

@drewhk

@drewhk drewhk commented Oct 2, 2014

Copy link
Copy Markdown

Only for discussion not finished yet

@drewhk

drewhk commented Oct 2, 2014

Copy link
Copy Markdown
Author

Bit lacking on comments now, will add more info later.

@patriknw

patriknw commented Oct 2, 2014

Copy link
Copy Markdown
Owner

@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. with ReplicatedDataSerialization.

Copy link
Copy Markdown
Owner

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?

Copy link
Copy Markdown
Author

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.

@drewhk

drewhk commented Oct 3, 2014

Copy link
Copy Markdown
Author

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.

@drewhk

drewhk commented Oct 3, 2014

Copy link
Copy Markdown
Author

Btw, according to this: http://www.bailis.org/blog/linearizability-versus-serializability/
both the register and flag are serializable (but not linarizable), and the set and map are serializable per entry (but not over all entries). Interestingly ORSet as far as I see is neither. It would be interesting to investigate the differences and why one of the behaviors might be preferred over the other in different use-cases.

Copy link
Copy Markdown
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants