Ruvio.Client 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Ruvio.Client --version 0.2.0
                    
NuGet\Install-Package Ruvio.Client -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ruvio.Client" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ruvio.Client" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Ruvio.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ruvio.Client --version 0.2.0
                    
#r "nuget: Ruvio.Client, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ruvio.Client@0.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ruvio.Client&version=0.2.0
                    
Install as a Cake Addin
#tool nuget:?package=Ruvio.Client&version=0.2.0
                    
Install as a Cake Tool

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",
    new SortedSetEntry("player2", 50),
    new SortedSetEntry("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 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.0

  • ConnectAsync(host, port, database), ConnectAsync(IPAddress, port, database), ConnectAsync(IPEndPoint, database), and RuvioClientOptions.Database.
  • SelectAsync, GetDatabaseAsync, FlushDatabaseAsync, FlushAllDatabasesAsync, SwapDatabasesAsync, MoveKeyAsync.
  • The option overloads in the table above, and PingAsync(message).
  • Breaking: LoadFunctionAsync(body) became LoadFunctionAsync(name, body). The old form sent a request Ruvio always refused. DeleteFunctionAsync returns Task<bool>.
Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.OutputCaching

Binary ASP.NET Core output caching with distributed tag invalidation on Ruvio.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.1 37 10/10/2026
0.3.0 39 10/9/2026
0.2.13 106 10/5/2026
0.2.12 105 10/2/2026
0.2.11 103 10/2/2026
0.2.10 103 10/2/2026
0.2.9 178 10/2/2026
0.2.8 97 10/1/2026
0.2.7 97 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 96 9/23/2026
0.1.2 90 9/23/2026
0.1.1 103 9/23/2026
0.1.0 90 9/23/2026