SORMAS-Project
SORMAS-Project copied to clipboard
Improve performance of android-app with large data
Situation Description & Motivation
The data sync from the backend to the android-app is quite slow.
Related: #7734
Use cases
This is a rough summary of what is currently being synchronized (for Surveillance Officer):
Cases
- reporting user
- responsible user
- district
- Contact.sourceCase (reporting, responsible, district)
- country shared
Contacts
- reporting user
- responsible user
- district
- Case.contacts
Samples
- cases, contacts, event participants
Events
- reporting user
- responsible user
- district
- event participants by resulting cases
- event participants by district
Event Participants
- event
Personen
- district (address)
- case, contact, event participant, immunization
High-Level Explanation
This is how we could prioritze data to send only a part of it for certain diseases/users:
Prio 1
- reporting user
- responsible user
- +event participant: reporting user -> + related event (maybe pseudonymized)
Prio 2
- Cases: Source cases of (Prio 1) contacts (+ in district)
- Contacts: Contacts of (Prio 1) cases (+ in district)
- Event: district, but withouth event participants
Prio 3
- District
- Country shared
- (Source cases + Contacts of those)
- Event participant: All by district and by event (except in other district) (maybe pseudonymized)
Prio 4 / Pseudonymized data
- Source cases outside of district
- Contacts of cases outside district
- Event participants outside district
Remove
- Event participants by resulting case (since we are not doing it for contacts)
Timeline
Tasks
Make mobile app sync more robust
- [x] #7266
- [x] #7302
- [x] #7303
- [x] #7521
- [x] #7604
- [ ] #9437
Performance
- [x] #8357
- [x] #8946
- [ ] #9320
- [ ] #10293
Reducing data synced to the mobile app
- [x] #7304 OR immediately archive "not a case" cases
- [ ] #7305 -> per disease?!
- [ ] Allow filtering of cases/etc. by their sync status (new, unsynced changes)
Additional options
- [ ] After infrastructure sync allow user to work. Sync cases, etc. in background. When user wants to push data, cancel background sync.
- [ ] Allow synchronization of an individual case or contact including related samples
- [ ] Limit synchronization to priority one data. Users should have a link to switch to the web app
Risks
Additional Information
- Some tickets of #7734 improve the performance under the hood by speeding up filter logic.