hydro-project / fluent

A data-driven compute platform
Apache License 2.0
1.22k stars 173 forks source link

can u avoid clock unsync between several servers ? #53

Closed leftjs closed 5 years ago

leftjs commented 5 years ago

Hi, Riselab's researchers: I see ur rc_pair_lattice.cpp lattice merge function and generate_timestamp function in ur common.hpp, I see u just use max timestamp to decide whether needing replace current obj, eg. if a key have n replicas across several servers, one of them has been updated by a new value, but because of time gaps between these servers, maybe updated values's timestamp less than timestamps in other replicas, how can I decide to use which one in the future ? so I have these question as follow:

  1. CRDT can resolve time gaps between several servers ?
  2. Can I use Dotted Version Vectors or Vector Clock as Conflict Resolution? it's necessary ?
leftjs commented 5 years ago

like siblings in riak, Do u think that Anna need this feature when I want to use in Anna in production?

vsreekanti commented 5 years ago

Hi @leftjs -- thanks for your question. We haven't explicitly made any efforts to overcome clocks being unsynchronized across servers. CRDTs do not do any work to automatically resolve these gaps. Whether that feature is something you need or not depends on the requirements of your application, but we imagine that it's something some applications will indeed need.

This is related to #12 -- we have a variety of other, non-last writer wins lattice implementations that aren't currently exposed to the user. If this is something you are interested in working on, we'd be happy to work with you!

cw75 commented 5 years ago

@leftjs and in addition to Vikram's comment, one of the main features of Anna is its coordination-freeness, and synchronizing the clocks between servers requires coordination. So if your application does have such a requirement, currently you will need to enforce it at the application level.

leftjs commented 5 years ago

tks for ur replies