-
I attempted to mimic Go's single flight package myself [0]. It doesn't have support for the asynchronous world but I suppose that could be made possible. I also have to mention bradfitz for providing the initial implementation (I think?) to learn from. It's really quite elegant!
[0]: https://github.com/gsquire/singleflight
-
Scout Monitoring
Performance metrics and, now, Logs Management Monitoring with Scout Monitoring. Get early access to Scout Monitoring's NEW Ruby logging feature [beta] by signing up now. Start for free and enable logs to get better insights into your Rails apps.
-
Coming from the Ruby ecosystem, a lot of this played out similarly to how the Rack[1] middleware conventions developed in the early Rails v1 and v2 days. Prior to Rack there was a lot of fragmentation in HTTP server libraries, post-Rack everything more or less played nicely as long as libraries implemented Rack interfaces.
I don't write Rust professionally, but it was a bummer seeing that this seems to be a place that was figured out (painfully) in ecosystems used heavily for web development--Javascript and Elixir have their own Rack equivalents[2][3]. I hope that Tower plays a similar role to unify the library ecosystem in Rust.
1. https://github.com/rack/rack
2. http://expressjs.com/en/guide/writing-middleware.html
3. https://github.com/elixir-plug/plug
-
Coming from the Ruby ecosystem, a lot of this played out similarly to how the Rack[1] middleware conventions developed in the early Rails v1 and v2 days. Prior to Rack there was a lot of fragmentation in HTTP server libraries, post-Rack everything more or less played nicely as long as libraries implemented Rack interfaces.
I don't write Rust professionally, but it was a bummer seeing that this seems to be a place that was figured out (painfully) in ecosystems used heavily for web development--Javascript and Elixir have their own Rack equivalents[2][3]. I hope that Tower plays a similar role to unify the library ecosystem in Rust.
1. https://github.com/rack/rack
2. http://expressjs.com/en/guide/writing-middleware.html
3. https://github.com/elixir-plug/plug
-
Stock Tokio is tuned towards the general set of applications, attempting to make things work well out of the box, while being ergonomic to use. But, this isn't set in stone. There are knobs and patterns that can be used to really squeeze out performance, as seen with Actix Web, which is based on Tokio [1].
[1] https://www.techempower.com/benchmarks/