-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use with expo-sqlite #15
Comments
@smontlouis hey! I am glad that Trong meet your needs 🙂 I was able to connect expo (web and native) with Trong, here you can check example https://github.com/trong-orm/trong-expo-example. You will need to specify custom webpack config: And create metro file: |
As for the road map — add missing parts to query-builder, finish doc, add other platforms support Fork absurd-sql, fix jlongster/absurd-sql#30 , maintain it. Also, in the far future I want to build a data synchronization mechanism on top of the Trong |
Here is the guide: https://trong-orm.netlify.app/react-integration/expo-installation |
This is the best news of the week ! I've been delaying the native development of our project for a while now because I couldn't find a good offline-first strategy. And I'm very happy to see that you'll add a data sync on top of it, because it was something I was planning to manually handle ;) |
Yep, I too. I was developing https://github.com/quolpr/harika, and decided to move all ideas to Trong ORM 🙂 I tried watermelonDB, rxdb, realm too, and all of them were missing something. And, overall, IndexedDB just sucks in performance. Regarding riffle— I am very excited too. There is a presentation that was uploaded recently where you can get some insides — https://www.youtube.com/watch?v=BmgL1SRfUyc
I am not sure when I will start working on it and how much time it will take. So I suggest for not is build your own sync system |
All good ! Thanks. @quolpr may I ask what will be your strategy for the sync system ? I took a look at jlongster's app and the database itself is CRDT-like. I was thinking about having in addition of the regular sql tables a "messages" table that will contain all of the atomic changes happening in the db at a field level, like the crdt-example-app As soon as an insert / update / delete action is performed with trong-orm, a message is sent to the server. If the user is offline, these messages are stored in the "messages" table. It's quite a naive approach, but it's not a collaborative tool, just a multi-device tool with offline support. Thank you ! |
@smontlouis good enough 🙂 Actually what I was doing — collecting all the changes on the client, sending to the server, server was recalculating all the changes from the start for a particular entity(and changes are ordered by timestamp + node name), and sending back the calculated entity. So there are no conflict should be happened, but some data could unexpectedly rewritten (in case when changes for the same field in the entity happened on two clients when both were offline) — for that case you can implement the time travel (because you have all the changes that were made before) 🙂 |
I want to implement similar algorithm that I described above on top of the trong-orm |
Awesome library! We've been waiting for this!
We're looking for a reactive react native library to communicate with sqlite.
Do you plan on making it compatible with expo-sqlite? May I ask what is your road map?
Thank you.
The text was updated successfully, but these errors were encountered: