Skip to content
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

How should this integrate into the Python library? #7

Open
kj7rrv opened this issue Jan 22, 2022 · 8 comments
Open

How should this integrate into the Python library? #7

kj7rrv opened this issue Jan 22, 2022 · 8 comments

Comments

@kj7rrv
Copy link

kj7rrv commented Jan 22, 2022

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?

@TheLastProject
Copy link
Member

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.

@kj7rrv
Copy link
Author

kj7rrv commented Jan 22, 2022

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.

@TheLastProject
Copy link
Member

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.

@kj7rrv
Copy link
Author

kj7rrv commented Jan 22, 2022

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.

@TheLastProject
Copy link
Member

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.

@kj7rrv
Copy link
Author

kj7rrv commented Jan 22, 2022

Okay sounds good. Do you think speed would be an issue for the GUI using files?

@TheLastProject
Copy link
Member

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.

@kj7rrv
Copy link
Author

kj7rrv commented Jan 22, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants