I wanna to know how rational my P2P server's system structure(as system)

⚓ Rust    📅 2026-03-06    👤 surdeus    👁️ 3      

surdeus

I'm writing my P2P server's system for my needs(I wanna call to friend),
so I wanna to know how rational my server's system structure(as system).
I wrote "protocols", by protocols I mean a set of rules for implementing a special p2p server mode (for example: I wrote the CPfAA protocol - Customizable Protocol for Application Applications).

So I want to know if this is rational, and now I will show you my project file structure:

src/ 
  server/
    protocol/ 
      stack/
          mod.rs
      support/ 
          mod.rs
      log.rs
      protocol.rs
  main.rs
  server.rs

"protocol" directory stores protocol's stack, from stack we getting protocols in "protocol.rs" - it's calls protocols from stack and use them.
"server.rs" - main server structure and implementation.
"log.rs" - it's just creates logs files in server.
"support/mod.rs" - it's support for client apps and protocols(contains the Message Monitor structure(This section checks for messages from peers and notifies about the arrival of messages)).

So, I wanna know what YOU think about my server's system(Lets naming it as SeS or SerSys, SS?) structure? And what about rationality of protocols?

I'm new in Rust, so... I use arch btw! (Also macos)

I would be very glad to receive any response from you, thank you for reading the post.

1 post - 1 participant

Read full topic

🏷️ Rust_feed