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:

Building a Full-Featured Laravel Admin Dashboard with Filament

Building a full-featured Laravel admin dashboard with Filament

Build scalable admin dashboards with Filament and Laravel using Form Builder, Notifications, and Actions for clean, interactive panels.

Kayode Adeniyi
Dec 20, 2024 ⋅ 5 min read
Working With URLs In JavaScript

Working with URLs in JavaScript

Break down the parts of a URL and explore APIs for working with them in JavaScript, parsing them, building query strings, checking their validity, etc.

Joe Attardi
Dec 19, 2024 ⋅ 6 min read
Lazy Loading Vs. Eager Loading

Lazy loading vs. Eager loading

In this guide, explore lazy loading and error loading as two techniques for fetching data in React apps.

Njong Emy
Dec 18, 2024 ⋅ 5 min read
Deno logo over an orange background

How to migrate your Node.js app to Deno 2.0

Deno is a popular JavaScript runtime, and it recently launched version 2.0 with several new features, bug fixes, and improvements […]

Yashodhan Joshi
Dec 17, 2024 ⋅ 7 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