aspen-cloud / triplit

A full-stack, syncing database that runs on both server and client. Pluggable storage (indexeddb, sqlite, durable objects), syncs over websockets, and works with your favorite framework (React, Solid, Vue, Svelte).
https://triplit.dev
GNU Affero General Public License v3.0
2.1k stars 59 forks source link

SolidJS #147

Open Blankeos opened 1 month ago

Blankeos commented 1 month ago

Hi! Awesome stuff. I've been pulling my hairs solving local-first. How are you guys seamlessly making this look easy. Any limitations encountered so far? What conflicts can Triplit not handle?

In any case... It would be great to have a Solid adapter for this. How much work would it take to port an adapter for SolidJS? (If it's not super difficult, I'd love to give it a shot)

matlin commented 1 month ago

Glad to hear you're excited about Triplit!

re: Conflict Limitations: Currently, Triplit treats all attributes as a Last Writer Wins Registers so it can handle most situations that are primarily CRUD. However, there are cases where an app might need more complex resolution strategies that Triplit currently doesn't support. E.g. in the future, you'll be able to directly handle Collaborative Text, Distributed Counters, Reorderable Lists, etc. Some of that is still possible currently just requires more work, like here is an example of doing collaborative text with Triplit.

re: Solid support: I think adding it would be pretty straightforward to be honest, I think you should give it a shot! Since Solid components only run once it should be pretty straightforward to wire up Triplit Subscriptions to a signal if I had to guess. Don't hesitate to ask any questions in our Discord if you want faster collaboration on it!