Public API
This page documents Orleans.Lattice.Api.Data.Grpc 10.5.0, in the documentation for Orleans.Lattice 10.5.0 (release line 10.5), built 2026-12-05. It is also published as markdown, with every table and list, at api.md, and llms.txt lists every page.Orleans.Lattice.Api.Data.Grpc publishes the remote half of the data API: the LatticeDataApiGrpcClient, the Orleans-serialized wire records the RPCs carry, the transport authorization seam, the identity bridges, the server options, and the registration extensions. The gRPC service, its method definitions, marshallers and authorization interceptor are internal; they are described by behaviour in Architecture. The facade contract the service projects is listed in the data facade's public API.
Registration
| Method | Host | What it registers |
|---|---|---|
AddLatticeDataApiGrpc(this IServiceCollection services, Action<LatticeDataApiGrpcOptions>? configure = null) |
the web host's service collection | The options, the default-deny ILatticeDataApiAuthorizer, the header-based ILatticeDataApiCredentialBridge and ILatticeDataApiActiveTenantBridge, the authorization interceptor, and the service. Every seam is registered with TryAdd, so a host registration made first wins. |
MapLatticeDataApiGrpc(this IEndpointRouteBuilder endpoints) |
the endpoint route builder | Maps the orleans.lattice.api.data service routes. |
The silo must also register the facade itself with AddLatticeDataApi(); see the data facade guide. Option values are documented in Configuration.
Client
LatticeDataApiGrpcClient.Create(CallInvoker callInvoker, IServiceProvider serializerProvider) builds a client over a caller-supplied call invoker (typically channel.CreateCallInvoker()), resolving the per-message Orleans serializers from serializerProvider, which must have Orleans serialization registered. The client has no public constructor and carries no transport policy: address, TLS, deadlines, retries and call credentials belong to the channel or invoker.
| Client method | RPC | Request | Response |
|---|---|---|---|
SetAsync |
Set |
DataSetRequest |
DataSetResponse |
DeleteAsync |
Delete |
DataDeleteRequest |
DataDeleteResponse |
SetManyAtomicAsync |
SetManyAtomic |
DataAtomicRequest |
DataAtomicResponse |
SetManyAtomicCrossTreeAsync |
SetManyAtomicCrossTree |
DataCrossTreeRequest |
DataCrossTreeResponse |
GetAsync |
Get |
DataGetRequest |
DataReadResult (facade DTO) |
ReadRangeAsync |
ReadRange |
DataRangeRequest (facade DTO) |
DataRangePage (facade DTO) |
DeleteRangeAsync |
DeleteRange |
DataRangeDeleteRequest (facade DTO) |
DataRangeDeleteResult (facade DTO) |
SetManyAsync |
SetMany |
DataSetManyRequest |
DataSetManyResponse |
SetManyStreamAsync |
StreamSetMany (duplex) |
DataSetManyStreamRequest frames |
DataSetManyStreamResponse frames |
CrdtWriteAsync |
CrdtWrite |
CrdtWriteRequest |
CrdtWriteResponse |
CrdtReadAsync |
CrdtRead |
CrdtReadRequest |
CrdtReadResponse |
ProbeCapabilitiesAsync |
ProbeCapabilities |
DataProbeRequest |
LatticeDataCapabilities (facade DTO) |
Every RPC is unary except StreamSetMany, a duplex stream: the client sends one DataSetManyStreamRequest frame per batch (at most DataSetManyStreamOptions.MaxBatchSize entries, every frame naming the same tree), the server answers each with a DataSetManyStreamResponse carrying that batch's DataSetManyStreamBatch - its committed count and any per-entry DataEntryRejections - and, once the client half-closes, one final frame carrying the DataSetManyStreamResult totals. The client keeps at most four batches unacknowledged, so neither side holds more than a few batches of the stream. The call is admitted by the transport gate before its first frame, and every key is authorized by the facade as it is written, so a denied key is reported as a rejection rather than failing the stream. A failed call surfaces as an RpcException whose status follows the binding's status mapping.
Seams
| Seam | Default | Purpose |
|---|---|---|
ILatticeDataApiAuthorizer |
DenyAllDataApiAuthorizer |
Coarse transport admission for every data-API RPC, given a LatticeDataApiAuthorizationContext. AllowAllDataApiAuthorizer is the opt-in permissive implementation. |
ILatticeDataApiCredentialBridge |
header-based (internal) | Lifts the caller credential from request metadata onto the ambient Lattice credential. |
ILatticeDataApiActiveTenantBridge |
header-based (internal) | Lifts the caller's asserted active tenant from request metadata onto the ambient active-tenant scope. |
Related
Public declaration reference
The following inventory includes directly declared public members and overloads, enum values, and record positional members. Inherited framework members and compiler-generated record members are not additional package operations. Each source link identifies the declaration that defines its signature.
Orleans.Lattice.Api.Data.Grpc.ILatticeDataApiActiveTenantBridge
Source (line 41).
public interface ILatticeDataApiActiveTenantBridge
TenantId? Resolve(ServerCallContext context)
Orleans.Lattice.Api.Data.Grpc.ILatticeDataApiCredentialBridge
Source (line 37).
public interface ILatticeDataApiCredentialBridge
LatticeCredential? Resolve(ServerCallContext context)
Orleans.Lattice.Api.Data.Grpc.LatticeDataApiGrpcClient
Source (line 21).
public sealed class LatticeDataApiGrpcClient
public static LatticeDataApiGrpcClient Create(CallInvoker callInvoker, IServiceProvider serializerProvider)public Task<DataSetResponse> SetAsync(DataSetRequest request, CancellationToken cancellationToken = default)public Task<DataDeleteResponse> DeleteAsync(DataDeleteRequest request, CancellationToken cancellationToken = default)public Task<DataAtomicResponse> SetManyAtomicAsync(DataAtomicRequest request, CancellationToken cancellationToken = default)public Task<DataCrossTreeResponse> SetManyAtomicCrossTreeAsync(DataCrossTreeRequest request, CancellationToken cancellationToken = default)public Task<DataReadResult> GetAsync(DataGetRequest request, CancellationToken cancellationToken = default)public Task<DataRangePage> ReadRangeAsync(DataRangeRequest request, CancellationToken cancellationToken = default)public Task<DataRangeDeleteResult> DeleteRangeAsync(DataRangeDeleteRequest request, CancellationToken cancellationToken = default)public Task<DataSetManyResponse> SetManyAsync(DataSetManyRequest request, CancellationToken cancellationToken = default)public Task<DataSetManyStreamResult> SetManyStreamAsync(string treeId, IAsyncEnumerable<DataEntry> upserts, IProgress<DataSetManyStreamBatch>? progress = null, DataSetManyStreamOptions? options = null, CancellationToken cancellationToken = default)public Task<CrdtWriteResponse> CrdtWriteAsync(CrdtWriteRequest request, CancellationToken cancellationToken = default)public Task<CrdtReadResponse> CrdtReadAsync(CrdtReadRequest request, CancellationToken cancellationToken = default)public Task<LatticeDataCapabilities> ProbeCapabilitiesAsync(DataProbeRequest request, CancellationToken cancellationToken = default)
Orleans.Lattice.Api.Data.Grpc.LatticeDataApiGrpcOptions
Source (line 7).
public sealed class LatticeDataApiGrpcOptions
public bool RequireAuthorizationpublic string CredentialHeaderNamepublic string CredentialSchemepublic string ActiveTenantHeaderName
Orleans.Lattice.Api.Data.Grpc.LatticeDataApiGrpcServiceCollectionExtensions
Source (line 32).
public static class LatticeDataApiGrpcServiceCollectionExtensions
public static IServiceCollection AddLatticeDataApiGrpc(this IServiceCollection services, Action<LatticeDataApiGrpcOptions>? configure = null)public static IEndpointRouteBuilder MapLatticeDataApiGrpc(this IEndpointRouteBuilder endpoints)
Orleans.Lattice.Api.Data.Grpc.CrdtKind
Source (line 11).
public enum CrdtKind
PnCounter = 0OrSet = 1OrFlag = 2RwFlag = 3VersionVector = 4MvRegister = 5Sequence = 6OrMap = 7GCounter = 8GSet = 9RwSet = 10MaxRegister = 11MinRegister = 12
Orleans.Lattice.Api.Data.Grpc.CrdtMapField
Source (line 14).
public sealed record CrdtMapField
public required string Fieldpublic List<byte[]> Valuespublic bool Equals(CrdtMapField? other)public override int GetHashCode()
Orleans.Lattice.Api.Data.Grpc.CrdtReadRequest
Source (line 12).
public sealed record CrdtReadRequest
public required string TreeIdpublic required string Keypublic required CrdtKind Kind
Orleans.Lattice.Api.Data.Grpc.CrdtReadResponse
Source (line 16).
public sealed record CrdtReadResponse
public long CounterValuepublic bool FlagValuepublic List<byte[]> Elementspublic List<CrdtVectorEntry> Vectorpublic List<CrdtMapField> Mappublic bool Equals(CrdtReadResponse? other)public override int GetHashCode()
Orleans.Lattice.Api.Data.Grpc.CrdtVectorEntry
Source (line 10).
public sealed record CrdtVectorEntry
public required string ReplicaIdpublic required string Clock
Orleans.Lattice.Api.Data.Grpc.CrdtWriteOp
Source (line 10).
public enum CrdtWriteOp
CounterIncrement = 0CounterDecrement = 1SetAdd = 2SetRemove = 3OrFlagEnable = 4OrFlagDisable = 5RwFlagEnable = 6RwFlagDisable = 7VersionVectorTick = 8RegisterSet = 9SequenceInsertAt = 10SequenceRemoveAt = 11MapSet = 12MapRemove = 13GCounterIncrement = 14GSetAdd = 15RwSetAdd = 16RwSetRemove = 17MaxRegisterSet = 18MinRegisterSet = 19
Orleans.Lattice.Api.Data.Grpc.CrdtWriteRequest
Source (line 17).
public sealed record CrdtWriteRequest
public required string TreeIdpublic required string Keypublic required CrdtWriteOp Oppublic string ReplicaIdpublic long Amountpublic byte[] Elementpublic string Fieldpublic int Indexpublic bool Equals(CrdtWriteRequest? other)public override int GetHashCode()
Orleans.Lattice.Api.Data.Grpc.CrdtWriteResponse
Source (line 12).
public sealed record CrdtWriteResponse
Orleans.Lattice.Api.Data.Grpc.DataAtomicRequest
Source (line 17).
public sealed record DataAtomicRequest
public required string TreeIdpublic DataAtomicBatch Batchpublic required string OperationId
Orleans.Lattice.Api.Data.Grpc.DataAtomicResponse
Source (line 12).
public sealed record DataAtomicResponse
Orleans.Lattice.Api.Data.Grpc.DataCrossTreeRequest
Source (line 17).
public sealed record DataCrossTreeRequest
public List<DataTreeBatch> Batchespublic required string OperationId
Orleans.Lattice.Api.Data.Grpc.DataCrossTreeResponse
Source (line 14).
public sealed record DataCrossTreeResponse
public CrossTreeAtomicWriteOutcome Outcome
Orleans.Lattice.Api.Data.Grpc.DataDeleteRequest
Source (line 11).
public sealed record DataDeleteRequest
public required string TreeIdpublic required string Key
Orleans.Lattice.Api.Data.Grpc.DataDeleteResponse
Source (line 12).
public sealed record DataDeleteResponse
public bool Removed
Orleans.Lattice.Api.Data.Grpc.DataGetRequest
Source (line 12).
public sealed record DataGetRequest
public required string TreeIdpublic required string Key
Orleans.Lattice.Api.Data.Grpc.DataProbeRequest
Source (line 12).
public sealed record DataProbeRequest
public required string TreeIdpublic string? Key
Orleans.Lattice.Api.Data.Grpc.DataSetManyRequest
Source (line 16).
public sealed record DataSetManyRequest
public required string TreeIdpublic List<DataEntry> Upserts
Orleans.Lattice.Api.Data.Grpc.DataSetManyResponse
Source (line 12).
public sealed record DataSetManyResponse
Orleans.Lattice.Api.Data.Grpc.DataSetManyStreamRequest
Source (line 15).
public sealed record DataSetManyStreamRequest
public required string TreeIdpublic IReadOnlyList<DataEntry> Upserts
Orleans.Lattice.Api.Data.Grpc.DataSetManyStreamResponse
Source (line 11).
public sealed record DataSetManyStreamResponse
public DataSetManyStreamBatch? Batchpublic DataSetManyStreamResult? Result
Orleans.Lattice.Api.Data.Grpc.DataSetRequest
Source (line 10).
public sealed record DataSetRequest
public required string TreeIdpublic required string Keypublic byte[] Valuepublic bool Equals(DataSetRequest? other)public override int GetHashCode()
Orleans.Lattice.Api.Data.Grpc.DataSetResponse
Source (line 11).
public sealed record DataSetResponse
Orleans.Lattice.Api.Data.Grpc.GrpcDataTypeAliases
Source (line 15).
public static class GrpcDataTypeAliases
public const string DataSetRequestpublic const string DataSetResponsepublic const string DataDeleteRequestpublic const string DataDeleteResponsepublic const string DataAtomicRequestpublic const string DataAtomicResponsepublic const string DataCrossTreeRequestpublic const string DataCrossTreeResponsepublic const string DataGetRequestpublic const string DataSetManyRequestpublic const string DataSetManyResponsepublic const string CrdtKindpublic const string CrdtWriteOppublic const string CrdtWriteRequestpublic const string CrdtWriteResponsepublic const string CrdtReadRequestpublic const string CrdtReadResponsepublic const string CrdtVectorEntrypublic const string CrdtMapFieldpublic const string DataProbeRequestpublic const string DataSetManyStreamRequestpublic const string DataSetManyStreamResponse
Orleans.Lattice.Api.Data.Grpc.ILatticeDataApiAuthorizer
Source (line 17).
public interface ILatticeDataApiAuthorizer
Task<bool> IsAuthorizedAsync(LatticeDataApiAuthorizationContext authorizationContext, CancellationToken cancellationToken)
Orleans.Lattice.Api.Data.Grpc.DenyAllDataApiAuthorizer
Source (line 43).
public sealed class DenyAllDataApiAuthorizer : ILatticeDataApiAuthorizer
public Task<bool> IsAuthorizedAsync(LatticeDataApiAuthorizationContext authorizationContext, CancellationToken cancellationToken)
Orleans.Lattice.Api.Data.Grpc.AllowAllDataApiAuthorizer
Source (line 59).
public sealed class AllowAllDataApiAuthorizer : ILatticeDataApiAuthorizer
public Task<bool> IsAuthorizedAsync(LatticeDataApiAuthorizationContext authorizationContext, CancellationToken cancellationToken)
Orleans.Lattice.Api.Data.Grpc.LatticeDataApiOperation
Source (line 10).
public enum LatticeDataApiOperation
SetPointDeletePointSetManyAtomicSetManyAtomicCrossTreeGetPointReadRangeDeleteRangeUnknownSetManyCrdtWriteCrdtReadProbeCapabilitiesStreamSetMany
Orleans.Lattice.Api.Data.Grpc.LatticeDataApiAuthorizationContext
Source (line 74).
public readonly struct LatticeDataApiAuthorizationContext
public LatticeDataApiAuthorizationContext(ServerCallContext call, LatticeDataApiOperation operation, string? targetTreeId)public ServerCallContext Callpublic LatticeDataApiOperation Operationpublic string? TargetTreeId