Skip to content

How should this integrate into the Python library? #7

Description

@kj7rrv

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?

Activity

  1. TheLastProject commented on Jan 22, 2022

    @TheLastProject
    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.

  2. kj7rrv commented on Jan 22, 2022

    @kj7rrv
    Author

    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.

  3. TheLastProject commented on Jan 22, 2022

    @TheLastProject
    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.

  4. kj7rrv commented on Jan 22, 2022

    @kj7rrv
    Author

    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.

  5. TheLastProject commented on Jan 22, 2022

    @TheLastProject
    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.

  6. kj7rrv commented on Jan 22, 2022

    @kj7rrv
    Author

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

  7. TheLastProject commented on Jan 22, 2022

    @TheLastProject
    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.

  8. kj7rrv commented on Jan 22, 2022

    @kj7rrv
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions