is there a rust Async best practices book?
I'm doing two real life projects in Tokio. I've learnt a lot. I've come across some problems where I hacked out a solution that works without fully understanding the tools at my disposal.
High level tools like channels, spawning tasks, streamext and sinkext. Low level tools like implementing streams and sinks and futures.
My "go to" solution seems to be, spawn ana sync block that drives a channel, then subscribe to that channel as a stream elsewhere.
I use mpsc channels with a single producer a lot. It feels like I'm doing something wrong, but it hacks together a solution.
In one solution, because order of things didn't matter, I have an exponentially growing swarm of tasks that spawn hundreds of new tasks each and doesn't keep track of them. It probably reaches ten million plus at any given point in time.
I know tasks are supposed to be light weight, but I feel like a spoilt person consuming the planets resources. I tried it with less spawning and more .awaiting and it was about 30% slower.
So my question is, because these tools, rust futures, and high level preemptive programming are quite new and unique, has anyone done a deep dive and published a best practices book?