ProseMirror / prosemirror

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

how to save to database in optimal way? [question/not bug] #1401

Closed terlan4 closed 1 year ago

terlan4 commented 1 year ago

So while multiple clients edit the content, we only send changes through websockets and other clients' editors merge new changes automatically.

But what about saving the content to database? Database service doesn't know how to merge new changes to what is already saved. When we save to database, do we have only these two options:

send only changes to your server and let the server merge it with what is saved in database and save the result to db store. send entire document on your editor with request to save in db None of these options sound good bandwidthwise. I would be really happy to hear what are the best practices around saving to db.

Also should we save as blob or which data type? (please suggest both for mongo and mysql)

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

marijnh commented 1 year ago

question/not bug

That means it should go on the forum, not the bug tracker.