2020-12-14
4326
#rust#web3
Mario Zupan
30541
Dec 14, 2020 ⋅ 15 min read

libp2p tutorial: Build a peer-to-peer app in Rust

Mario Zupan I'm a self-employed Software Engineer and Trainer living in Vienna, Austria. I've worked at several companies and in multiple fields building, maintaining and operating distributed systems at scale using Java, Kotlin, Node, Go and Rust. I also taught advanced software engineering courses for several years at the University of Applied Sciences FH Joanneum in Graz and worked as a technical trainer, empowering other software engineers to reach their full potential. Currently, I work as a freelance software engineer and trainer again, looking to help companies build high-quality software solutions. Check out my personal blog: http://www.zupzup.org.

Recent posts:

Solid Principles For Javascript

SOLID principles for JavaScript

SOLID principles help us keep code flexible. In this article, we’ll examine all of those principles and their implementation using JavaScript.

Frank Joseph
Dec 5, 2024 ⋅ 10 min read
Master JavaScript Date And Time: From Moment.js To Temporal

Master JavaScript date and time: From Moment.js to Temporal

JavaScript’s Date API has many limitations. Explore alternative libraries like Moment.js, date-fns, and the new Temporal API.

Yan Sun
Dec 4, 2024 ⋅ 9 min read
Npm Vs. Npx: What’s The Difference?

npm vs. npx: What’s the difference?

Explore use cases for using npm vs. npx such as long-term dependency management or temporary tasks and running packages on the fly.

Fimber Elemuwa
Dec 3, 2024 ⋅ 5 min read
How To Audit And Validate AI-Generated Code Output

How to audit and validate AI-generated code output

Validating and auditing AI-generated code reduces code errors and ensures that code is compliant.

Boemo Mmopelwa
Dec 2, 2024 ⋅ 5 min read
View all posts

3 Replies to "libp2p tutorial: Build a peer-to-peer app in Rust"

  1. Nice, extending bit basic example available in source, but I think it should be fair to highlight that this example is oversimplified:
    1) it’s using only mDNS for peers discovery so it’ll never get beyond local network
    2) Using floodsub for for responses to particular query is real overkill – response needs to go one node, but it’s amplified all overlay (taking into consideration already inefficient floodsub message replication)

    So couple more things to try:
    1) Enable bootstrap nodes (as already used in libp2p examples)
    2) Use RequestReply NetworkBehaviour to send replies to list query just to interested nodes (might require to include requestor in list broadcast)
    3) Use more efficient Gossipsub instead of Floodsub – basically same interface, so not so much changes

Leave a Reply