Skip to content

Decoupling Sync APIs from FhirEngine for Broader Functionality #2456

Open

Description

Describe the Issue
FhirEngine package is reponsible for handling all apis related to storage.
Sync package is reponsible for handling all apis related to sync.

However we identified certain issues in the current implementation of placing the sync APIs in the FhirEngine interface:-

  1. Tightly coupled Sync and FhirEngine packages.
  2. Misplaced responsibilities like UploadProgress in FhirEngine package
  3. Redundant data models like SyncUploadProgress and SyncJobStatus.InProgress
  4. FhirSynchronizer.synchronize can return a Flow<SyncJobStatus> #2386
  5. Inaccurate tracking of SyncJobStatus due to "completion-event" preceding room db update #2363

We realized that these issues stem from the assumption that the custom sync APIs (syncUpload and syncDownload) are used against a FHIR-server. This makes using the sync APIs in the FhirEngine interface difficult.

Hence we decided to refactor the sync APIs and move them to an internal interface just like FhirEngine called FhirSyncDbInteractor.
More information in this doc.

Would you like to work on the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions