Improving Initialization — An Intern’s Story
My three-month-long internship at VoltDB was meaningful and unforgettable. By working with all the talents in this company, I’ve learned countless coding techniques, which deepened my knowledge of software engineering, and sharpened my communication skills.
My main work at VoltDB was to help improve different data loaders, importers and exporters. I had two mentors, Anish and Ning, to guide my work. They are both experienced engineers and good at helping others overcome technical obstacles.
My internship began with adding small features to the database, such as improving error messages or tracking unhandled exceptions. Once I had become familiar with the development environment and the code review procedure, more interesting yet challenging tasks were assigned.
The first big task assigned to me was to change how VoltDB initializes its root directory. VoltDB used to initialize its working directories with absolute paths. Therefore, if our user wanted to move the data but reuse the database deployment file, they had to change the path settings manually. My task was to let the database initialize its root directory with relative paths. This task was not as easy as it seemed, because the call hierarchy of obtaining a path from the runtime environment could be very long. What’s more, each method in this call stack was also used by many other modules, and some of them required absolute paths. Most importantly, an incorrect path setting might lead to unexpected behaviors, both of which were unacceptable consequences. Because different callers made different assumptions on what type of path they could get from the environment, special attention was needed to make sure that no path getters had altered their postconditions after my modification.
This was the first time that I came to appreciate greatly the convenience of the JUnit library. It saved me a tremendous amount of time in testing the code. On the other hand, my mentors were very warm-hearted to help me refactor the code. It didn’t take long for me to finish this task because of their assistance. And it was very satisfying to see my contribution getting merged into the product and released into customers’ hands.
Learning and Building Auto-Reconnect
My second big task was to add an auto-reconnect feature to all the data loaders, such that they would wait rather than stop when all connections to the database were lost. The most challenging part was to design a robust procedure callback so that there was no data loss during the waiting period. In order to implement this callback, Anish, Ning and I had many discussions. They were highly enthusiastic in explaining the call hierarchy and making suggestions on the design. From their timely feedback, I learned a lot aboSut using monitors, executors and synchronized blocks to build a reliable concurrency model.
It was a very enjoyable and rewarding experience to intern at VoltDB. The working environment was relaxing, and I kept learning new things almost every day. I have never regretted spending my summer here.