Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use vector clock instead of monotonic timestamp #14

Open
Raynos opened this issue Nov 16, 2012 · 5 comments
Open

Use vector clock instead of monotonic timestamp #14

Raynos opened this issue Nov 16, 2012 · 5 comments

Comments

@Raynos
Copy link
Contributor

Raynos commented Nov 16, 2012

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?

@dominictarr
Copy link
Owner

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.

@dominictarr
Copy link
Owner

yes @mixu please publish that! https://npm.im/vector-clock is available!

@mixu
Copy link

mixu commented Nov 16, 2012

@Raynos @dominictarr just had my morning coffee, will have the module out on npm in ~ an hour.

@Raynos
Copy link
Contributor Author

Raynos commented Nov 16, 2012

@mixu badassery!

@mixu
Copy link

mixu commented Nov 16, 2012

and it's out https://npmjs.org/package/vectorclock

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

No branches or pull requests

3 participants