2022
Mentors: Giannis Skitsas, Ilias Kyranas
Assignee: Kanha Agrawal
Abstract
It was a forked project from the http-traffic-simulator npm package, which was developed to provide simulated throttled http traffic for testing purposes, towards specific http endpoints. For GSoC 2022, the goal was to make this npm package a stand-alone desktop app as well as offer it as a web-server exposing the apis that even supports the authentication and authorization with OpenIDC. And further dockerize the app and deploy it to kubernetes. This way it will be offered as a stand-alone desktop app. Deliverables: - A desktop app - Server artifacts deployed to kubernetes.
Main goals for GSoC 2022
The three main goals for this summer are-
- Enhancing the npm package
- Wrapping the npm package to a standalone cross platform desktop-app
- Server exposing REST apis
Technology used
The technologies used for different apps are-
Desktop app
- ElectronJs
Server app
- NodeJs
- TypeScript
- Express
- MongoDB
- Docker
- Kubernetes
In the community bonding period of GSoC it was agreed by the mentors and the assignee to use ElectronJs instead of the Flutter framework as described in the proposal.
While preparing the POC, we experimented with many different framework for creating desktopapp. And found that electronsjs suits best for your need. Since the core idea of this project was to wrap the nodejs package into a standalone desktopoapp and electron in its core using nodejs for the system apis call.
It also provides a couple of cool features like:
- Automatic updates
- Native menus & notifications
- Crash reporting
- Debugging & profiling
- Windows installers
considering these plus points mentors and assignee agrees to use ElectronJs
Implementation Stories
The central objectives of the deliverable can be grouped in the implementation "Stories" (S) provided below:
For main library
- Finding the bugs / enhancing the main library (S1)
Desktop app
- Implementing the POC (S2)
- Preparing for the MVP (S3)
- Enhancing the app / fixing the known bugs (S4)
Server app
- First implementation of the app (S5)
- Enhancing the app / fixing the known bugs (S6)
Documentation
- Creating the documentation website using docusaurus (S7)
- Updating the documentation (S8)
Major release v1.0
- Final review / testing before major release (S9)
- Major release v1.0 (S10)
Final completion
- Implementing kubernetes solution for scaling the server-app (S11)
- Final completion (S12)
Initially this project was a medium sized project - 12 weeks (~175 hours) but after the mid-term evaluation the mentors and the assignee agreed to extend the project size to large one - 22 weeks (~350 hours)
Repository
The original repository for this project can be found here
- The implementation stories are organized in issues and assigned to the project GSoC-2022 for quick reference.
- All pull requests for GSoC 2021 can be found here.
- For the implementation Git Flow was used and all Pull Requests target the develop branch.
Quick Start
During the GSoC period work was done to easily set up a development environment and to quickly deploy the server app with docker-compose. A quickstart for both could be:
- Development: Setup development environment as described.
- Production: Setup a quick production build with Docker as described.
In addition, the current site was built from scratch to support structured and extensive documentation. This site's source code is committed to the Git repository of this project.
Pull Requests
Added workaround for https requests #20
This pull request enhanced the flexbench to also test for https
requests which was previously missing.
- Finding the bugs / enhancing the main library (S1)
Created POC to validate that flexbench can be wrapped as a desktop app #21
In this PR I have implemented POC
- Implementing a POC (S2)
Changed method for getting number of clients per worker #26
This PR change the previous method for calculating the number of clients per worker
- Finding the bugs / enhancing the main library (S1)
Flexbench desktop app (MVP) #28
This PR provides the MVP for the desktop-app
- Preparing for the MVP (S3)
Fix for missing body data in request #30
This PR fix the missing body data in the http/https
request.
- Finding the bugs / enhancing the main library (S1)
Fix for missing body in throttling #31
This PR fix the missing body data while throttling of request.
- Finding the bugs / enhancing the main library (S1)
Offering it as a server app #38
In this PR I have implemented the server-app with authentication and authorization.
- First implementation of the app (S5)
PR includes major fix for desktop app #41
This PR provides the fix for desktop app
- Enhancing the app / fixing the known bugs (S4)
Logs section for simple request #46
This PR enchanced the desktop-app functionalities
- Enhancing the app / fixing the known bugs (S4)
Added logs section to multi-request #47
This PR enchanced the desktop-app functionalities
- Enhancing the app / fixing the known bugs (S4)
Basic initialize of Docusaurus #48
In this PR I have implemented the documentation using docusaurus
- Creating the documentation website using docusaurus (S7)
Implemented thread-pool #49
This PR provides the thread-pool for the server-app
- Enhancing the app / fixing the known bugs (S6)
UI and other fix for major release v1.0 #52
This PR fixes the ui bugs reported by the mentor while reviewing the latest updates
- Enhancing the app / fixing the known bugs (S4)
- Final review / testing before major release (S9)
Server-app: added postman collection #53
This PR adds the testing script for postman
app
- Enhancing the app / fixing the known bugs (S6)
Server-app: Final task - Implemented k8s #55
This is the final task of the GSOC 2022 goals, to implement k8s using the microk8s for scalling the server-app
- Implement k8s and finalise the work for submission (S11) and (S12)
Future Plans
For Desktop app
Since this is a desktop app there is always a scope of development to this project. The
- Planning to add a feature for working as a team to collaborate work just as Postman offers.
- Feature to add documentation for the apis.
- Rest will be discussing with the organization post gsoc period.
- Additions to the frontend client.
For Server app
- To implement Elasticsearch and redis mqueue for large throughputs and throttling