SourceRpc.Query 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package SourceRpc.Query --version 0.1.0
                    
NuGet\Install-Package SourceRpc.Query -Version 0.1.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="SourceRpc.Query" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SourceRpc.Query" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="SourceRpc.Query" />
                    
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 SourceRpc.Query --version 0.1.0
                    
#r "nuget: SourceRpc.Query, 0.1.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 SourceRpc.Query@0.1.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=SourceRpc.Query&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=SourceRpc.Query&version=0.1.0
                    
Install as a Cake Tool

SourceRpc.Query

The pull half of a Source RPC network, for .NET: what a failure means, whether a call may be sent again, a deadline that is a budget across attempts, and a canonical cache key — over Polly and FusionCache.

Beside SourceRpc rather than in it: the core depends on nothing but the BCL, and a device binding that never pulls should not carry a resilience engine and a cache to reach a network it only answers. Its own version line, because it is built against the core's public API rather than against its shape.

Two libraries rather than one because Polly deliberately has no cache — the v7 cache policy is gone and the project defers to caching libraries. Resilience is Polly's, storage is FusionCache's, and what is here is what neither can know.

var budget = new RpcCallBudget(TimeSpan.FromSeconds(10));
var readings = await RpcResilience.ExecuteAsync(
    budget,
    (options, token) => client.CallAsync<Reading[]>("oven3", "plant", "readings", null, options, token),
    new RpcResilienceOptions { Semantics = RpcMethodSemantics.Query },
    cancellationToken: token);

A deadline is a budget across every attempt. Every resilience engine offers a timeout per attempt and almost none offers what remains — so three attempts under a "ten second timeout" that each restart the clock is a caller waiting thirty seconds having asked for ten. Each attempt is handed the options for this go with the ttl set to what is left, so the far end can refuse work that is already too late; a budget with nothing left refuses locally rather than sending a zero, because zero means no deadline on this wire.

Retrying reads the error vocabulary rather than the exception type. A TransportError is retried even for a non-repeatable command — it never left, so it has had no effect to repeat — and an UnknownOutcome is retried for nothing the caller did not declare repeatable. Undeclared means undeclared.

The cache key is a port of the TypeScript encoder rather than an equivalent of it. Two callers who built the same arguments differently are asking one question, and on the link this was written for asking twice is a screen that takes twice as long to draw. Its expected strings in SourceRpc.Tests were produced by the TypeScript implementation, so changing either encoder fails one of the two suites.

What is deliberately absent is freshness from the publisher. A page drawn at the revision a component channel currently holds is confirmed current rather than merely recently fetched, and a .NET peer cannot observe a component at all. Until that changes this is an age window, labelled as one.

License

MIT

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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.0 94 8/30/2026
0.1.0 89 8/26/2026