Closed f-odhiambo closed 2 years ago
Based on the approach outlined in the related discussion and doc, this is the set of tasks which Trevor and I will be working on:
SyncPayload
class.SyncSenderSession
interface.SyncReceiverSession
interface.ConflictResolutionStrategy
interface.SyncSender
class.OursConflictResolutionStrategy
class.TheirsConflictResolutionStrategy
class.SyncRecevier
class.SocketSyncSenderSession
class.SocketSyncReceiverSession
class.Collating some of the relevant links:
GitHub issues and discussions:
Android FHIR SDK server sync implementation:
OpenSRP Android P2P Sync:
GSoC findings and demos:
Past meeting notes:
@f-odhiambo On one of the calls the other day we talked about how the permissions part of this issue is a large and complex piece of work which should rather be tackled on its own. Could we split that part out into a new issue so that this one focuses only on the P2P sync part? Or maybe we could just note in the description that it's out of scope for this piece?
@f-odhiambo On one of the calls the other day we talked about how the permissions part of this issue is a large and complex piece of work which should rather be tackled on its own. Could we split that part out into a new issue so that this one focuses only on the P2P sync part? Or maybe we could just note in the description that it's out of scope for this piece?
@bausmeier I think I can note andalso create a Discussion board around it . Ill follow up on this
For the UI components, let's discuss w/Roger before we start any work on this, I think we'll want to have him design it out a bit first
Will do. I think we'll need input from some others on the UI aspect, and how best to implement it to. I'm planning on setting up some time to chat about this.
Discussed with @bausmeier + @trevorgowing this morning and drew this diagram to represent the data flow:
@f-odhiambo @pld does this represent the use case correctly?
My understanding is that this represents the most complex scenario we've encountered so far. We also have cases with no DHO, i.e. the CHSSs have connectivity and connect directly to the server.
@AnnieMungai what types of configurations do you think we'll see in the Liberia project?
@rowo does this cover the campaigns use-case, or are there other use-cases we'll need to support in the next year you can think of that this does not cover?
Thanks @pld. The most important thing for the SDK support here is that there will be 2 types of nodes
@pld currently any user can be able to sync data from any other user as above mentioned and also be able to sync data online.
(edit: Numbered the configurations for easier referencing)
@jingtang10 Does any user being able to sync to the server invalidate the approach we had in mind? I think that 1-5 should still be workable individually, but the combination of CHAs being able to sync with one another (1) and also being able to sync to the server (6) might be a problem. I can imagine that CHSS >> CHSS could also complicate things quite a lot.
mvp complete, closing
P2P sync is an essential component of the Liberia CHW app. Given that CHWs are always offline, P2P sync is the only way to get data to the server. There is no viable solution in that environment without functional P2P sync.
The P2P sync is primarily used on the monthly supervision visits conducted by the CHW supervisors (CHSSs). The CHSS is tasked with visiting each of their CHWs once a month. During this visit, they will bump all data off of their CHW’s device onto their own. Then, once a month, the CHSS will bump data to a district health officer (DHO) for them to sync to the server.
In our current implementation, we also allow CHWs to bump data between devices because there are use cases where one may not be able to reach a CHSS as reliably. In this case, a CHW will store that data on their device but not be able to interact with it (as the patients are not a part of their catchment).
These workflows introduce some complexity in terms of permissions and editing. For example, in Liberia, we consider the data on the CHW’s device to be the source of truth. Therefore, CHSS’s, though they can access all patient data, are not to edit those records. And if they do, at sync, the CHW’s record will trump. We may explore solutions upstream via restrictions in the app, but it is important to note the potential impact of P2P sync on sync.
Some tasks
Acceptance Criteria This should cover cases such as