lasp-lang/types

Unified API for Registers

vitorenesduarte opened this issue · 4 comments

  • pure_mvregister uses {set, value()}
  • state_mvregister uses {set, value()}
  • state_lwwregister uses {set, timestamp(), value()}

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

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

  • state_mvregister (link)
  • state_lwwregister (link)
  • pure_mvregister (link)

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.

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

I did it on #60
Should revert it?

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