-
Notifications
You must be signed in to change notification settings - Fork 456
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
Serialization of custom OT types #389
Comments
Yep, I totally agree. I've been wanting to add that for awhile. Make a pull request and I'll pull it in. |
Thanks for the response. Once I feel comfortable with my implementation, I'll make the pull request. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi ShareJS community!
You guys have done an amazing job here and I'd like to contribute.
I am exploring the possibility of using ShareJS to solve the shared-mutable-state problem I have with my Trello-like web app. I have concluded that the JSON0 type cannot be used to enforce the invariants of my application state and therefore I must implement a custom OT type for my application state.
The snapshot for my custom OT type is an immutable object from the Immutable.js npm module. As a result, I need custom serialization/deserialization methods as documented here: https://github.com/ottypes/docs#optional-properties.
Unfortunately, the shareJS and liveDB libraries do not support the optional serialization/deserialization methods on OT types. I have forked the ShareJS and LiveDB repos to add custom serialization for my purposes ( https://github.com/DetweilerRyan/ShareJS https://github.com/DetweilerRyan/livedb ).
I feel there is a strong use case for custom serialization support ( I can go into more detail if needed ) and believe it should be supported by the two libraries.
The text was updated successfully, but these errors were encountered: