rodekruis / cash-program-design-wizard

The Cash Program Design Wizard tries to help Aid Workers who want to set up best practice Cash Programs for People Affected in multiple contexts.
Apache License 2.0
5 stars 2 forks source link

OFFLINE & CONNECTIVITY #34

Open ORCANLRC opened 3 years ago

ORCANLRC commented 3 years ago

As an AW I want to be able to access the CPDW in times where I have no connectivity to later update the online shared information.

See HCD-Notebook: LOW BANDWIDTH / CONNECTIVITY

elwinschmitz commented 3 years ago

Relevant (code related) reading:

More reading:

ORCANLRC commented 3 years ago

Can we link to the way the AW APP of 121 work flow re data input and saving for later upload?

MiriamRedCross commented 3 years ago

https://miro.com/welcomeonboard/azRjR2JZRzd3bTJTcG5WczZ3ZHcya1U4T01KckFHdkNQYmx3WlJSTUhKdnk2WDNZanhZQktnemZHNlNwOHFDTHwzMDc0NDU3MzU2MTQ1MTI2MzUw

elwinschmitz commented 3 years ago

Can we link to the way the AW APP of 121 work flow re data input and saving for later upload?

The configuration we use for the service-worker of the AW-app: https://github.com/global-121/121-platform/blob/master/interfaces/AW-App/src/ngsw-config.json

An 'interceptor' we use there to 'catch' requests to the back-end when offline: https://github.com/global-121/121-platform/blob/master/interfaces/AW-App/src/app/http-interceptors/retry-interceptor.ts

The 'syncing' functionality is handled by separate components:

(There must be a demo-video somewhere to make this more visual.... ;) )

elwinschmitz commented 2 years ago

Some relevant "Offline First" reading:

(The specific tool RxDB isn't really the point here, as I think it'll be a bit steep learning curve to introduce that tool now into the app.)

CC: @arsforza

elwinschmitz commented 2 years ago

Our server-datastore might need to change to easily support an "offline-first" interface.

Possible tools: https://hasura.io/blog/couchdb-style-conflict-resolution-rxdb-hasura/

elwinschmitz commented 2 years ago

Alternative approach, "online-first, offline-backup": See https://daanstolp.nl/articles/2021/angular-pwa-2/

ORCANLRC commented 2 years ago

three options we have: we will go for number 2 1: offline first : issue: too little time & too new to all 2: cache user actions : posting answers ( one edit user is best otherwise they over ride each other) positng comments (out of sync) 3: no offline scenario

elwinschmitz commented 2 years ago

Interesting talks: https://pwasummit.org/