You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm starting a new project which will use Loro to save JSON documents. I read the documentation thoroughly, but still ended up with a couple of questions.
Are there any drawbacks to using shallow snapshots?
This was answered partially, and I get the issues with updates not being applied if they do not have a common starting point in history. Is there anything else, though? In my use case, I'm creating a multiplayer-supported app where the multiplayer handles broadcasting of changes to other users and saving of the document to the DB. In most cases, the snapshot persisted in the DB won't be shallow; however, there will come a time when the size becomes a problem, and I will want to persist a shallow snapshot. Once that happens, the shallow snapshot will be used from then on. Assuming all clients will correctly get that snapshot and work on it from that point in time, is there anything else to be careful about?
What is the recommended way to perform JSON schema migrations?
Sometimes in the future, I want to be able to migrate the data inside to a different shape. My idea was to do a migration on JSON content and then seed a new document with it. A combination of this guide and this PR.
In the end I do not want to end up with some sort of chimera document.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm starting a new project which will use Loro to save JSON documents. I read the documentation thoroughly, but still ended up with a couple of questions.
Are there any drawbacks to using shallow snapshots?
This was answered partially, and I get the issues with updates not being applied if they do not have a common starting point in history. Is there anything else, though? In my use case, I'm creating a multiplayer-supported app where the multiplayer handles broadcasting of changes to other users and saving of the document to the DB. In most cases, the snapshot persisted in the DB won't be shallow; however, there will come a time when the size becomes a problem, and I will want to persist a shallow snapshot. Once that happens, the shallow snapshot will be used from then on. Assuming all clients will correctly get that snapshot and work on it from that point in time, is there anything else to be careful about?
What is the recommended way to perform JSON schema migrations?
Sometimes in the future, I want to be able to migrate the data inside to a different shape. My idea was to do a migration on JSON content and then seed a new document with it. A combination of this guide and this PR.
In the end I do not want to end up with some sort of chimera document.
Beta Was this translation helpful? Give feedback.
All reactions