Ruvio.Client
0.2.1
See the version list below for details.
dotnet add package Ruvio.Client --version 0.2.1
NuGet\Install-Package Ruvio.Client -Version 0.2.1
<PackageReference Include="Ruvio.Client" Version="0.2.1" />
<PackageVersion Include="Ruvio.Client" Version="0.2.1" />
<PackageReference Include="Ruvio.Client" />
paket add Ruvio.Client --version 0.2.1
#r "nuget: Ruvio.Client, 0.2.1"
#:package Ruvio.Client@0.2.1
#addin nuget:?package=Ruvio.Client&version=0.2.1
#tool nuget:?package=Ruvio.Client&version=0.2.1
Ruvio.Client
RESP2 client for Ruvio. Connecting does not send CLIENT SETINFO or HELLO. The typed methods cover every command in docs/compatibility-matrix.json and the options that change what Ruvio does. FLUSHDB ASYNC (it runs synchronously) and HELLO AUTH/SETNAME have no typed form. Anything else can go through ExecuteAsync with the same argument lists as redis-cli.
Reads start with Get. Writes use the mutation: Set, Add, Remove, Delete, Increment. That is not StackExchange.Redis naming. A range that returns values is GetSortedSetRangeByRankWithScoresAsync, not SortedSetRangeByRankWithScoresAsync.
using Ruvio.Client;
await using var db = await RuvioClient.ConnectAsync("127.0.0.1", 6379);
await db.AddSortedSetAsync("leaderboard", ("player2", 50), ("player1", 100));
IReadOnlyList<SortedSetEntry> rows = await db.GetSortedSetRangeByRankWithScoresAsync(
"leaderboard",
0,
-1,
descending: true);
Connecting
One RuvioClient is one TCP connection bound to one logical database. Pick the database when you connect and use the client as that database:
await using var cache = await RuvioClient.ConnectAsync("127.0.0.1", 6379, database: 2);
await using var sessions = await RuvioClient.ConnectAsync(IPAddress.Loopback, 6379, database: 3);
await using var main = await RuvioClient.ConnectAsync(new IPEndPoint(IPAddress.Parse("10.0.0.5"), 6379));
await using var secured = await RuvioClient.ConnectAsync(new RuvioClientOptions
{
Host = "10.0.0.5",
Port = 6379,
Username = "app",
Password = "secret",
Database = 4,
ConnectTimeout = TimeSpan.FromSeconds(2),
});
Database 0 sends nothing on connect. Any other index sends SELECT after AUTH, before ConnectAsync returns. Indexes run from 0 to the server's databases setting minus one (16 by default, at most 256). With shards > 1 only database 0 exists, as in Redis Cluster.
SelectAsync and GetDatabaseAsync send SELECT on the same connection; every later command on that client uses the new database. GetDatabaseAsync returns the same client, not a second socket. Open one client per database when two parts of an application need different databases at the same time.
FlushDatabaseAsync, FlushAllDatabasesAsync, SwapDatabasesAsync, and MoveKeyAsync send FLUSHDB, FLUSHALL, SWAPDB, and MOVE. See docs/LOGICAL_DATABASES.md.
Options
| Command | Methods |
|---|---|
SET |
SetAsync (PX, NX, XX), SetAsync(key, value, DateTimeOffset) (PXAT), SetKeepingTimeToLiveAsync (KEEPTTL), SetAndGetAsync (GET) |
LPOP / RPOP |
one element or a count |
SPOP / SRANDMEMBER |
one member or a count; a negative SRANDMEMBER count may repeat |
HSCAN / SCAN |
MATCH and COUNT |
ZADD |
(member, score) tuples, SortedSetEntry, or one member, score; SortedSetAddFlags: NX, XX, GT, LT, CH; IncrementSortedSetAsync(..., flags) sends INCR |
XADD |
AddStreamEntryAsync(key, id, maxLength, ...) sends MAXLEN |
XRANGE / XREVRANGE |
optional COUNT |
XREAD / XREADGROUP |
StreamReadOptions: COUNT, BLOCK, NOACK (group reads only) |
XGROUP CREATE |
createStream: true sends MKSTREAM |
XPENDING |
summary, or the extended form with IDLE, a range, a count, and a consumer |
XCLAIM |
StreamClaimOptions: IDLE, TIME, RETRYCOUNT, FORCE, LASTID; ClaimStreamEntryIdsAsync sends JUSTID |
INFO |
optional section; prometheus returns Prometheus text |
FUNCTION LOAD |
LoadFunctionAsync(name, body); the body is plain Lua and is lost on restart |
A blocking read (BLPOP, XREAD BLOCK, XREADGROUP BLOCK) holds the connection until it returns. Use a separate client for it.
Subscribe methods put the connection in Pub/Sub mode. After SubscribeAsync, use ReadMessageAsync for later message / pmessage / smessage pushes. HelloAsync is explicit; connect still does not send HELLO.
A password is sent as AUTH only when RuvioClientOptions.Password is set. One client runs commands one at a time. ExecuteManyAsync pipelines several commands on that connection. A server error reply leaves the connection usable. A broken read or write closes it.
0.2.1
AddSortedSetAsync(key, ("ada", 100), ("bob", 50))takes(member, score)tuples, with or withoutSortedSetAddFlags.AddSortedSetAsync(key, member, score)adds one member and returns whether it was new.
0.2.0
ConnectAsync(host, port, database),ConnectAsync(IPAddress, port, database),ConnectAsync(IPEndPoint, database), andRuvioClientOptions.Database.SelectAsync,GetDatabaseAsync,FlushDatabaseAsync,FlushAllDatabasesAsync,SwapDatabasesAsync,MoveKeyAsync.- The option overloads in the table above, and
PingAsync(message). - Breaking:
LoadFunctionAsync(body)becameLoadFunctionAsync(name, body). The old form sent a request Ruvio always refused.DeleteFunctionAsyncreturnsTask<bool>.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages (6)
Showing the top 5 NuGet packages that depend on Ruvio.Client:
| Package | Downloads |
|---|---|
|
Ruvio.Client.AspNetCore
ASP.NET Core integration for the Ruvio.Client RESP2 SDK. |
|
|
Ruvio.Extensions.Caching
Binary-safe IDistributedCache integration for Ruvio. |
|
|
Ruvio.AspNetCore.RateLimiting
Opt-in distributed fixed-window HTTP rate limiting backed by Ruvio. |
|
|
Ruvio.AspNetCore.DataProtection
Append-only ASP.NET Core Data Protection key-ring storage on Ruvio. |
|
|
Ruvio.AspNetCore.Idempotency
Explicitly opted-in, bounded HTTP idempotency for ASP.NET Core and Ruvio. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.1 | 0 | 10/10/2026 |
| 0.3.0 | 0 | 10/9/2026 |
| 0.2.13 | 103 | 10/5/2026 |
| 0.2.12 | 104 | 10/2/2026 |
| 0.2.11 | 102 | 10/2/2026 |
| 0.2.10 | 102 | 10/2/2026 |
| 0.2.9 | 178 | 10/2/2026 |
| 0.2.8 | 96 | 10/1/2026 |
| 0.2.7 | 96 | 9/30/2026 |
| 0.2.6 | 109 | 9/26/2026 |
| 0.2.5 | 115 | 9/26/2026 |
| 0.2.4 | 102 | 9/26/2026 |
| 0.2.3 | 107 | 9/26/2026 |
| 0.2.2 | 115 | 9/25/2026 |
| 0.2.1 | 116 | 9/25/2026 |
| 0.2.0 | 103 | 9/25/2026 |
| 0.1.3 | 94 | 9/23/2026 |
| 0.1.2 | 88 | 9/23/2026 |
| 0.1.1 | 99 | 9/23/2026 |
| 0.1.0 | 88 | 9/23/2026 |