A Summary

I must say I enjoyed working on the project of discovery of storage servers. It was a great learning experience. This was also my first contribution to the open Web. So I am extremely happy about completing this milestone. This would not have been possible without the team, Alexis, Remy, Mathieu and Nicolas. I often got stuck at places, and they were always ready to help.

To summarize my work during this internship,

– A central repository, that is a collection was created with permissions such that any authenticated user can write to the repository, however, a user can read only the record that the user has written to the central repository.

– To start off, I created a webpage to accept the input of the user’s storage url. Here, on clicking connect to Kinto, the user is directed to the authentication page. Here the user had to add the Firefox Account ID and password. The authentication token was taken and used in headers, to push to the central repository.

Registration of the user’s url had the following usecases.

– If the user entered a user url, that url is pushed to the central repository. This url is mapped to a key that is a hash of the user ID

– If the user did not enter url, a default url should be pushed to the central repository.

 

– Next, I worked on the calendar.js application, as we wanted to build an example that uses this central repository. In the calendar.js application, I added a disconnect functionality, that clears the localStorage, when the user logs out.

Calendar.js application retrieves the url as follows:

– The user logs in, enters Firefox Account credentials, and authenticates. Through this, we get the userID and the authentication token (passed to the server as a header)

– The URL is retrieved from the central repository via a fetch function. If an URL is obtained, that URL is used by the calendar.js application and stored in the localStorage, so that the next time a fetch won’t have to be done on the central repository.

– If the URL is not retrieved, a default URL which is predefined is used.

– Once we were certain that the functionalities were working properly, I created a library with the main functions: registerUserURL and retrieveUserURL. We wrote tests for the various scenarios that could occur. Once all this was done, we published it on npm so that project can start using it.

The problems:

I faced a little problem with promises in js and testing, as I had done neither before. However, with the immense support of the team, I was able to get the grasp of that.

Conclusion:

This API enables any application to use a central repository. It was a great experience working with the team and being an Outreachy intern. Learned loads of things that will help me even in future.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s