Inspiration
At Mo2Moto, we're driven by Ciena’s vision of creating robust, innovative solutions that make complex tasks simpler. We wanted to build a platform that empowers seamless peer-to-peer file sharing, inspired by the challenge of fostering connectivity and making technology accessible to all, regardless of borders.
What it does
Mo2Moto enables users to share files using a P2P system built on the TCP/IP networking stack. Each node in the network can upload and download file chunks to it's peers, ensuring efficient file transfers across a decentralized network.
How we built it
We used Python to build the system, leveraging networking libraries and integrating AI features. The code evolved as we worked through several iterations, adding complexity in manageable stages. We worked in sequential order of the steps given, working on Step 1 (Upload and Download) before moving on to Step 2 (Security and Stats), and then finally finishing up with step 3 (UI and AI). We also used ChatGPT to help us debug and learn about some parts of the program to help optimize it further.
Challenges we ran into
Initially, we encountered significant performance bottlenecks because our system was operating on a single thread, responsible for handling both the chunking of files and uploading them to the network. This sequential processing created delays, as the thread could only manage one task at a time. As a result, large files took longer to process, and upload speeds slowed down, especially as more nodes joined the network.
So, we switched to multithreading. By distributing the workload across multiple threads, we could parallelize tasks; file chunking and uploading could now happen concurrently, drastically improving the system's efficiency. The performance boost was immediate: our upload speeds increased nearly sixfold, reducing network congestion and making the file-sharing experience much smoother.
Accomplishments that we're proud of
One of our biggest accomplishments was successfully implementing a tracker using Flask, which serves as the central hub for coordinating Mo2Moto’s file-sharing operations. The tracker plays a crucial role in managing the bitfields that store detailed information about which file chunks each node possesses. This allows the system to efficiently track chunk availability across the network, ensuring that nodes request and receive the most needed chunks.
To enhance this process, we also integrated a "rarest first" chunk distribution strategy. This approach prioritizes the download of the least available chunks in the network, optimizing redundancy and accelerating file completion for all nodes. By addressing the rarest chunks first, we reduce the chances of bottlenecks where users might be stuck waiting for scarce pieces to finish their download.
The tracker is powered by REST API, which facilitates seamless communication between the nodes and the tracker. This API handles requests efficiently, ensuring that as more users join the network, the system can scale smoothly without degradation in performance. This Flask-based tracker is essentially the backbone of Mo2Moto, enabling all components to work in harmony and ensuring that file transfers are both reliable and fast.
What we learned
This project deepened our understanding of networking fundamentals, specifically the intricacies of the TCP/IP protocol, which is the backbone of our P2P system. We also gained practical experience with file chunking; breaking files into smaller pieces for easier distribution among nodes. Learning how to implement and manage bitfields, which track the availability of chunks across different nodes, was also a big part of the project. These bitfields ensured that data integrity is maintained and helped in optimizing file retrieval by reducing unnecessary downloads.
What's next for mo2moto
Next, we plan to revamp the UI to create a more user-friendly and intuitive experience. Our goal is to make the interface even more visually appealing, and also easy to navigate, ensuring that users can seamlessly interact with the P2P file-sharing system. This includes refining the layout, adding more helpful tooltips, and creating a cleaner, more responsive design that adapts well to different devices and screen sizes.
Beyond the UI, we're also looking to expand the AI capabilities of the app. Right now, we have a basic chatbot, but our vision is to incorporate more advanced AI features such as dynamic file allocation suggestions, and predictive analytics to help users optimize their sharing patterns. We're also focusing on fine-tuning the backend with further optimizations. While our current system performs well, we believe there are still opportunities to enhance its speed, scalability, and reliability. By tracking metrics like file transfer speed, network usage, and chunk distribution efficiency, we can make informed decisions to ensure that our app is always improving, meeting users' needs, and delivering a top-notch file-sharing experience.


Log in or sign up for Devpost to join the conversation.