GSoC 2015 Week3

Another week of exam…

I’ve mainly done two things this week, finishing ID-89 and ID-102.

There is not much to talk about ID-102, just deleting and replacing… For ID-89, refactoring ldap.js, It’s been a long time that I noticed that operations related with ldap.js would be much slower than the ordinary. After checking the search operations, I found that the old one will use search which has baseDN of ou=users,dc=openmrs,dc=org and a filter of uid=USERNAME. Then inspired by intuition, I realized that LDAP server may highly possible first fetch all entries under baseDN and then use that filter to select the items. This would be intolerant in production, as we can directly find the entry via DN of uid=USERNAME,ou=users,dc=openmrs,dc=org.

After performing a little experimentation on my machine and proving that search with direct DN would be 1 times more faster than with filter. I rewrote all the operations in the new ldap.js. Hence, this time, the refactor doesn’t only focus on logic flow and readabilities, but also efficiency.

TODO for Next Week

  • ES6 investigation
  • Something else interesting

GSoC 2015 Week2

Well… Exam period is coming… For the sake of GPA, I have to spend lots of time on reviewing. Hence, commits were getting less.

However, goodnews is that the midterm goals are kind of easier compared to those final, and I’ve finished a lot. Currently I’m working on managing front-end dependencies by Bower, which is a npm-like package management tools. Though the task itself is rather easy, all I need to do is find the referrence and replace it, some parts of codebase of Dashboard are kind of aged with lots of deprecated code and dependencies that sometimes will confuse developer, namely me for now. So besides adorpting Bower, I’m also reviewing our code-base to filter out-dated parts which would make things easier in the future. That’s work related with ID-102

Also, I’ve been working on ID-89 as well which aims to refactor ldap.js and add tests.

To summarize:


  • Reviewed some parts of Dashboard front-end thing.
  • Refactored ldap.js and added some tests for it.


  • Finish these tasks: ID-102 and ID-89.
  • See what I can achieve with ES6.

GSoC 2015: Week1

The first week has passed with not too many troubles, and I hope that this could last for the whole summer. :)

Though having pressure to deal with school works as well, I still managed to deliver some simple work. It’s ID-105 that concerns about creating and synchronizing the OpenMRS-ID with Talk’s account system.

Well, originally I thought this would be a simple task that only costs a few hours. However, it’s not that easy. From my work log, I can recall that I’ve spent one and a half day to get the testing environment set up. The Discourse has a paucity of documentation, like many start-up opensource projects, and it’s also a Ruby on Rails project, which is a technique I’m totally unfamiliar with. And after setting up the environment, I then used a day to mess around with its API, which turns out to be inappropriate. :/ So exhausted I am, I decided to use the brutal-force way, which is to imitate user’s login behaviour as SSO will handle the sync automatically.

Right before I deliver my PR, Robby notified me about the newly added PR convention of OpenMRS listed here. The guide suggests us to use git rebase to squash all commits into one and then make the PR. That’s indeed very thoughtful idea. It’s a pity that I only know this now. And then I wrote another script for syncing current accounts.

Anyway to sum up briefly:

What I Have Done

  • Added an auto-sync hook for TALK.
  • Wrote a script to import current accouts.

Actually…… It’s not so much that I have done. Sorry, used a few days to get familiar to development again.

GSoC 2015: New Start

Well, I’ve been luckily enough to get selected in this year’s GSoC with OpenMRS again.

I’ll continue to work on the Dashboard, to make it a better and mature platform, as the works I did last year was a rookie’s first trial. Though it has been running well for quiet a long time, there are appreicably problems remained, as mentioned here

I hope I’ll solve those problems during this summer, and present a better ID Dashboard.