Skip to content

Instantly share code, notes, and snippets.

@zweicoder
Created July 30, 2015 09:56
Show Gist options
  • Save zweicoder/cda63bb0b9e892fe82d5 to your computer and use it in GitHub Desktop.
Save zweicoder/cda63bb0b9e892fe82d5 to your computer and use it in GitHub Desktop.
Outline
1. Internship Achievement
• Intern project
• Message serializing using ProtoBuf
• Release process mapping and optimization
• AlarmPoint setup
2. Learning Experience
Intern project
Problem analysis:
When dealing with big databases and with multiple development teams working on it at the same time, a common problem that most development teams will face is Database Change Management. Simply to say, it is the problem that multiple people work on the same database. The changes they apply on the database will clash and it may break the environment.
Imagine how a Singapore team gets to know the schema change that a London team made to their shared database when they takeover at the end of the day? The answer is, they do not know. This results in lots of development time being spent simply on sorting environment problems. And even those two teams are in the same place; it is still very hard to find out what has been changed to the database. Sometimes it is changed by the program or just any wrong operation will cause the database structure change.
The current solution is a technology called Liquibase, which can be used to apply the database “change sets” to each environment and there will be file to record all the change set created. But there are some limitations that Liquibase has:
1. Firstly, the change set for Liquibase is difficult to manage. Liquibase keeps all the change sets in .xml file. It is hard know who created it and why they created it. And most importantly, there is no direct way to know whether the change set is applied or not and which one is the latest one. In another word, Liquibase has no change set management.
2. When the change sets are written in xml, it is not human readable. Most developers will not be so happy to deal with XML.
3. There are no visual tools available for creating, applying and backing out the change sets. The effect of a rollback or apply cannot be viewed. And when an user want to create a new change set, he has to open the .xml file and type all the tag by himself in the correct order and with out any typo. It is not user-friendly and intuitive.
4. Lastly, Liquibase does not provide the rollback test function for change sets, which means it does guarantee all the change sets can be rolled back. If unfortunately, a change set breaks the database and at the moment you figure out it can’t be rollback, everything is too late. The database has already broken. So having rollback testing is very important if we want the database change management system to be really useful.
Solution:
Name of our product: Airbase
Airbase helps developers do database change management in an extremely easy way. Here are some of its advantages:
1. A database change management system. The system helps in managing changes, in our context, changesets. changesets that have not been applied to the database got separated from the ones that have already been applied.
• The applied changesets are sorted in the order of apply so that when you look at a certain changesets, you know that the changesets above it are applied after this one, and the ones below it are applied prior to it.
• Each changeset is labeled with a name and description so that the purpose and usage of each changeset can be clearly understood.
• Airbase also provides tag function. Those green bars on the changeset list are tags. It is used when the database reaches a stable version. For example when there is a release of version 1.2, then you can add a tag at that point of time to indicate that this is a stable version. Whenever there are some problems in the future, you can always rollback and come back to this version.
2. Allow user to use SQL format and get rid of the XML. XML is not the native language when dealing with databases, but SQL is. SQL is clean, more human-readable and easier to manage, which also means higher efficiency and less human errors.
3. User interface. The benefit of a user interface is quite clear. It realizes different functions in just some mouse clicks. Comparing to using a command line operation, where you don’t get to know where a certain changeset is, what changes are applied before or after this changeset, a user interface is much simpler and intuitive. This also saves a lot of training time.
4. TESTING of rollback. What does it mean? The testing of rollback means Airbase will test whether after migrate certain changes to the database, the rollback can revert the database to its initial state. This is an important function because it makes sure that if in the future you want to rollback to an old version, the rollback can be done correctly without introducing more errors. Now, before you apply any changeset, test it. If it passes the test, it is safe to be migrated to the system and the rollback will not go wrong.
Technologies used:
Backend: SparkJava, REST API, Liquibase
Front end: AngularJS, Bootstrap
Version control: Git
What I have done:
1. Problem analysis
2. Adopt Agile for application development
3. Gathering user requirement and have frequent meet-up with users
4. Learning and using new tool: Liquibase and its Java api
5. Implemented user interface with AngularJS and Bootstrap
Message serializing using ProtoBuf
The team is building a system which needs a lot of data communication with other systems. The current way of doing this is using different formats of data and sends to a message queue. To improve the efficiency, the team was suggested to use a different serializing method to make the message lighter and transmitted faster.
What I have done:
• Specified the data structure in ProtoBuf after trainings and serialize some sample data
• Wrote tests to affirm that after de-serializing, the messages are the same as original
• Demonstrated to the team that ProtoBuf is a feasible solution
Release process mapping and optimization
The team I am in is an Agile team, hence inside the application development team, there is also a small group working on release to communicate with groups in operation side.
What I have done:
• Understood the release process
• Mapped release process in different environment (DEV, SIT, UAT, PROD) and identified whether each step is automated or manual, and whether developers are involved in these steps.
• Through understanding of release process, identified unnecessary steps and optimized release process.
AlarmPoint setup
AlarmPoint is a notification tool provided by the company and it is first introduced to the team. My job is to setup the tool and make sure it can work properly.
What I have done:
• Received trainings on AlarmPoint and learned how to do basic setup
• Communicated with team members to have their profiles updated
• Setup schedules to do notification
• Tested different functions of AlarmPoint and resolved problems of not receiving notifications by communicating with people from other teams and support team.
• Gave trainings to team leads for future maintenance
Learning Experience
During the internship program, I had a lot of trainings on technical and non-technical sides.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment