Skip to content

Instantly share code, notes, and snippets.

@dev-ritik
Last active July 4, 2020 17:59
Show Gist options
  • Save dev-ritik/ca88748b1e0868773288bdf0e531a327 to your computer and use it in GitHub Desktop.
Save dev-ritik/ca88748b1e0868773288bdf0e531a327 to your computer and use it in GitHub Desktop.
Summary of work done in GSoC on NDN

Introduction

Google Summer of Code is a global program focused on bringing more student developers into open source software development. Students work with an open-source organization on a 3-month programming project during their break from school.

The actual timeline of GSoC is available here. The main coding period spans between 27 May and 19 August and is divided into 3 parts each one following an evaluation.

Project Introduction

NpChat is a photo and file-sharing application built on Android and is inspired by Snapchat. It runs over the Named Data Network (NDN) and focuses on decentralised information sharing architecture. It stands as one of the best examples of Android application developed on the new Internet architecture.

The project description can be found here. The project aims to improve the functionalities of the erstwhile NpChat application. During the GSoC period, I intend to develop this application from a working prototype to a finished application, with its first version released on the Google Play Store.

The summary of the work done until now in the form of pull requests is mentioned below:

Current PRs

The list of all my current PRs are available here & here. Major ones of them are mentioned below:

  1. [IMPROVEMENT] Replaces FaceProxy with Memorycache : ISSUE : Replaced FaceProxy (which used to store and serve data for interests) class with Memorycache class which uses MemoryContentCache (from the jNDN library).

  2. Aimd pipelining in Segment fetcher: Updated SegmentFetcher.java from the jNDN library to use AIMD pipe-lining in place of the fixed window fetching. Ran some tests on minindn to compare these strategies among the jNDN and ndn-cxx libraries, the most recent of the results can be found here. After a long review period and a list of changes, it was successfully merged.

  3. Replace Log with Timber: Replaced the log statements in NpChat with better Logging library, Timber.

  4. Add AboutActivity: Added a simple About Screen in the NpChat app to provide relevant information to the users.

  5. Introduce MVVM architecture : ISSUE: The state of the code at that point was more or less ad-hoc with things like memory and network access specific code placed and used in the view itself against the encouraged application architecture patterns like MVVM. This Pull Request moved and reorganised the code to single Activity multiple Fragment MVVM architecture, with operation logics separated and organised into classes and packages.

  6. Add location co-ordinates to pictures : ISSUE: Added a feature to let user geo-tag a picture. Once Geo-tagged, the location is shared by adding the co-ordinates into the Exif metadata and transformed to ground address using Geocoder class.

  7. File sharing: Improved the pictures sharing and file browsing experience.

Current work: Working to update and use Android Identity Manager to get signed certificates of the namespace using NDNCERT.

Experience

The experience so far has been good and learning. I started from a noob in Networking. Now I have some experience and knowledge of the working of networks, routing, etc. I have also gained interest in NDN as a concept as well.

Getting my way through the issues and errors were challenging and at times frustrating. The issues themselves had different scopes and problems. There were issues like MVVM, which had much to do, and a lot of bugs involved and was generally related to UI whereas issues like AIMD had much on the learning side and a constant gradual development spanning more than a month. With these issues solved, I also faced new bugs on the work done, some silly, while others quite difficult to trace and regenerate.

I also had days completely devoted to GSoC but on the other hand, a couple of days when I had other priorities to be done. On and all the work progressed from issue to issue, from logic to logic, across different libraries and utilities. The work on minindn was quiet cool and amazing. Initially quite confusing, it turned out to be fun and learning experiences. Also, visualising network state in minindn and physical nodes was also interesting.

Challenges

As a part of the project, I faced some challenges, which gave me experiences in some new fields

  1. Moving to decentralised from the popular centralised server model.
  2. The nature of the work (pretty much new and unprecedented).
  3. Establishing and updating development environments and NDN dependencies.
  4. Debugging through minute but challenging bugs.

Community Support

Mentors were very helpful and supportive. Throughout the journey, they helped me with every single doubt and error. Also, on advice, I joined and the mailing list and also added a mail for AIMD pipelining as well. I also raised issues and pull requests on Github and Redmine.

Feedback

  • Though the documentation is quite good, considerable improvements like adding examples can be made.
  • Supporting tools in various libraries are cool and helpful but there is scope for little improvement as well.
  • Also, libraries and dependencies created problems while installing and updating them.

Android App Improvement

Introduction

NpChat is a photo and file-sharing application built on Android and is inspired by Snapchat. It runs over the Named Data Network (NDN) and focuses on decentralised information sharing architecture. It stands as one of the best examples of Android application developed on the new Internet architecture.

The project description can be found here. During Google Summer of Code 2019, I contributed to the project and developed several features to improve the NpChat app, its supporting library(Jndn) and the Identity Manager.

Work

During the GSoC period, I worked on the following,

  • Replaces FaceProxy with Memorycache (#132) : Replaced FaceProxy (which used to store and serve data for interests) class with Memorycache class which uses MemoryContentCache (from the jNDN library).

  • Aimd pipelining in Segment fetcher (#24) : Updated SegmentFetcher.java from the jndn library to use AIMD pipe-lining in place of the fixed window fetching. Ran some tests on minindn to compare these strategies among the jNDN and ndn-cxx libraries, the most recent of the results can be found here. After a long review period and a list of changes, it was successfully merged.

  • Introduce MVVM architecture (#161) : The state of the code at that point was more or less ad-hoc with things like memory and network access specific code placed and used in the view itself against the encouraged application architecture patterns like MVVM. This Pull Request moved and reorganised the code to single Activity multiple Fragment MVVM architecture, with operation logics separated and organised into classes and packages.

  • Add location co-ordinates to pictures (#162) : Added a feature to let user geo-tag a picture. Once Geo-tagged, the location is shared by adding the co-ordinates into the Exif metadata and transformed to ground address using Geocoder class.

  • File sharing (#163) : Improved the pictures sharing and file browsing experience and separated them into status and files, to be viewed differently.

  • NDNCert java client (#1): For the users to have a namespace, they must have a certificate for it. Previously, a self-signed certificate was used to verify the ownership. This PR updates the Android Identity Manager to get signed certificates of the namespace using NDNCERT. This will be used to prove the ownership using the trust agent.

GSoC contribution

Here is a list of all contribution made during the GSoC period.

  • (#132) Replaces FaceProxy with Memorycache
  • (#134) Removes publishData code from FilesActivity
  • (#154) Replace Log with Timber
  • (#155) Add AboutActivity
  • (#161) Introduce MVVM architecture
  • (#162) Add location co-ordinates to pictures
  • (#163) Picture selection
  • (#24) Aimd pipelining in Segment fetcher
  • (#25) Fix null object error in AIMD SegmentFetcher
  • (#1) Ndncert java

These PRs spans accross NpChat, jndn and android-identity-manager

TODO

  • Publishing the app to Play Store.
  • Adding ECDH key encryption to android-identity-manager.

Challenges

As a part of the project, I faced some challenges, which gave me experiences in new fields

  1. Moving to decentralised from the popular centralised server model.
  2. The nature of the work (pretty much new and unprecedented).
  3. Establishing and updating development environments and NDN dependencies.
  4. Trying to establish ECDH key exchange.

Future Works

I plan to continue working on the NDN concept, developing and contributing to open-source application and utilities, in the days to come.

@dev-ritik
Copy link
Author

⚠️ DO NOT DELETE ⚠️

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