GSOC 17: BookBrainz Web API

Tags: #<Tag:0x00007f2a0b650680> #<Tag:0x00007f2a0b650518> #<Tag:0x00007f2a0b6503d8>


Personal information

Nickname: justharshal
IRC nick: justharshal
GitHub: harshalbhatia
Twitter: justharshal


Rewrite the current Python based webservice as a JSON Web API in a Node.js environment, preferably using Koa.js.


Formulate a detailed plan for the new API, write documentation.
Write tests for all possible cases of expected behaviour.
If possible, implement the API. Although, the project description gives more importance to the tests and docs, I’m confident I’ll be able to implement most, if not all possible routes.


Rate Limiting

Implementing the backend of rate limiting with a SQL database (Postgres) would not be a very good idea. I plan to use redis to rate limit API users. The actual number is not important as it will differ and evolve over time.


The authentication will be token based. If desired, a user can generate an access token from their profile page. They will then have to append this token to every single API request they make. This implementation is similar to how MetaBrainz does it.


Before projects are announced (upto May 4th)

Contribute patches in the BookBrainz family of repositories to better understand the codebase.

Community Bonding period (May 5 - 30)

Continue contributing. Get acquainted with the contributors and mentors. I’ll also have college exams during this time.

Planning and documentation (May 30 - June 14)

I want to use this phase for planning out the implementation. Will write detailed docs for the implementation of all possible routes. Including requests, response and examples for both.

Write tests (June 15 - 25)

Write tests for the expected behaviour of the API using the documentation written in previous phase as a reference. As pointed out by Ben Ockmore (LordSputnik), many existing tests in bookbrainz-ws can be rewritten easily as the logic remains same.

First evaluations (June 26 - 30)

If required, refactor and rewrite code with the mentor’s guidance to pass the first evaluation.

Implement APIs (July 1 - 23)

First implement the authentication. Now implement all the required APIs (routes). Majority of the tests written should now pass (excluding the ones for rate limiting).

Second evaluations (July 24 - 28)

Work with my mentor to pass the evaluation.

Rate limiting and caching (July 29 - Aug 20)

Implement rate limiting of APIs to prevent misuse. All tests should now pass.
Implement caching of APIs if time permits. This will use an external framework/engine.

Documentation and wrap up (Aug 21 - 29)

Over the course of testing and implementing the API, few things are bound to be changed from the plan. I’ll spend this time to update and polish the API docs.

Final evaluation (Aug 29 - Sep 5)

Work with my mentor to pass the final evaluation.

Detailed information about yourself

I’m studying Computer Science and Engineering at Dr. Ambedkar Institute of Technology, Bangalore.

####Tell us about the computer(s) you have available for working on your SoC project!
I have many computers. The newest is a Dell Inspiron laptop (Xubuntu), which i really like using. There is also an old Compaq laptop (Lubuntu). There is also a Lenovo Thinkpad but i don’t like using that one because it’s running Windows. I also have access to a HP desktop.

####When did you first start programming?
I started programming when i was 12 years old. At first i would just mess around with HTML/CSS, etc. Now i know many languages such as C, C++, Python, Javascript. Although never officially taught to, Python and JS are the languages i know and like best.

####What type of music do you listen to? (Please list a series of MBIDs as examples.) If applying for a BookBrainz project: what type of books do you read? (Please list a series of BBIDs as examples. (And feel free to also list music you listen to!))
Most of the songs i listen to are just from top charts. I wish i was one of those people with specific taste but nope. Also, i listen to a lot of podcasts including The Tim Ferriss show, Freakonomics and Planet Money.
I like to read a lot more than time actually permits. My to-read list is going out of control. Favorites include The Da Vinci Code (f4c569d1-7755-41a2-8436-ec16df02648d) and the Sherlock Holmes books by Sir Arthur Conan Doyle (d573ae49-7a1b-4521-bb89-29d2a7fc9536).

####What aspects of the project you’re applying for (e.g., MusicBrainz, AcousticBrainz, etc.) interest you the most?
Have you ever used MusicBrainz to tag your files?

####Have you contributed to other Open Source projects? If so, which projects and can we see some of your code?
I have not worked on other open source projects because most of my past projects were just for fun and learning.

####If you have not contributed to open source projects, do you have other code we can look at?
Yes, it’s on github. A lot of it is private. Its all web apps. With Python it’s Flask + SQLAlchemy and MEAN stack in case of JS. I’ve recently also been exploring Angular 2 and am making a webapp for my college’s Entrepreneurship cell using it. Here is an early version.

####What sorts of programming projects have you done on your own time?
Mostly small web apps to learn. The general todo lists and blog systems.

####How much time do you have available, and how would you plan to use it?
I’ll dedicate 8 hours per day on weekdays to the project. If required, i’ll dedicate some weekends.

####Do you plan to have a job or study during the summer in conjunction with Summer of Code?
If i’m accepted, this will be my only employment. I also have no other engagements during that time.