Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Next »

The synchronization flow is triggered when

  1. The user logs in for the first time

  2. The user manually initiates sync.

Synchronization needs an active internet connection to succeed.

Eligible data for sync

Uploads

  1. Entries created via dynamic forms

  2. Analytics data

Downloads

  1. Dynamic forms schema

  2. Form specific localizations

  3. Aggregated data points for dashboards

  4. Static SoS contact information

  5. Map tiles

  6. Routing information

Sequence Diagram

 https://sequencediagram.org/
..Ititle Offline Sync Sequence

participantspacing equal

fontawesome f007 User
fontawesome f10b Client

fontawesome f1c0 "Local Database" as DB
fontawesome f233 "Campaign Service" as Api
fontawesome f233 "Storage Bucket" as Storage
fontawesome f233 "Tile Server" as Tile
fontawesome f233 "Routing Server" as Routing


frame Offline Sync

autoactivation on
create User

User ->> Client: Sync
destroysilent User
Client -> DB: GET //access_token//
DB --> Client: //

alt OFFLINE
Client -#redx Api: Sync Request
deactivate Api
else ONLINE

par DOWNLOAD
Client -> Api: Sync Request
Api --> Client: <align:center>//Form Config, Static SOS data,  Form specific Localization,Aggregated\ndata  for dashboards, Map boundaries, routing information//</align>
Client -> DB: Persist data, form config, \nand locaization strings
DB --> Client: //

par Map caching
Client ->> DB: Clear local map cache
deactivateafter DB
Client ->Tile: GET tiles for boundary
Tile -->(2)Client: //
Client ->> DB: Persist tile data
deactivateafter DB

thread Routing Information
Client ->Routing: GET routing information for points
Routing --> Client: //
Client ->> DB: Persist route data
deactivateafter DB
end

thread UPLOAD
Client -> DB: <align:center>GET all entries where \n**isSynced=false**</align>
DB --> Client: //

Client -> Client: Compile entries into a file
deactivateafter Client

Client -> Client: Generate file checksum
deactivateafter Client

Client -> Storage: File
Storage --> Client: //File URL//

Client -> Api: FileURL + checksum
Api -> Api: Verify checksum
deactivateafter Api

Api --> Client: //

Client -> DB: UPDATE entries as synced
DB -->Client: //

end

end

autoactivation off
  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.