flume
trust-dns
DISCONTINUED
Our great sponsors
- InfluxDB - Collect and Analyze Billions of Data Points in Real Time
- Onboard AI - Learn any GitHub repo in 59 seconds
- SaaSHub - Software Alternatives and Reviews
flume | trust-dns | |
---|---|---|
13 | 14 | |
1,983 | 3,254 | |
- | - | |
0.0 | 7.1 | |
2 months ago | about 2 months ago | |
Rust | Rust | |
Apache License 2.0 | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
flume
- pub/sub Event bus in rust
-
Is there any part of the Standard Library that really impresses you?
I also like flume, it has impressive performance (although not the best). More importantly, it's written only with safe rust. https://github.com/zesterer/flume
-
appreciating fearless concurrency
The most commonly suggested replacement for mspc is crossbeam-channel; flume is also relatively popular.
-
Rust has a small standard library (and that's ok)
It's not officially deprecated, but the alternatives on crates.io are considered better. flume and crossbeam-channel feature less unsafe code and offer better performance. Benchmarks.
-
Why are so many important features not in standard library yet?
it's slow (checkout flume's benchmarks for example)
-
A mini-Erlang/Elixir -- tell me if/why my idea sucks
For concurrency/parallelism, you launch at most 2 * CPU Cores, PIN them and use a fast broker to spread the task (like a ring buffer or an MPSC). But you keep linear scan, tight loops, SIMD friendly data, on each. You are not switching context that much, and instead, bet you will process the batch fast. (CPUs are fast today!)
- Whats your favourite open source Rust project that needs more recognition?
-
PlaintDB Serves - another milestone reached
First, I was becoming more and more confident that the channel library Daxpedda and I fell in love with, flume, was misbehaving, but I couldn't seem to reproduce it outside of the massive PliantDB codebase. I finally called up Daxpedda on Discord and screen shared my debugging session, showing him how the tests succeeded if I retained a channel. If I allowed the sender to drop after successfully sending, sometimes the tests would fail. He agreed, something was odd. It took me a while, but I finally whittled it down to about 30 lines of code and reported the issue. In an amazingly quick fashion, the maintainer fixed the issue and released an update. And for the record, I still fully love and recommend this library if you're mixing async and non-async code using channels. It's a wonderful implementation.
-
single-producer single-consumer concurrent queue
Sort of? Here's the closest thing you'll probably find: https://crates.io/crates/flume
-
Hey Rustaceans! Got an easy question? Ask here (6/2021)!
My first try was with flume, which uses a single producer, multi-consumer setup, and while it compiles and runs, it's magnitudes slower than the serial version. Here's a psuedocode rendition:
trust-dns
-
You might want async in your project
IO is not a part of the async runtime contract (I don't know if this is good or bad), and Tokio & futures famously have different `Async{Read,Write}` traits. I once had to do this [0] to adapt between them.
This means that any crate that uses IO will be bound to a limited number of Runtimes. Everything being Tokio-only is pretty bad (though Tokio itself is great), but here we are...
[0] https://github.com/bluejekyll/trust-dns/pull/1373#issuecomme...
-
What would you rewrite in Rust?
You might be interested in Trust DNS - "A Rust based DNS client, server, and Resolver, built to be safe and secure from the ground up."
-
Announcing `async-dns`
It looks like you need to reach for a separate crate for that: https://github.com/bluejekyll/trust-dns/blob/7dcb7b983f5407d95d93b800af13caeee975aaa8/crates/async-std-resolver/src/lib.rs
This is not true; you can use the async resolver with other executors: https://github.com/bluejekyll/trust-dns/blob/main/crates/resolver/src/async_resolver.rs
-
Innernet: Open source Rust based Tailscale alternative by Tonari
You could run a local DNS server using something like https://github.com/bluejekyll/trust-dns . Or, you could install an NSS module to resolve names via the innernet client.
-
single-producer single-consumer concurrent queue
My point is that "implementation that doesn't use unsafe" is not necessarily always slower than "implementation that does use unsafe". Often people assume that this is the case, and it isn't. tinyvec currently beats smallvec in more than a few benchmarks. Not all, but some. And this sometimes visible to users. The point is that if you want speed, you don't necessarily need to give up any safety at all. Most differences in performance are due to the amount of effort or expertise that has been spent on the codebase, not the amount of unsafe in it.
What are some alternatives?
parity-bitcoin - The Parity Bitcoin client
citybound - A work-in-progress, open-source, multi-player city simulation game.
woodpecker - Drill is an HTTP load testing application written in Rust
rsedis - Redis re-implemented in Rust.
Parallel
tauri - Build smaller, faster, and more secure desktop applications with a web frontend.
tokei - Count your code, quickly.
Servo - The Servo Browser Engine
uniffi-rs - a multi-language bindings generator for rust
tv-renamer - Mirror of https://gitlab.com/mmstick/tv-renamer
iota - A terminal-based text editor written in Rust
PumpkinDB - Immutable Ordered Key-Value Database Engine