Replies: 1 comment
-
Good questions. The tradeoffs as I see them:
Generally I think it's better to partition on boundaries that your data model naturally fits. Like for an issue tracker I'd partition by repo. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In a collaborative drawing app like Replidraw, suppose I want to also keep in sync with other users creating/deleting boards.
I could have a single Replicache instance for each board (like the Reflect example) and another Replicache representing the "world", with mutations like 'createBoard', 'deleteBoard'.
If I'm not using Reflect and I have a fully transactional database, there's no particular reason these need to be separate Replicaches. It could all be one, with the various drawing mutations, plus createBoard, deleteBoard etc. all in there. The cookie could have a worldVersion and (assuming I only need to keep one board in sync at a time) a boardVersion.
My hunch is the separate Replicache style is more modular and so might be a bit simpler, but I can't think of any strongly persuasive pros and cons for either. Any advice on which way to go?
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions