Development in Sync

Hello All!

I developed interest in sync development and i have read all the documentations written about sync here. This has given me an overview about Sync 2.

When i passed through the existing Sync.2-issues and thought of first trying out the Person pull and push, or any other Object pull and push because they seam simpler since i am new to this development.

Depending on the proposed way of resolving the Sync Conflict, it was stated that (in a summary) when creating either a pull or push, we must first calculate the hashcodes of both the Parent and the Child which are then saved. We should note that data is both in form of FHIR and non-FHIR. A pull or push is done using the following steps:

  1. When creating a pull, the child pulls from the parent.

    • The Child reads through the atom feed exposed by its Parent and filters out events it is not interested in

    • For events that it is interested in, the data is pulled from Parent

    • The data is persisted by the Child.

  2. When creating a push, data is being pushed to the Parent node from the child.

    • Read own data feed, filtering out events that don’t need to be synchronized with Parent

    • For events that need synchronization, read them from local endpoints either using FHIR or REST services

    • Push the representation to Parent

I seek for more information, on how to start. I have information but i dont know what i should start with. Thanks!

cc @dkayiwa @tendomart @ssmusoke And any one who would wish to join the discussion.


@jnsereko , where are you stuck ,??

1 Like

If i am working with the Person Object, and i want to develop a pull for the object how can i trigger a pull using ParentFeedReader.

I think this should be the first approach,

i hope i got you question . But all AtomFeed operations are abstracted from the user by the Sync. I would think you wouldnt worry about the AtomFeed operations.

are you trying to demo out the module, pushing and pulling person objects ?? or is the person object curently not supported by the Sync ??

exactly :+1: Person Object isn`t supported by sync. You can look at the ticket, , may be i am the one who got this whole thing on a wrong point of view.

@jnsereko thank you for taking interest in sync2… First, have you tried setting up two server instances( you may find this post helpful Error while Building Sync2 module)… Most times it is beneficial to understand a module from an implementer’s point of view before tinkering with the actual code… Secondly checkout the tickets that are unsolved and try to reproduce the bugs mentioned or enhancements mentioned… Then u can have a happy coding journey through the module

You are right, Thanks @reagan


@jnsereko had you wanted to do GSOC ?

1 Like

Yes. I even managed to submit the final proposal though it wasn’t that good. The reason as to why i didn’t reach you guys in time was because i submitted the proposal in the last days.

Am sorry for not informing you in time.

You should have shared submitted for review then get our feedback.

1 Like

It was only few days to the closure of the final submission, when i finished my proposal. I thought u guys would have no time to peruse through the proposal before submittion.

@jnsereko I have noted your PR and I thought I would share with you some points to consider when trying to understand most of the Openmrs modules (these are not rules engraved in stone but I have found them helpful)

  1. Get a clear understanding of the MVC pattern in spring because all modules are built on this philosophy
  2. Start your investigation in the omod folder
  3. You then should find the index page controller in the omod which will redirect you to either the main gsp or jsp
  4. Understand how the uiframework leverages this to call fragment pages through fragmentControllers… This approach will easen you first impression of the module including it’s APIs. Happy coding
1 Like

Thanks @reagan, Let me do as you have advised. I am sure i will find it of importance.

For sure i even couldn’t tell how the classes link to each other.

1 Like