Re:Hyper – A fast and correct HTTP implementation for Rust
by redman25 on Friday May 12, 2023 @06:26PM
(#35923289)
Async is not necessarily as useful for database connections since connection counts will generally be in the 10s and handled with a thread pool. It's pretty low overhead to just use pooling.
[ Parent
| on HN ]
Re:Hyper – A fast and correct HTTP implementation for Rust
by unshavedyak on Friday May 12, 2023 @06:35PM
(#35923392)
Yea but you still want a good async interface if you're already using async, even if it's mocked over an underlying threadpool. Otherwise you have to wrap all your DB clients in your own adhoc async wrappers which feels kinda bad, imo.
Re:Hyper – A fast and correct HTTP implementation for Rust
by laurencerowe on Friday May 12, 2023 @07:19PM
(#35923738)
It’s frustrating there seems to be no good threaded web server for Rust given how uniquely great Rust is at threading.
You can adapt from async to sync but there is a definite complexity tax with all the pinning plus the runtime cost of the extra pinning.
Async is great for more proxy like use cases though.
Re:Hyper – A fast and correct HTTP implementation for Rust
by laurencerowe on Saturday May 13, 2023 @04:52AM
(#35926741)
*runtime cost of the extra copying.