Open Raynos opened 12 years ago
Actually, it could be very useful to make the ts injectable, so it would be monotonic, or vectors.
mono-ts gives you an ordering (good if you just want new values to clobber old/other), but vector clocks allows you to reason which updates are concurrent (made without knowledge of the other).
Using vector clocks means you can know whether a particular pair of updates was concurrent or not, meaning you could handle them specially - this would mean some sort of merge function.
yes @mixu please publish that! https://npm.im/vector-clock is available!
@Raynos @dominictarr just had my morning coffee, will have the module out on npm in ~ an hour.
@mixu badassery!
and it's out https://npmjs.org/package/vectorclock
https://github.com/nko3/foojs/blob/master/vectorclock/vector_clock.js#L80
@mixu can you open source just the vectorclock as it's own module?