Axum's WS documentation highlights the StreamExt::split method for independent send & recv tasks. This is, however, just an Arc<Mutex> wrapper (with all of its inherent performance overhead). The actor pattern for I/O resources is a higher performance alternative. Axum is a high performance web framework, so it's recommended patterns should similarly be high performance.
Refs: #2695
Axum's WS documentation highlights the
StreamExt::splitmethod for independent send & recv tasks. This is, however, just anArc<Mutex>wrapper (with all of its inherent performance overhead). The actor pattern for I/O resources is a higher performance alternative. Axum is a high performance web framework, so it's recommended patterns should similarly be high performance.Refs: #2695