Beyond Swapping Bits: Project Review (And Preview!) | Protocol Labs Research

2021-01-11/Blog

Beyond Swapping Bits: project review (and preview!)

Alfonso de la Rocha, David Dias, Yiannis Psaras

ResNetLab
Distributed systems, Networking

If you have been following along for the past three months (1, 2, 3, 4), you know that we in ResNetLab started the Beyond Bitswap project with one goal in mind: to drive speed-ups for file-sharing in IPFS. The results so far have been astounding and we are delighted to share a huge list of new ideas, RFCs, prototypes, a testing harness, promising results — and the release of the “Beyond Swapping Bits” paper!

We invite you to journey through the contributions of the “Beyond Swapping Bits” project since its inception. By the end of this post, you will have all the tools you need to understand the results we achieved so far, to run your own research experiments, and to learn about a myriad of high-potential ideas for future work. We welcome everyone to join us in transforming the Beyond Swapping Bits project into a multi-research-group open research endeavor, so that any networking researcher can start collaborating with us and build upon our work. The journey towards blazing fast P2P File Transfer starts here!

If you are a person of action and you want to go straight to the code to start tinkering, this repo is the place to go.

State of the Art

The first thing we did in the scope of the project was to evaluate the current status of file-sharing in IPFS and P2P networks overall. We evaluated Bitswap’s current performance and soaked up all of the ideas that have been discussed over the years in related Github issues around other P2P file-sharing protocols. As a result of this work we made the following early contributions:

An IPFS Research Toolkit at your disposal

A huge drag in any research project is assembling the testbed that will enable the researcher to test their ideas. With this in mind, we decided to start building our IPFS file-sharing Testground-based testbed so that our work would be repeatable (and tinker-able) by others.

The beyond-bitswap toolkit includes the following core components:

All of these are available at the beyond-bitswap repo and licensed with the Permissive License stack.

A walk through the RFCs & Future Work

At ResNetLab, we prize repeatable and quantifiable research. From ideas, to RFCs (to start open discussions around the ideas), to structuring the evaluation plan, to prototypes, to experiments, and concluding with results for evaluation.

We have published a total of 10 improvement RFCs so far. The RFCs tackle different ideas on how to improve file-sharing in IPFS and P2P networks in general, and they are organized around the three different layers in which a P2P file-exchange protocol can be structured:

We currently have RFCs in three different stages: “brainstorm”, meaning the RFC is still in the ideation stage and there are things to be solved before it is ready for prototyping; “draft”, for the RFCs whose design is ready but no working prototype for it exists yet; and finally, “prototype” for the RFCs with a working prototype. Let’s discuss the latter a bit.

From RFCs to Prototypes & Evaluations

Since the inception of the project, we have implemented three and a half prototypes from RFCs (you’ll see where that half comes from in a moment):

Finally, we wanted to provide an easy way to make our prototype’s experiments and evaluations easily replicable. To achieve this, we added a way to run experiments over prototyped RFCs with a single script (provided that you have our testbed installed). Do not hesitate to give it a try!

A new perspective: Bitswap as a content routing systems accelerator

There has always been an existential question around Bitswap: “is it a content routing protocol, or a block exchange protocol?”. All the work done in the “Beyond Swapping Bits” has given us the tools to answer this question, and the answer is neither. Bitswap’s aim is not to replace content routing subsystems but to complement them and enhance their performance. Let’s illustrate this using the DHT as an example of a content routing subsystem. Nodes using a DHT to find content in a P2P network are able to find providers for the content with a 100% probability (as long as all peers in the network are dialable). However, DHT lookups can be extremely slow in networks with a large number of nodes, so looking for every block through the DHT may be intractable. Fortunately, this is the raison d’être of Bitswap: to minimize the number of lookups required by content routing subsystems to discover content, speeding up their block exchange.

Moreover, the modular design of Bitswap’s architecture makes it easily configurable to enhance the limitations of any content routing subsystems. Check out the Bitswap paper to learn more about Bitswap as a content routing system accelerator.

The final ribbon: The Bitswap Paper

Bitswap has not yet made its academic debut, and after all the work done within the “Beyond Swapping Bits” project we thought it was about time. So we embarked on the writing of an academic paper to formalize the operation of Bitswap and share some of the work done within the project. The result has been a paper (pre-print also accessible via IPFS). We have already submitted a version of this paper to a peer-reviewed conference, so stay tuned to check the final version.

Collaborate with us!

» The Resilient Networks Lab mission is to build resilient distributed systems by creating and operating a platform where researchers can collaborate openly and asynchronously on deep technical work.

ResNetLab collaborates with over 10 research groups all over the world, and Protocol Labs Research has developed dozens of research collaborations over the last few years. We are always eager to collaborate with more researchers in all kinds of capacities, from thesis projects (M.Sc or PhD), to postdoctoral research, and through grants, RFPs, and independent research projects.

The “Beyond Swapping Bits” project can be the perfect avenue to start collaborating in our open research endeavors. All of our contributions, our ideas, our testbed, and our benchmarking and analysis scripts are available in the aforementioned repo, and this post provides a gentle introduction to all the work we’ve done in the project so far, as well as your next mission description (should you choose to accept it…😎). You are more than welcome to pick any of these assets and build on top of it. If you have questions, please email us.

Additionally, if you have a fiery passion for P2P Networking and File Systems and building resilient systems that humanity can depend on, we’ve an open Research Engineer position available waiting for you!

Join our quest to create blazing fast P2P file-sharing!