b8Rs8V5
Data Science

Bringing the NASA ISS Food Intake Tracker App to Life


pvmagacho within the Topcoder Community) from Brazil. I’ve been around Topcoder for quite some time now — over 10 years. In the beginning, I participated in a few challenges, encouraged by my brother, who is also a Topcoder member: romanoTC. But due to a lack of time, I had to stop competing for a while. I came back in 2010 and, more motivated, started gaining experience participating in challenges and got a few second and third places. Finally, in October of 2010, I managed to win my first challenge. This made me very happy and gave me the confidence to continue working on Topcoder. In 2011, I started working with the Assembly Competitions at Topcoder, a more complex development track, and this kept me very busy for quite some time. Most of the challenges I participated in were related to Java backend. However, Topcoder started posting challenges targeting mobile devices. That caught my attention immediately, as it was a new technology being introduced. I even decided to buy an iPad to start participating in the challenges, as many of them required that the code run on a device and not only in the simulator.

Beginning work on the NASA ISS Food Intake Tracker app


In 2013, the NASA ISS Food Intake Tracker (IFIT) iPad application challenges started to appear. First the conceptualization challenge, then design, UI prototype, prototype conversion, etc. However, due to the limited amount of time I had to work for Topcoder challenges I wasn’t able to compete in those challenges. My first break in the project came in 2014, when Rashid Sial, Senior Manager of App Development at Topcoder, posted a First2Finish challenge to fix some issues in the iPad application — and I haven’t let go ever since. The project was very exciting since it involved NASA, for which I have a great personal admiration, and mobile device development. However, the first big task I had to solve was the performance of the application.

Trial, error, and success with different solutions


The mobile application would allow users to log into any iPad device available without a password, and should also work offline without connection to the backend server. The offline functionality posed a real challenge in keeping the data synchronized between all devices. The original solution was to use a Samba server where files would be stored with the data entered by the astronauts — and removed when all iPads consumed that information. The performance with this solution wasn’t very good, and from time to time we had some lockups in the iPad application. We decided to replace the Samba server with a database server. The iPad application was going to communicate directly with the database to store the data and a synchronization table was going to be used to keep all the new records entered available so that all iPad devices could have up-to-date information. As soon as the devices were synchronized, the records would be removed. In parallel, NASA also requested a simple admin web page. This tool would allow NASA to insert, delete, and update user and food records. Also, the tool would allow the bulk upload of data from a CSV file. Again, the solution presented its limitations, and we decided to decouple the iPad application from the database. Then, a REST service was created that would expose all the needed endpoints to the iPad application and communicate with the database.Today, that is the architecture of the application. I have to point that throughout the development process, a very close communication with the NASA team was maintained. They provided priceless feedback from their tests and also added new requirements. Also, some bug hunts were needed to find all the issues in the code and point to possible improvements. Eventually, one member was selected to continue working with the QA section of the project. A special thank you goes to Topcoder member nithyaasworld, who helped a lot to find my mistakes — of which there were quite a few! I started growing paranoid about QA because of that, but this process made me realize how important it was for the success of the project.

Astronaut satisfaction and award-winning results for NASA


Finally, when NASA approved the IFIT iPad application and the admin web tool we moved to the last part, which was deploying the backend code to NASA’s servers. Since we didn’t have access to their servers, a virtual machine was used with the same operating system to be used aboard the ISS. In the end, a deployment script was developed to allow all necessary software to be installed and configured. And it was with great pleasure that we learned that the iPad with the IFIT application — along with the backend and database servers — had made its way to the ISS. We even received this quote from an astronaut: “I use IFIT every day, for every meal — it's awesome.” That made me very proud.



[embed]https://www.youtube.com/watch?v=bFiUQsEUH-s[/embed]

In October 2017, we received the news that the project had won NASA’s Group Achievement Award. This was a great news and showed how Topcoder’s crowdsourcing community and platform can bring to life such an amazing and life-changing application. But the biggest surprise was when Rashid contacted me just this month to say that he had received our certificates. I said, What?! Nevertheless, this was really over the top.

A once-in-a-lifetime experience with Topcoder


This has been an amazing year for me at Topcoder. I’ve finally made it as a copilot and now, this achievement award. And the project is ongoing; there is still work to be done to bring more stability to the system and help astronauts keep in shape!

nasa-iss-photo

Final NASA IFIT app designs


I want to give a huge thanks to Rashid, who gave me the opportunity to work on such an amazing project — and who helped me in providing feedback on issues and organizing all the things developers don’t want to handle.


This was a project that started with the Topcoder Community and “ended” with a developer from Brazil who, despite working two full-time jobs (my day job and my dad “job”), managed to squeeze some extra hours in during the day and night to help bring this project, and other projects, to life.

Learn more about the NASA IFIT app right here.