Distrubuted Systems and DHT

Hey guys, first post here. Almost no experience with Rust, but interested to learn.

Here the situation: I've been working on a distributed communication system to replace WhatsApp and Telegram. I didn't let Zuckerberg know about, so please, keep it secret :slight_smile:

Ok, the above sentence is a joke, but it is a P2P communication system, where nodes find each other on a network.

The project is structured on four layers:

  • Discovery
  • Transport
  • Application Protocol
  • Application

For the Discovery layer, it uses OpenDHT, which is based on Kademlia (very efficient).
For Transport layer, it uses lsquic, a C implementation of QUIC.

These two layers are already built and working in C++.

The question: Yes, there is a question digging in my mind almost all the time: Should I be building this in Rust?

I can find reason to support and reject this idea, but I'm here to understand at the technical level what I can find in Rust today. Specifically: Is there a DHT implementation as mature as OpenDHT?

my question: why?

if it were "I heard written in rust is a feature", then I would suggest no, your C++ solution already works fine.

if it were " I want to learn rust with something I'm familiar", then it's good. learning by doing is a very good way to practice.

I don't know OpenDHT specifically, but libp2p is the goto library for p2p networks in rust, and it's very "mature", by which I mean real world projects are using it.

Hey @nerditation,

Thanks for answering.

my question: why?

Right, I've reasons to do it and reason to not. I think now the question is more related to ecosystem maturity. If I move the project to Rust, would I find a mature enough ecosystem?
Even though now I believe the answer might look like "yes", at the same time the only viable option in Rust seems to be libp2p, which proposes I way more comprehensive approach than the pieces to build that I'm looking for.

Thanks, after spending a day of research, now I think the answer is "no", and I should keep building as I've been doing.