-
Notifications
You must be signed in to change notification settings - Fork 63
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
Helper to generate OTs between two states? #17
Comments
I believe Racer has a function that does this https://github.com/derbyjs/racer/blob/07c1e6d7ff56a3f48c3f259e6a07efaa1da2a551/lib/Model/setDiff.js#L36 |
@ronag This library does exactly what you describe, and more https://github.com/kbadk/json0-ot-diff |
Its also a bad idea in my opinion. The problem is that there are often multiple ways you could transform one object into another - for example, the list |
@josephg Here's a context where this feature would be useful - generating "meta-ops" that bounce across distant versions for computing a snapshot of a desired version efficiently - See share/sharedb#223 . In this context, it doesn't matter which of the possible ways of transforming one object into another is used. As long as they do transform correctly when applied. The concerns you raise relate only to the case of concurrent edits, which is IMO not where this feature would be used. Anyway it's great to hear your voice here! Thanks for your work around ShareDB and OT, it's a great foundation for lots if interesting product features. |
Are there any available helpers for e.g. calculating the required OTs between two strings?
The text was updated successfully, but these errors were encountered: