4 ms·
We've setup a demo environment to get a feel for it here: https://demo.triplit.dev/ https://demo.triplit.dev/ It's actually running two clients and the server
by matlin 2y ago
We've setup a demo environment to get a feel for it here: https://demo.triplit.dev/ https://demo.triplit.dev/
It's actually running two clients and the server inside the browser window so even though it's simulating real-world, it's the actual code that powers Triplit.
- Jayakumark 2y agothanks, but if i add a new todo in sync mode left say "uni" , go offline and change one side to "universe" and other to "unicorn", one overwrites another its random on who wins. Shouldn't it maintain both ?
- matlin 2y agoTechnically speaking both values are preserved in the history but only one "wins" because each attribute is a last-writer-wins register. This works for most use cases e.g. you wouldn't want two concurrent edits to checkbox to leave it simultaneous true AND false state. However, when it comes to collaborative text you're absolutely right and support is on our roadmap. A researcher in this space has already implemented his collaborative sequence library on top of Triplit with the Quill text editor and you can check it out here: https://github.com/mweidner037/list-positions-demos/tree/master/triplit-quill https://github.com/mweidner037/list-positions-demos/tree/mas...