29 Flow: A P2P File Sharing System
Inspiration
For a long time, we were comfortable working on projects that ran locally, always avoiding the complexities of networking and communication between devices. But deep down, we knew we wanted to explore the world of decentralized systems and learn how devices could communicate and share data directly with each other. This project provided the fire we needed to face our fears and dive into peer-to-peer (P2P) networking. We saw this as the perfect opportunity to challenge ourselves, step outside of our comfort zone, and tackle the intricacies of distributed systems.
What it does
29 Flow is a decentralized file-sharing platform that enables users to upload and download files without the need for a central server. Files are divided into 512-byte chunks and distributed across a minimum of four nodes in the network. Each node is capable of both sharing and receiving file chunks, and the system ensures the integrity of the file throughout the transfer process. Even if nodes disconnect, the file-sharing operation can continue uninterrupted, leveraging the remaining active nodes.
How we built it
We built 29 Flow using python for backend logic and developed it in Visual Studio Code. The foundation of the system is a chunking mechanism that splits files into 512-byte pieces. We started by building a basic peer-to-peer communication model, where nodes could exchange file chunks. The project was developed in iterative stages, beginning with file chunking and simple data exchange, and then progressively adding more complex features like file integrity verification, node failure handling, and dynamic node participation.
Challenges we ran into
One of the most difficult challenges was ensuring data integrity across a dynamic network of nodes. When nodes joined or left during a transfer, we needed a reliable way to verify the correctness of the data being transmitted. We implemented hashing mechanisms to ensure that each chunk received matched its original form. Another challenge was making sure the system could handle the volatility of nodes—ensuring file transfers continued smoothly even if several nodes disconnected mid-transfer. Optimizing bandwidth usage and managing how chunks were propagated between nodes were also key technical challenges. Further, we wanted to test our P2P implementation on a real-world example. Our other main focus was creating a website that contains front and back-end, which would use P2P in the context of neighbors connecting with each other. However, due to time constraints, we needed to focus on understanding the technicalities of peer to peer more profoundly.
Accomplishments that we're proud of
We're proud of achieving a working system where nodes can connect, disconnect, and still maintain seamless file-sharing operations. Developing a robust system that dynamically adapts to network changes while preserving data integrity was a major achievement. Additionally, implementing a peer-to-peer network that efficiently handles file chunking and reassembly, even across fluctuating connections, was a big milestone for us.
What we learned
Through this project, we gained deep insights into the inner workings of P2P networking and decentralized file-sharing systems. We learned how to manage data transmission in unreliable environments, how to ensure file integrity across multiple nodes, and the importance of redundancy in distributed systems. This project expanded our understanding of networking protocols, error-handling, and bandwidth optimization techniques.
What's next for 29 Flow
The next steps for 29 Flow include adding encryption to secure file transfers between nodes, making the system more secure. We also plan to introduce dynamic load balancing to improve efficiency, allowing nodes to distribute file chunks based on network conditions. Additionally, we want to scale the system to handle larger files and networks with higher numbers of nodes, all while maintaining performance and reliability. Our long-term goal is to turn 29 Flow into a robust, real-world solution for decentralized file sharing. We could then apply this solution to any application which would benefit from it.
Log in or sign up for Devpost to join the conversation.