Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Offline fixes #1080

Merged
merged 29 commits into from
May 18, 2017
Merged

Offline fixes #1080

merged 29 commits into from
May 18, 2017

Conversation

jkleinsc
Copy link
Member

@jkleinsc jkleinsc commented May 8, 2017

Fixes #731
Resolves #863
Fixes #631
Fixes #1077

This is a revamping of how offline works in HospitalRun and it involves several key changes, mostly using the strategy documented here: https://github.com/nolanlawson/pouchdb-with-service-workers

  1. Using https://github.com/nolanlawson/worker-pouch, the default mode for database access will be to access a local PouchDB database inside a service worker. This moves the processing of database requests to a separate thread from the UI thread. It also means that the main database that the app hits is the local database, not the database on the server. The database on the server will only be used for synchronization.
  2. Synchronization between the local database and the server database will be accomplished using the Push API and listening for local changes and synching then.
  3. Offline use will pull directly from the local db
  4. In browsers that don't support Service Workers, database access will be done directly with the server database and no offline support will be offered for those browsers. Optionally, a deployment can be setup with the configuration, disableOfflineSync, set to true which will disable all offline use regardless of browser capability.

cc @HospitalRun/core-maintainers

Copy link
Member

@tangollama tangollama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As if you were seeking it. :)

@jkleinsc jkleinsc merged commit 17d2eeb into master May 18, 2017
@stukalin stukalin deleted the offline-fixes branch August 29, 2018 07:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants