Time has flew so fast and it is one more coding week in the GSoC. This week i finished the logged in users indicator with completing both graphs for the Logged In Users Count as ell as created listeners, deletion thread for the indicator.
In order to enable user log in tracking when the module is started, it is needed to invoke the 'Enable User Login Tracking' button from the module home page as below.
After that when you go to User Logins: section the below is the view of the charts for logged in users per each 30 second and for each 5 minutes.
Since the coming week is the final coding week for GSoC as agreed with my mentor Pascal, i will be working on getting one more application indicator done, which is 'completed forms per hour/day'.
In addition this week i also spent time on working on my final evaluation video for the project which will be added into OpenMRS talk page in the coming days after i finalize it with my mentor.
Below are the commits for the feature this week.
[1] https://github.com/openmrs/openmrs-module-systemmetrics/commit/96acbd28d31134cf0dbaa4589b13033205b537cd
[2] https://github.com/openmrs/openmrs-module-systemmetrics/commit/af7ae56fae686a5077b34a10a3ff7baa8749d4c3
Showing posts with label module. Show all posts
Showing posts with label module. Show all posts
Sunday, August 3, 2014
Thursday, July 24, 2014
GSoC Week 10: Application Indicators - Getting user log in count chart
Since my previous attemp of getting logging in users through a SessionListener failed, this week i started back with two alternatives.
1. As suggested by my mentor Pascal, i tried to use a scheduler task for this. But since the task also doesn't have HTTPSession infomation this was not successful.
2. Created a new UI button to enable user login data tracking. When it is tirggerred the HTTPSession of the servlet request is passed to the Collector thread and logged in user count is retirved and stored into the databse from here onwards.
Below is how it is done.
I added a button to UI to click to enable login indicator. When user clicks this button it starts the LoggedInUsersCountCollectorThread with the session as below.
@RequestMapping(value = "/module/systemmetrics/track", method = RequestMethod.GET)
public void track(HttpServletRequest request)
{
loggedInUsersCountCollectorThread = new LoggedInUsersCountCollectorThread(request.getSession());
Thread loginThread = new Thread(loggedInUsersCountCollectorThread);
loginThread.start();
}
After that i can use the current session and get logged in users from time to time. This is similar to how the OpenMRS Core --> Administration --> Maintenance --> View logged in users section is also getting the users list.
public void track(HttpServletRequest request)
{
loggedInUsersCountCollectorThread = new LoggedInUsersCountCollectorThread(request.getSession());
Thread loginThread = new Thread(loggedInUsersCountCollectorThread);
loginThread.start();
}
After that i can use the current session and get logged in users from time to time. This is similar to how the OpenMRS Core --> Administration --> Maintenance --> View logged in users section is also getting the users list.
Below is the chart view of the stored data which is calculated every 30 seconds.
Here are the commits i made for the feature within this week.
- https://github.com/openmrs/openmrs-module-systemmetrics/commit/e9a36740f2eddf35e6d5e435c13286735aecf0be
Since there is a new JIRA project is created for our project now i created the first feature entry there.
- https://issues.openmrs.org/browse/SPU-1
Sunday, July 13, 2014
GSoC Week 08: System Performance and Utilization Module v1.0.0 Released !!
This week i released the first public available version of System Performance and Utilization Module. The 'systemmetrics-1.0.omod' is now available in the OpenMRS module repository and i created the corresponding Git tags v1.0.0 as well as the module documentation.
Below i would like to mention the useful references that helped me in releasing a module against github.
Once you follow the given instructions github will be automatically having the release tag in the git hub repo as below.
https://github.com/openmrs/openmrs-module-systemmetrics/releases
However i still need to deploy the module artifacts into remote nexus repository as i currently don't have access for it. I have submitted an access request and awaiting response on it.
There are few tasks for me to getting done with the 1.0.0 version. First one is deploying the artifacts into nexus. then create a JIRA project and also upload a video on using the module. While working on these things getting done, i hope to move into Application Indicators Implementation from next week too.
Below i would like to mention the useful references that helped me in releasing a module against github.
1. Releasing a module
https://wiki.openmrs.org/display/docs/Module+Tagging+and+ReleasingOnce you follow the given instructions github will be automatically having the release tag in the git hub repo as below.
https://github.com/openmrs/openmrs-module-systemmetrics/releases
However i still need to deploy the module artifacts into remote nexus repository as i currently don't have access for it. I have submitted an access request and awaiting response on it.
2. Module Repository Location
https://modules.openmrs.org/#/show/162/system-performance-and-utilization-module3. Module Documentation
https://wiki.openmrs.org/display/docs/System+Performance+and+Utilization+Module4. Module Source Repository
There are few tasks for me to getting done with the 1.0.0 version. First one is deploying the artifacts into nexus. then create a JIRA project and also upload a video on using the module. While working on these things getting done, i hope to move into Application Indicators Implementation from next week too.
Friday, May 30, 2014
GSoC Week 2: Designing database schema for store module data
In this week i had the weekly call with Pascal as usual. As discussed in that, i was mainly working on designing the database schemas for the new module data to be stored. As the first steps i have come up with the following schema for the new tables that will be used in storing system indicators as used memory, heap memory, free memory etc.
Since it is bad practice to define a separate table to each indicator and as it is hard to scale that with time the following design is agreed. We first store metic_name with an id called metric_id in seperate table for all metics. Then another table is used to store real data values against metirc name and id as below.
Metircs Types Table
[ metric_id, time_stamp, metric_value ]
Metic Values Table
[ metric_id, metric_name, metric_type ]
I am now going to follow this way and create the first set of tables and try to store memory data here.
In addition we discussed on handling historical data. As we can't store previous data forever since database is growing, we are going to have a periodical call to calculate the aggregate value of each metric and it will be moved to a seperate table.
I also sent a request to add my new module into OpenMRS reporsitory this week.
Friday, May 23, 2014
Beginning coding with GSoC - Adding a new module
This week started the coding for Google Summer of Code project. As the first task i started writing the new module structure using maven archetype document reference in [1]. Also i discussed with my mentors Pascal and Jan through mail about the first set of indicators to implement and how to do that. Since this is the first week i still didn't start coding for the indicators but focused on creating the now module and adding it to github. As agreed by three of us the new module will be named as openmrs-module-metrics.
Below are few snapshots from the module home page. I will be adding this to github soon and will be starting the coding from next week as planned.
[Module Home Page]
[1] https://wiki.openmrs.org/display/docs/Creating+Your+First+Module
Below are few snapshots from the module home page. I will be adding this to github soon and will be starting the coding from next week as planned.
[Module Link from OpenMRS Home]
[Module Home Page]
[1] https://wiki.openmrs.org/display/docs/Creating+Your+First+Module
Sunday, May 18, 2014
Community Bonding Period of GSoC
During the community bonding period, i had two calls with my mentors Pascal and Jan. In first one we introduced ourselves and discussed about project requirements. As per my mentors guidance, i created a google doc where we will be discussing and adding project requirements and added it into OpenMRS wiki here.
GSoC Project Requirements:
https://wiki.openmrs.org/display/projects/System+Performance+and+Utilization+Module+Requirements
In the second week we identified few main indicators that needed to be searched and tried to implement as first phase and my mentor, pascal requested me to find out how that data can be captured and presented therefore i spent the week on them. Also learnt on how to write a new OpenMRS module as below since it will be my first task to get started with project.
How t write a new module:
https://wiki.openmrs.org/display/docs/Creating+Your+First+Module
GSoC Project Requirements:
https://wiki.openmrs.org/display/projects/System+Performance+and+Utilization+Module+Requirements
In the second week we identified few main indicators that needed to be searched and tried to implement as first phase and my mentor, pascal requested me to find out how that data can be captured and presented therefore i spent the week on them. Also learnt on how to write a new OpenMRS module as below since it will be my first task to get started with project.
How t write a new module:
https://wiki.openmrs.org/display/docs/Creating+Your+First+Module
Subscribe to:
Posts (Atom)




