Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoupling Sync APIs from FhirEngine for Broader Functionality #2456

Open
MJ1998 opened this issue Mar 2, 2024 · 0 comments · May be fixed by #2450
Open

Decoupling Sync APIs from FhirEngine for Broader Functionality #2456

MJ1998 opened this issue Mar 2, 2024 · 0 comments · May be fixed by #2450
Assignees
Labels
effort:medium Medium effort - 3 to 5 days P2 Medium priority issue type:code health

Comments

@MJ1998
Copy link
Collaborator

MJ1998 commented Mar 2, 2024

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?

@MJ1998 MJ1998 linked a pull request Mar 3, 2024 that will close this issue
7 tasks
@aditya-07 aditya-07 added P2 Medium priority issue effort:medium Medium effort - 3 to 5 days type:code health labels Mar 4, 2024
@MJ1998 MJ1998 changed the title FhirSyncDbInteractor: move FhirEngine's sync APIs to an internal abstract db layer. FhirSyncDbInteractor: move FhirEngine's sync APIs to an internal DB wrapper interface Mar 4, 2024
@MJ1998 MJ1998 changed the title FhirSyncDbInteractor: move FhirEngine's sync APIs to an internal DB wrapper interface Decoupling Sync APIs from FhirEngine for Broader Functionality Mar 4, 2024
@MJ1998 MJ1998 self-assigned this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:medium Medium effort - 3 to 5 days P2 Medium priority issue type:code health
Projects
Status: New
Development

Successfully merging a pull request may close this issue.

2 participants