P2P, WebSockets & WebTorrent

majd_almnayer_2101

Majd Al Mnayer

Posted on October 17, 2024

P2P, WebSockets & WebTorrent

For this week, I decided to contribute using a different language. My goal was either JavaScript or TypeScript, and I ended up finding an extremely interesting project called Blaze. Blaze is a peer-to-peer file-sharing progressive web app built using WebTorrent and WebSockets. Although there weren't many open issues in this project, I found one that seemed interesting to me. For my issue this week, I was tasked with displaying error modal popups to users for certain uncovered edge cases.

The Issue

The issue was not very descriptive, and the only information provided was, "When the connection to the Blaze server fails, no feedback is given to the user."

Therefore, my goal for this week was to investigate and analyze all uncovered edge cases where the backend might fail, resulting in no error messages being displayed to the user.

To begin, I isolated the front-end files where my modifications might take place. At first, I thought the front-end was written in React, but it turned out to use a different library called Preact, which is an alternative to React with the same API but much faster.

Afterwards, my task was straightforward: trace, investigate, isolate, and update. My first instinct was to close the connection to the backend and analyze the front-end to determine where error messages should pop up. I found several uncovered edge cases and updated the app to use an error modal, leveraging a component that already existed in the source code.

After creating my pull request, the project maintainer replied, thanking me for my well-written pull request and providing detailed descriptions. However, they also suggested some changes and asked for my opinion regarding one of them. After discussing it with the repo owner directly on the pull request, I set out to apply the requested changes. However, I noticed one of the changes seemed redundant, so I replied to their comment, asking for their opinion this time. Unfortunately, that was several days ago, and I haven't received a response yet.

Going Forward

I have to admit, it feels like a letdown not to receive a timely response after dedicating personal time to the project. While I enjoyed working on the project, learning Preact, WebTorrent, and analyzing the code, I felt disappointed that I couldn't complete my pull request this week.

Perhaps that was my own fault. The repo was active, but its last update was about a year ago. I think that from now on, I will only contribute to repositories that have been recently updated.

Despite that, I thoroughly enjoyed working on my issue this week and am looking forward to the next one!

💖 💪 🙅 🚩
majd_almnayer_2101
Majd Al Mnayer

Posted on October 17, 2024

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related