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

Push notification to update files #43

Open
tobiasKaminsky opened this issue Jun 6, 2023 · 1 comment
Open

Push notification to update files #43

tobiasKaminsky opened this issue Jun 6, 2023 · 1 comment

Comments

@tobiasKaminsky
Copy link
Member

tobiasKaminsky commented Jun 6, 2023

@AndyScherzinger and me brainstormed a bit how to enhance sync on Android or iOS.
He had the idea to use push notification to inform app about file changes.

On Android we store state of a folder in DB:
before

  • go into a folder with 1k images
  • downloads metadata of 1k images
  • stores into DB
  • refresh
  • no eTag change -> nothing to do
  • add one file on server
  • refresh
  • etag change
  • syncs 1k + 1 image metadata

after:

  • initial sync of 1k metadata
  • receive push "added 1 image to folder xyz" + new etag
  • app checks that folder is in DB
  • app adds one missing file to DB
  • checks etag, to verify that no change was missed
  • user enters folder next time
  • only quick etag check
@nickvergessen
Copy link
Member

Just for the record, the text length we are able to transmit is rather short ~150 chars (200 total - some meta overhead).
Also they are not always reliable, but the last etag check would still catch that and proceed as of now, right?

The other question that arises for me is scaling. If a folder is changed on the company instance, hundreds of pushes will have to be prepared and performed, just to have an eventually improvement later on.

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