Skip to content

Instantly share code, notes, and snippets.

@pg301
Last active January 2, 2018 15:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pg301/a282062645933c48548869a9d7750565 to your computer and use it in GitHub Desktop.
Save pg301/a282062645933c48548869a9d7750565 to your computer and use it in GitHub Desktop.
GSoC 2017 Submission - Pallavi Gupta

GSoC submission 2017

Improving the existing hawkular android client

Link to the entire work done on the app: Github Commits

Link to the module: Hawkular Android Client

Link to project proposal: Android Client Improvents proposal


Introduction

The aim of developing the Hawkular android client was to provide users with a seamless experience of monitoring their servers, by allowing general purpose inventory browsing and quick access to favourite metric and alerts. I planned to take this initiative forward and make the android client more detailed, stable and intuitive to use.

Following are the features which were finalised before starting project-

  • Adding support for full Alert setup and display
  • Adding more details in triggers and improving metric graph visualizations.
  • Improving and rewriting the previously written tests for models and adapters.
  • Writing thorough UI tests using the Espresso testing framework

Weekly breakdown of work done

Community bonding period

During this one month, I spent time reading and understanding Hawkular code and documentation of some of the APIs used in the app.

In this period the inventory API was also modified and was made a part of hawkular metrics. Since the android client had too much dependency on the previous inventory APIs the android application was completely unstable.

Week 1 and 2

Due to the android client's dependency on the previous inventory API, there were serious crashes in the app after changes in the inventory version. Earlier environment fetching was an essential part of Login Activity but the new inventory version didn't have support for environment and as a result we decided to completely bypass the environment fetching part during login.

Link to the corresponding commits:

Week 3 and 4

In the starting of week 3 I started working on the most essential part of my project and that was adding support for full alert setup and display. I created a separate child activity and layout for defining all fields required for setting up a trigger including id, name, auto-enable, type and it's severity. In week 4, I created various model classes that would be required in the backend to support the adding functionality.

Link to the corresponding commits:

Week 5 and 6

When the time came to write new backend calls, the team realised that the current service AeroGear Pipes needs to be replaced by something more easy to understand, fast and scalable. It was the time to shift to Retrofit 2 for making service calls. We started with removing authorisation activity and shifted LoginAuthentication to Retrofit. Along with the shift, I also wrote backend calls for creating a new trigger.

Link to the corresponding commits:

Week 7 and 8

After the shift to retrofit was complete, it was the time to adapt the android client with the recent inventory changes and make it similar to the Hawkular Ruby Client. Inventory explorer in the app was completely broken as it used APIs and JSON structures of the previous inventory version. New model classes were needed to be written and since the data that was returned in the response bodies was encoded in chunks, I borrowed a method RebuildFromChunks from the ruby client and modified it to fit the android client.

Link to the corresponding commits:

Week 9 and 10

After fixing the inventory explorer, it was the time to focus on some other existing problems. Some other APIs were changed and the android code was required to cope up with those changes. I spent time understanding the changes made in the APIs and planned on how I am going to incorporate all those changes in the client. I also gave a demo of my progress on the android client which was viewed by 10 people of the hawkular community. The video conference was recorded and is published on Youtube.

Link to the corresponding commits:

Week 11 and 12

Is is always a good idea to be able to delete what you create, so after creating a trigger I thought why not add a functionality to delete a trigger. So in week 11, I was working on building the infrastructure to delete a trigger. Apart from adding additional functionalities, build fixes were also needed. Metric graph data was not showing up for any type of metric and major work that I did in week 12 was focussed on getting the metric graph display relevant values.

Link to the corresponding commits:

Week 13 and 14

Last two weeks were majorly focussed on winding up the leftover work and writing documentations on the work done in the past. Leftover work included linking the trigger setup functionality to inventory explorer. Long click on explorer items (metric) enables the user to add a trigger to that particular metric. I have uploaded a detailed video tutorial explaining the functionality.

Link to the corresponding commits:

Conclusion

Due to some unexpected changes in the existing APIs, my major focus shifted to fixing the app crashes happening because of changes. A lot of modifications/improvements like adding UI testing using Espresso, shifting the existing layout to Constraint Layout and writing tests for various modules will be on my checklist once GSoC ends.

I am extremely thankful to Anuj Garg, Heiko Rupp, Joel Takavorian and Lucas Ponce for being such amazing mentors and friends. I have grown as a person during these 3 months and have learnt things I would have never thought of. I would also like to give special thanks to Hawkular community members for their extensive support and guidance and for making me feel so comfortable.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment