ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.59k stars 335 forks source link

[question] how to debounce properly on collaboration? #1402

Closed terlan4 closed 1 year ago

terlan4 commented 1 year ago

How do we save all changes a client made and emit to websocket connection at once with debounce with 500ms lets say? Can doing so cause to wrong merges in collaboration?

Because I am going to use Pusher for collaboration and don't want to exceed free limit quota. And by the way, I guess I should use something else instead of Pusher since Pusher is sending json data over socket. Could you also please suggest a Pusher like third party service that actually sends binary data?

(I am sorry for lack of technicality in my question, I don't have experience in these topics and I am not getting anywhere with my google/chatgpt searches maybe because I am not searching with the right keywords.)

(frontent-nextjs, backend-either next serverless, express, or fastify)

marijnh commented 1 year ago

The collab package requires the user code to schedule the sending of changes, so debouncing shouldn't be difficult there.

Please ask questions on the forum, not here.