Our great sponsors
-
If you need to handle <100,000 sockets, you will probably be fine with a thread per socket. Call set_read_timeout to implement the deadline. Run load tests and adjust the socket limit.
Async lets one process handle millions of sockets.
If you want to handle millions of sockets with threads, you can use `mio` [0]. Mio's API has footguns that can cause UB. If your wire protocol is complicated, you may find yourself implementing something like async, but worse.
-
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
glommio
Glommio is a thread-per-core crate that makes writing highly parallel asynchronous applications in a thread-per-core architecture easier for rustaceans.
https://github.com/DataDog/glommio/blob/master/examples/hype...
And the performance was blisteringly quick (6x better latency streaming from a file compared to Nginx).
-
> Have any other Rust async runtimes use io_uring/gotten at all good yet?
yes, check out `actix-rt`
-
Neat! Thanks for admitting you use Windows.
Perhaps MS could pay for crater runs on Windows? Are crater runs done on Windows now?
Looks like yes, https://github.com/rust-lang/crater/blob/master/docs/agent-m...
-
-
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
-
Oh, I have written my own share of userspace C context switching libraries, I know all the gory the details :). For example see my minimalist [1] stackful coroutine library: the full context switching logic is three inline asm instructions (99% of the complexity in that code is to transparently support throwing exceptions across coroutine boundaries with no overhead in the happy path).
You need compiler help for the custom calling convention support and possibly to optimize away the context switching overhead for stackful coroutines, which is something that compilers can already do for stackless coroutines.
The duff device is just a way to simulate stackless coroutines (i.e. async/await or whateverer) in plain C, in a way that the compiler can still optimize quite well.
[1] https://github.com/gpderetta/delimited/blob/master/delimited...
Related posts
- What's the canonical way of doing it in rust?
- Need recommendations for technologies, frameworks etc. for an IoT device project in Rust
- What's everyone working on this week (22/2023)?
- My Rust project has been selected for the GitHub Accelerator Program and I’ll be working on it full-time!
- Open source code with swearing in the comments is statistically better than that without