Clients
Choose a client
Section titled “Choose a client”| Language | Package | Install | Tests |
|---|---|---|---|
| Rust | ruvio-client |
cargo add ruvio-client |
cargo test --manifest-path clients/ruvio-client/Cargo.toml |
| C# | Ruvio.Client |
dotnet add package Ruvio.Client |
dotnet test on Ruvio.Client.Tests and Ruvio.Client.AspNetCore.Tests |
| Go | clients/go |
go get github.com/salihcantekin/ruvio/clients/go |
go test ./... |
| Java | ruvio-client |
io.github.salihcantekin:ruvio-client (Maven Central) |
mvn -B test |
| Python | ruvio-client |
pip install ruvio-client |
python -m pytest |
| Node.js | ruvio-client |
npm install ruvio-client |
npm test |
Also here: ruvio-ui, the browser operator UI (AGPL-3.0). The clients are MIT licensed (license).
Live tests skip unless RUVIO_TEST_ADDR is set; cluster tests need RUVIO_CLUSTER_ADDR (a server started with shards = 3 and port_mode = "per-shard"). Details are in each client’s README.
C# and .NET
Section titled “C# and .NET”Ruvio.Client.AspNetCore registers one RuvioClient as RuvioClient, IRuvioClient (commands), and IRuvioConnection (reconnect and dispose).
Separately packaged .NET integrations add IDistributedCache, ASP.NET Core output caching, Data Protection key-ring storage and opt-in HTTP rate limiting and idempotency. They depend on the client; the client does not depend on framework integrations.
Run the client suites
Section titled “Run the client suites”cargo build --bin ruvioRUVIO_ADDR=127.0.0.1:16382 RUVIO_DATA_DIR=/tmp/ruvio-clients ./target/debug/ruviopython3 scripts/run_client_suites.py --port 16382The script runs the Rust and C# unit tests. Set RUVIO_TEST_ADDR (the script does this) so clients/ruvio-client/tests/live.rs also talks to that process.
Connection behavior (Rust and C#)
Section titled “Connection behavior (Rust and C#)”- Pub/Sub uses a second TCP socket.
GET,SET,PING, andPUBLISHstay on the command connection. - A dropped socket, including a shard socket, is opened again before the next command. The command that sees the drop fails.
- The C# client sends one
GET,MGET,EXISTS,HGET,TTL, orPTTLagain when the socket closes before any reply byte; a pipeline is not retried. The Rust client does not retry that command. - Subscriptions are sent again on the new Pub/Sub socket.
- Retry is on by default. Set
Reconnect/reconnectto false and callReconnectAsync/reconnect, or pass a delay function. Null /Nonestops the retry. - Connection lost and restored events carry the host, port, and whether the socket is the subscriber. ASP.NET Core binds the retry settings and can attach those events when the singleton opens.
A tour of nearly every method, against a local server:
cargo run --manifest-path clients/ruvio-client/Cargo.toml --example tour -- 127.0.0.1 6379dotnet run --project clients/csharp/Ruvio.Client.Tour -- 127.0.0.1 6379