How should this integrate into the Python library? #7
Description
Activity
Should I make it transparent but slow (check at every access) or faster but needing special support (update periodically)?
Well, you probably want to have some separate update thing anyway, just in case there is ever no connection during access.
Also, unless you have plans for how to implement this already, maybe the Python library would work as a storage backend for this?
I think I'd prefer to make this a Django application and just store it in a database like the Android application does. Databases can scale much more nicely than messing with files.
Okay. I could use a database for the python library, if that would help with writing this. I haven't gotten too far to use a database yet, because it will need to support the export format anyway.
I don't think this would neccessarily have to use the library. After all, a Sync server wouldn't have to care about how to display a certain barcode, it just needs to save data and prevent conflicts. The tasks are way different than for a library that is used so a GUI app can do stuff.
Okay.
This is just a random thought, but maybe it would work to use git for this? We would have to create a new format, which stores each card in its own file, with each data field on its own line. That way git's merge algorithm could handle conflicts for cards like it does for code.I don't think gít is a good fit because I don't actually care to keep history and because I want to do conflict resolution on a per-field basis.
And again, hard drives are slow, a database can scale much more easily and much better.
Okay sounds good. Do you think speed would be an issue for the GUI using files?
Well I don't have any experience with the kind of systems that run on something like a PinePhone but databases are literally optimized for structured data so they generally should perform much better and it would surprise me if SQLite would not be available to you.
Yes SQLite is available. The PinePhone is really just a Linux computer with a built in touchscreen and an LTE cellular modem, so anything that works on Linux works on the PinePhone.
Should I make it transparent but slow (check at every access) or faster but needing special support (update periodically)?
Also, unless you have plans for how to implement this already, maybe the Python library would work as a storage backend for this?