dint-dev/database

Further information about the Reach feature

Closed this issue · 3 comments

Your Database package is very interesting and I'm experimenting with it. The Reach feature sounds like it could be very useful but there doesn't seem to be much explanation about how and where it works. Does it work on any, some or all of the supported database types? Could this be used to syncronise data between, for example, an Postgres database on a server and the client device? Thanks

Hi! Thanks for the feedback!

The API is likely to change a lot before 1.0.... and much of the documentation is missing. We should probably emphasize this in the documentation.

Yes, the reach parameter in various methods is related to synchronization. For example, you may have a local SQLite cache in iOS / Android devices and a global Postgres database in cloud. The reach parameter in document-style API allows programmer to choose the best tradeoff for each read/write operation.

The package doesn't have client/server synchronization yet. Synchronization is a very complex problem and we are exploring various ideas for client/server synchronization such as operation-based CRDTs. Any help on this is welcome!

Yes, synchronisation is tricky - I've written a version for my existing client/server database classes implemented in C++/Java/Objective C. I was about to port my code to Flutter/Dart when I came across your libraries.

Although you refer to parentDatabase, I don't see you assigning one anywhere. I assume that's part of the work to be done? I'll continue to convert my higher level code to Flutter using your libraries (bearing in mind the likely changes to come) and come back to the synchronisation issue a little later.

Keep up the good work!

I close this because we are seeking a simpler, better design for the API and it will take some time before the package is ready for the public.