Got selected to participate in GSoC back and with the same community OpenMRS. It’s a great community with a lot of new work going on.

About the project

Primary Mentor: Ian Bachler.

Mentors: Jude Niroshan.

Student: Ayeshmantha Perera.

Project Link:

https://summerofcode.withgoogle.com/projects/#6540918858973184.

The main idea of the project is to develop a framework that can capture System metrics as well as data metrics in a real-time way with the ability to expose to monitoring tools such as Graphite, Grapahana, Prometheus.

Currently, the workflow is to get the use of the ActiveMQ based event module which captures Hibernate interceptor based events. (Which fires after completion of transactions) and to feed them into a flat table that records details about the event time type OpenMRS class as well as the resource link to access from the OpenMRS Rest API. This will be the API workflow up to saving these records in a table. So from the client-side, we will be exposing these metrics through Dropwizard which is a great powerful toolkit of ways to measure the behavior of critical components in the production environment. The best thing is we can expose the JMX metric registry with Dropwizard with the built-in reporters. So there is a servelet in Dropwizard which was extended with HTTP servlet which we can use to expose the metrics with an endpoint.

Main Influence for the Project

What is OpenMRS & Where is it?

OpenMRS is a software platform and a reference application that enables the design of a customized medical records system with no programming knowledge (although medical and systems analysis knowledge is required). It is a common platform upon which medical informatics efforts in developing countries can be built. The system is based on a conceptual database structure that is not dependent on the actual types of medical information required to be collected or on particular data collection forms and so can be customized for different uses.

OpenMRS is now in use around the world (see the OpenMRS Atlas), including South Africa, Kenya, Rwanda, Lesotho, Zimbabwe, Mozambique, Uganda, Tanzania, Haiti, India, China, United States, Pakistan, the Philippines, and many other places. This work is supported in part by many organizations including international and government aid groups, NGO’s, as well as for-profit and nonprofit corporations.

Main Objective.

Create a framework that can capture system and server metrics for OpenMRS.

Goals

  • Create a New module with database configurations:- Completed.
  • Ability to subscribe to the ActiveMQ service bus to listen to the Hibernate events of selected resources.:- Completed.
  • Persist events in a flat structured table in the OpenMRS db :- Completed.
  • Extend DropWizard JMX instrumental library to expose System metrics requested.:- Completed.
  • Expose DropWizard Server metrics:- Completed.
  • Expose Ping Endpoint provided by DropWizard:- Completed.
  • Add sample UI to showcase system and server metrics:- Completed
  • Add the DAO level and Service level Unit tests for the project. :- Completed
  • Add a 3rd party plugin flow for monitoring tools like Graphite and Prometheus:- Completed
  • Easy to extend the module for resources required.
  • Easy to handle date ranges for the application:- Completed.

Project Repository

Contributions

Talk Thread links

Blog Posts

  1. Initial Blog
  2. Week 1
  3. Week 2
  4. Week 3
  5. Week 4
  6. Week 5
  7. Week 6
  8. Week 7
  9. Week 8
  10. Week 9
  11. Week 10
  12. Week 11
  13. Week 12

Future Works

Extend the flow and the flat table structure to expose more information on resources.

Final Presentation

Thoughts on GSoC

GSoC is one of the main programmes in the world which encourage and helps people to engage in opensource development. The experience it brings to developers is very valuable for there future work.

As I always mention openMRS is one of the best opensource communities in the world. My mentors were always helpful for me when proceeding on the project. And they motivated me to work towards the end of the project after going through the work I do.

Finally I would like to thank openMRS community who gave me this opportunity to work with the community and also to Google for organizing such an awesome opensource event for the students.

#apache #opensource #openmrs