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 software developer originally from Graz but living in Vienna, Austria. I previously worked as a full-stack web developer before quitting my job to work as a freelancer and explore open source. Currently, I work at Netconomy.

Recent posts:

Nx Adoption Guide: Overview, Examples, And Alternatives

Nx adoption guide: Overview, examples, and alternatives

Let’s explore Nx features, use cases, alternatives, and more to help you assess whether it’s the right tool for your needs.

Andrew Evans
Mar 28, 2024 ⋅ 9 min read
Understanding Security In React Native Applications

Understanding security in React Native applications

Explore the various security threats facing React Native mobile applications and how to mitigate them.

Wisdom Ekpotu
Mar 27, 2024 ⋅ 10 min read
Warp Adoption Guide: Overview, Examples, And Alternatives

warp adoption guide: Overview, examples, and alternatives

The warp web framework for Rust offers many enticing features. Let’s see when and why you should consider using warp in your projects.

Ukeje Goodness
Mar 26, 2024 ⋅ 8 min read
Integrating Next Js And Signalr For Enhanced Real Time Web App Capabilities

Integrating Next.js and SignalR to build real-time web apps

In this tutorial, you’ll learn how to integrate Next.js and SignalR to build an enhanced real-time web application.

Clara Ekekenta
Mar 25, 2024 ⋅ 8 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