Skip to content

tagin! offline version #21

Description

@ijdoc

Imported from: https://github.com/idrc/tagin/wiki/Draft:-tagin!-offline-version

Proposal 1

  • Whenever the user uses a URN, the app makes a local copy of it on his device (the copy always reflects the latest value accessed).
  • When the app goes offline: the app makes use of the local resources it has previously gathered [1].
  • When the app comes back online: the app simply switches back to the cloud provider [2].

Remarks

[1] It is debatable whether or not the local copies should continue to behave like global URNs (i.e merging with neighbours & pushing away close neighbours), or should just be set into a read-only mode.

[2] At this point, should the app:

  • Drop all of the local copies?
  • Keep the local copies (do nothing)?
  • Update all of the local copies as soon as it gets back online?

Activity

ijdoc commented on Aug 12, 2013

@ijdoc
ContributorAuthor

@elyas-bhy this is a good start, here are my suggestions:

  • Let's start by implementing your local copy idea but with a bit more flexibility. What about using a parameter on a server call so that users of the Android library have access to any number of neighbours that can be temporarily stored for local/offline use. I believe you already implemented a call to retrieve any number of neighbours, so this might just involve exposing an easy way to navigate the data retrieved through the library... e.g, a DB cursor.
    • It is important to note here that we should allow for an ordinal way to sort neighbors. For example, if a developer requests 15 neighbours but the URN only has 5, then we should look at retrieving the neighbours' neighbours going from the closest to the furthest neighbour. So the only time when we would retrieve less than 15 items is if the DB actually has less than 15 entries or if there is a discontinuity where, for instance, we have only 10 URNs somewhere in Canada and another 12 somewhere in France. Then there would not be enough neighbours' neighbours to fulfil the query. You might have already done this, just pointing it out. Hope this is not too confusing.
  • Also, we should start by making local copies read-only... we can assess later whether we need to expose any engine functionality while offline (preferably not given the argument you made earlier about not implementing local URN generation). Instead, we should save all raw queries for the server so we can send them as soon as we are online.
  • Finally, we should always keep a set of updated copies (i.e., update all copies when we are back online). The size of this local DB should be determined by number 1 above.

Hope this makes sense, sorry about the delay in getting back to you! Now to check the demo app.

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions