lasp-lang / types

Prototype implementation of Conflict-free Replicated Data Types (CRDTs) in Erlang.
https://lasp-lang.org
Apache License 2.0
139 stars 13 forks source link

Unified API for Registers #61

Closed vitorenesduarte closed 8 years ago

vitorenesduarte commented 8 years ago

In state_lwwregister, the operation was extended to {set, timestamp(), value()} because we also need to supply a timestamp.

Should pure_mvregister and state_mvregister operations be extended as well (and in that case they would ignore the timestamp) or there's a better approach?

Note: both state_lwwregister and state_mvregister are implemented in #60

vitorenesduarte commented 8 years ago

Also, state_mvregister demands CRDTs as values, while in state_lwwregister and pure_mvregister we can have anything.

This is basically because DotFun demands \join to be defined in the values, in order to merge two DotFun's. (see MVRegister and DotFun definition here)

Not sure how to proceed on this one.

cmeiklejohn commented 8 years ago

For now, I personally would not bother unifying the APIs until we have a reason to perform all of that work.

vitorenesduarte commented 8 years ago

I did it on #60 Should revert it?

cmeiklejohn commented 8 years ago

No, if you already did the work, that's fine.