I am hoping I could get some best practices pointers on the development of my first Rust application. There are several concerns that I am running into that make me hesitant to continue the development of my program without first addressing.
System Assumptions: No Data Center; High Latency; Low Bandwidth; Commodity Computing; Dynamic Peer Population of 1-N
1.) I am currently utilizing futures, std, and async-std for my async/await functions and executor. There are many functions that seem to be part of each of these libraries. Upon researching the topic I am typically confronted with tokio, and differing implementations. What is the best practice for when to use std functions vs their asynchronous counterparts?
2.) For the executor, should I go ahead and make the switch to tokio (seems like this may be a fairly large overhaul)? Or will async-std, or even smol due to the commodity computing assumption, serve me best/good-enough for now? (keeping in mind potentially years of future development and possible integration as a core mission critical system vs. the need to be at least demo ready for continued funding by end of year)
3.) At what point am I awaiting too many futures? Do I need to create logic breakpoints where I spawn a thread? Or is intelligent placement of block_on(), .await, a.join(b), and select! statements sufficient? I am concerned nodes will freeze on an inter-dependent future, or that with the smallest potential commodity computing node, the program will simply be unable to poll so many futures efficiently.
4.) Are Rust applications really such large files. My current workspace is almost 5GB and nowhere near done. Is this typical? Or is it more likely that I am importing more features and libraries then necessary?
P.S.) Here is a link to another topic I opened with some example code showcasing my current approach to a specific functionality of my program if you'd like a reference: