4 ms·
Your CRUD web application server almost certainly doesn't need async Rust. Using a blocking HTTP server is not "might be a good idea", it simply is a good idea.
by sanxiyn 3y ago
Your CRUD web application server almost certainly doesn't need async Rust. Using a blocking HTTP server is not "might be a good idea", it simply is a good idea.
I recommend Rouille for this: https://github.com/tomaka/rouille https://github.com/tomaka/rouille. In case you are worried about performance, check the benchmark. Blocking Rouille is faster than builtin async server in Node.js.
- hardware2win 3y ago>Your CRUD web application server almost certainly doesn't need async Rust. Using a blocking HTTP server is not "might be a good idea", it simply is a good idea. How so? By what logic? > Blocking Rouille is faster than builtin async server in Node.js It isnt proof
- sanxiyn 3y agoBecause there are no advantages and only disadvantages of using async Rust. Async Rust is harder to use, and by assumption you don't need async Rust performance.
- cmrdporcupine 3y agoThanks for this reference. Will bookmark for if I ever need an HTTP service. Wish this also provided websockets. EDIT: it does https://github.com/tomaka/rouille/blob/master/src/websocket/websocket.rs https://github.com/tomaka/rouille/blob/master/src/websocket/... Looks a bit neglected though. Not much recent development.
- zokier 3y agoThere is also Astra https://github.com/ibraheemdev/astra https://github.com/ibraheemdev/astra
- cmrdporcupine 3y agoThis looks nice, thanks.
- dpc_01234 3y agoYes, but since Rust ecosystem went all in on async http, you'll have to use some niche http framework, and dumb CRUD code is not going to suffer too bad from async's limitations. I really wish there was a popular and community embraced blocking http framework in Rust, to tip the scales here a bit.