Re:Rust async/await hits stable tomorrow
by vbezhenar on Wednesday November 06, 2019 @02:24PM
(#21466069)
You can use async network calls to handle multiple number of connections (in library code) yet use thread pool to write business logic (application code).
I'm not suggesting to just use blocking I/O API. Non-blocking API like select/epoll/etc is very useful and should be utilized whenever possible. I'm about those language features.
Re:Rust async/await hits stable tomorrow
by jchw on Wednesday November 06, 2019 @02:25PM
(#21466088)
Why is this approach nicer than event loops w/ async/await or goroutines? I think forcing humans to manually deal with continuations is not humane :)
Re:Rust async/await hits stable tomorrow
by rowanG077 on Wednesday November 06, 2019 @02:44PM
(#21466339)
Why do you want to make your code more complex by using select/epoll/etc and making continuation spaghetti instead of just embracing async?
Re:Rust async/await hits stable tomorrow
by gdxhyrd on Wednesday November 06, 2019 @03:30PM
(#21466852)
You are mixing up asynchronous IO with non-blocking IO with async syntax sugar.
As the name implies, async syntax sugar is a convenience, it does not magically improve performance.
Re:Rust async/await hits stable tomorrow
by Scarbutt on Wednesday November 06, 2019 @03:14PM
(#21466675)
100 boxes handling 1000 connections
I hope this is a typo ;)
Consider that maybe this is because your projects are not the intended targets of async programming.
Async is super not new. Fibers and CSP and etc. are not new. A lot of the benefit of better concurrency is exactly for stuff that scales horizontally, but just because you can scale to hundreds of boxes does not mean you want each box to be bottlenecked on how many connections it can handle. For servers you absolutely want to be able to use your nodes to their fullest. Demand for this is almost certainly driving programming languages.
10 boxes handling 10000 connections > 100 boxes handling 1000 connections (edit: each)