Difference between revisions of "GSOC2019AppStore"

From Nsnam
Jump to: navigation, search
Line 103: Line 103:
 
* Modified the Search API to use pagination, currently the page size is set to 20. The PR is merged, link to PR: [https://github.com/abhijithanilkumar/ns-3-AppStore/pull/48 link]
 
* Modified the Search API to use pagination, currently the page size is set to 20. The PR is merged, link to PR: [https://github.com/abhijithanilkumar/ns-3-AppStore/pull/48 link]
 
* Filters on the AppStore were added to search for Apps based on the type and the category.
 
* Filters on the AppStore were added to search for Apps based on the type and the category.
* On review with the mentors, they suggested to have a minimal UI rather than a button to query along with select options, and hence the filtering technique was changed to follow one click filter for Fork/Modules/All. Link to PR: [https://github.com/abhijithanilkumar/ns-3-AppStore/pull/49 link]
+
* On review with the mentors, they suggested to have a minimal UI rather than a button to query and the select options, and hence the filtering technique is changed to follow one-click filter for Fork/Modules/All. Link to PR: [https://github.com/abhijithanilkumar/ns-3-AppStore/pull/49 link]

Revision as of 21:21, 8 July 2019

Main Page - Current Development - Developer FAQ - Tools - Related Projects - Project Ideas - Summer Projects

Installation - Troubleshooting - User FAQ - HOWTOs - Samples - Models - Education - Contributed Code - Papers

Return to GSoC 2019 Projects page.

Project overview

  • Project name: Improving the ns-3 AppStore and linking with bake
  • Abstract: The goal of the project is to link the existing app store with the bake build system and improve the AppStore. The project aims to support command line installation and update of modules. Once this project is complete, ns-3 users will be able to install a module on AppStore from the command line.
  • Documentation: to be added
  • About Me: I am a 3rd-year Computer Science undergraduate student from National Institute of Technology Karnataka (NITK), Surathkal, India. I have worked to implement TCP New Vegas in ns-3. I have about 1.5 years of experience in Python and Django.

Technical Approach

The App Store is built using the Django framework. The primary aim is to link the AppStore with bake which would require setting up REST API to the existing codebase for install/update/latest version of the modules, django-rest-framework will be used for the same. It was found out that the AppStore is built on Python2.7 and since the support is going to end in 2020, the first step of the project will be to port the AppStore codebase to the latest version of Python and Django. The REST APIs made would be used to add the command line support of install and update to bake. Later to enhance the features of the AppStore, GitHub and GitLab OAuth will be added, download statistics for each of the modules will be added. Later to support Multi-Threaded Comments, disqus will be used and the rating UI will be revamped using the django-star-ratings library. A detailed description of the project is available here

Milestones and Deliverables

The entire GSoC period is divided into 3 phases. The deliverable at the end of each phase is as mentioned below:

Phase 1

  • Refactoring the existing code and port existing code to Python 3 and the latest version of Django
  • REST APIs for install and latest version of the extension for the bake build system
  • Add install option to the bake build system

Phase 2

  • Add update option to the bake build system
  • Add GitLab/Github OAuth support to AppStore
  • Statistics (download count) for each the extension

Phase 3

  • Multi-Threaded Comment using Disqus
  • Dependency Management
  • Ratings for the extensions on the AppStore

Weekly Reports

Community Bonding Period

  • Prepared wiki page for the project.
  • Setup Bake and got familiar with the ns-3-AppStore and the Bake functioning
  • Communicated with the mentors regarding the proposal.
  • Started with the documentation for the AppStore: user-workflow, user-guide
  • Prepared a gif to include in AppStore documentation instead of images: view

Week 1: 27th May - 2nd June

  • The code for the ns-3-AppStore has been migrated to Django 2.0 and Python3.6.
  • The urlpatterns are changed to use path instead of url, since url is likely to be deprecated in future source and path uses route without regex, so simpler urls..
  • The ns-3-AppStore code is changed to follow the PEP8 guidelines.

Merge Request for the work: here

Week 2: 3rd June - 9th June

  • Built the REST APIs to support install and search bake command line options.
  • To avoid any possible attack, rate limiting for the REST APIs is enabled.
  • Merge Request for the work: here

Week 3: 10th June - 16th June

  • Documented the REST APIs created in the last week here
  • Implemented the search command line option which shows the name of the module, version and the abstract as shown below.
  • Started with the install command line option, currently it works for forked modules.

Output:

$ bake.py search gym
ns3-gym (0.2) - The Playground for Reinforcement Learning in Networking Research

Week 4: 17th June - 23th June

  • Install command line option in bake is added and works for forked as well as contributed modules.
  • One can even install a specific version of a module by specifying ==version in the command line option. (bake.py install mmwave==1.2)
  • Fetch command line option is added, which only downloads the bakefile for the specified/latest version of the module. (bake.py fetch epidemic-routing)
  • Worked on the code review for the REST APIs.
  • The entire design for the REST APIs has been revamped to follow the use of Serializers (more robust, less error prone!), Search API changed from using function-based API to ViewSet
  • An usage example of the install option is as follows:
  • Workflow document: here
  • Merge Request for the work: here

Output:

$ bake.py install epidemic-routing
Collecting epidemic-routing
Disable all non-mandatory dependencies? (Y/n): y
Downloading, building and installing the selected modules and dependencies.
Please, be patient, this may take a while!
 >> Downloading ns-3.29 - OK
 >> Downloading epidemic-routing (target directory:ns-3.29/contrib/epidemic-routing) - OK
 >> Building ns-3.29 - 

Week 5: 24th June - 30th June

  • Worked on the comments received on the code review for the bake command line capabilities
  • On discussion with the mentors, they suggested having a separate class for Bake to interact with the ns-3-AppStore, and hence a new class BaseClient was made which would handle all the necessary interactions with the ns-3-AppStore and would return only the success response in the main function of the Bake.py.
  • Based on the review, added regression tests for the command line capabilities added in Bake.
  • Made a proposal on the various Commenting Feature for the ns-3-AppStore. The proposal can be found here

Week 6: 1st July - 8th July

  • Modified the Search API to use pagination, currently the page size is set to 20. The PR is merged, link to PR: link
  • Filters on the AppStore were added to search for Apps based on the type and the category.
  • On review with the mentors, they suggested to have a minimal UI rather than a button to query and the select options, and hence the filtering technique is changed to follow one-click filter for Fork/Modules/All. Link to PR: link