-
Notifications
You must be signed in to change notification settings - Fork 26
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
Using @y-sweet/client in nodejs #197
Comments
Hi @beeing, we use I like the idea of supporting server-side mutations without WebSockets. Rather than entirely eliminating the need to create a YDoc instance, you still had to create a YDoc (so that you'd have the same mutator API), but you didn't have to use WebSockets or a provider? The way it would work is that you'd first send a GET request to the server to get the document, you would do some modifications on the local YDoc, and then you would turn that into an update that you could send as a POST request to the server. Would you use that? |
Hi @paulgb, is it possible for server side mutation to be done without getting the doc and re-sending it back? Otherwise, I think this will be heavy as what you've suggested. Instead, can the y-sweet server load the doc, do the mutation and saving it back to the file and we just pass in a list of operations like The actions are the same / similar to YDoc mutator API and can be in body if using POST. And if there's any conflicts, it can just return RESPONSE as error. Is this something that is not too complex? I hope so, thanks! |
Hello! I have a similar question about server-side mutations in NextJs. Specifically I'd like to clone y-docs on the server, creating a new, disconnected ydoc. I will also likely want to mutate shared types on the server, so Loving y-sweeet btw, exactly what I've been looking for. |
Hi, just started to explore the library and wondering we can use nodejs as the client?
I'm using
ws
package as the nodejs WebSocket client but WebSocketPolyfill is not compatible.Also is it possible to have y-sweet server to easily mutate the document directly without creating a Y Doc instance on client side?
Thanks!
The text was updated successfully, but these errors were encountered: