client/README.md
sonic_client, the official Rust client for SonicThis crate is a work in progress. API is subject to changes until it reaches
1.0.0. We won’t keep it in ZeroVer, don’t worry, but for
now some pieces still need some polishing.
Mutex, RwLock…mio) for optimal performance. Parsing is also minimal and aborts
early to avoid needless computations.sonic_client doesn’t execute a single line of code. No CPU time
is wasted, it does the bare minimum.clone data needlessly.PUSH
megabytes of data without having to worry about Sonic buffer limits.sonic_client can be used at any scale. We benchmarked
it by ingesting the English portion of Wikipedia, if that’s a good enough
proof for you :)sonic_client for some reason, you’ll still have a way to do the new
stuff.sonic_client can be used fully
synchronously, but it also exposes an async API for use with any runtime.unsafe, and unwraps/expects for performance in rare cases.sonic_client compiles with no log at all.
However, you can enable std, log or tracing logs using feature flags.sonic-channel by @pleshevskiy used to be the recommended Rust client, but
it has been archived on Mar 1, 2023 signifying it won’t get updated in the
future. While trying to use it in our benchmarks we noticed PONG is
unsupported (although PING is… causing a failure eery time it’s called) but
more importantly ingested text is not escaped. This means any text containing
a " breaks request parsing and causes ingestion to fail.
sonic_client by @FrontMage was also recommended by Sonic’s README, but while
using it we noticed it logs passwords on START (!). In addition, the README
says the crate is under development but last commit was made on Apr 11, 2019 so
it’s safe to assume the crate is abandonned.
To address those issues and as part of modernizations we decided to insource the official Rust client. This will ensure its lifetime aligns with Sonic’s, and tests will ensure it always works (and at scale).
After reaching out to @FrontMage, he transferred us the ownership of his (abandonned) crate so we can reuse the name and avoid confusing situations. This is why this crate is published as pkg:cargo/sonic_client.