TransportR 0.6.0
dotnet add package TransportR --version 0.6.0
NuGet\Install-Package TransportR -Version 0.6.0
<PackageReference Include="TransportR" Version="0.6.0" />
<PackageVersion Include="TransportR" Version="0.6.0" />
<PackageReference Include="TransportR" />
paket add TransportR --version 0.6.0
#r "nuget: TransportR, 0.6.0"
#:package TransportR@0.6.0
#addin nuget:?package=TransportR&version=0.6.0
#tool nuget:?package=TransportR&version=0.6.0
TransportR
Core library containing interfaces, protocols, and abstractions for the TransportR distributed data transfer solution.
Purpose
This project defines the foundational contracts and the binary protocol, and holds the hub services that need no network stack: the in-memory state store, the bridge and session state machines, the transfer manager and the cleanup services. It references no SignalR or ASP.NET Core package.
Key Interfaces
IBatchSerializer<T>
public interface IBatchSerializer<T>
{
Task SerializeBatchAsync(Stream destination, List<T> batch);
Task<List<T>?> DeserializeBatchAsync(Stream source);
}
The item type is on the interface, not on the call. A per-call generic would claim that every implementation carries every type, which none can and one cannot at all: a serializer built on Apache Arrow carries record batches only, and on a generic contract it could reject anything else only by throwing at the first batch. Typed here, the mismatch is a compile error.
IDataSender<T> / IDataReceiver<T>
public interface IDataSender<T> : IDataClient
{
Task<Send<T>> InitTransferAsync(Guid targetClientId, int? batchSize = null);
Task<List<ClientInfo>> GetReceiversAsync(CancellationToken ct = default);
event Func<Send<T>, Task> OnSendRequested; // a transfer the hub's host opened
}
public interface IDataReceiver<T> : IDataClient
{
event Func<Receive<T>, Task> OnTransferStarted;
}
ITransferManager
// For unit testing hub components
public interface ITransferManager { ... }
Protocols
The chunk types and the protocol flow are described in TransportRArchitecture.md.
Binary Header (v2)
30-byte fixed header using BinaryPrimitives (zero external dependencies). The version byte is 2
(ChunkHeader.CurrentVersion); a reader rejects any other value.
│ Version │ Type │ PayloadLen │ BatchId │ Count │ TransferId │ [Payload] │
│ 1 byte │ 1 b │ 4 bytes │ 4 bytes │ 4 b │ 16 bytes │ variable │
Dependencies
Microsoft.Extensions.Hosting.Abstractions,Microsoft.Extensions.Logging.Abstractions,Microsoft.Extensions.Options- abstractions only
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.12)
- Microsoft.Extensions.Options (>= 10.0.12)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on TransportR:
| Package | Downloads |
|---|---|
|
TransportR.Client.SignalR
TransportR client: streams typed records to another .NET application through a TransportR hub, resuming after network cuts, with opt-in backpressure |
|
|
TransportR.Hub.SignalR
TransportR hub for ASP.NET Core: relays transfers between clients over SignalR and HTTP streaming, without decoding or keeping the data |
|
|
TransportR.Serialization.MessagePack
MessagePack + LZ4 batch serializer for TransportR: any POCO, no schema needed |
|
|
TransportR.Serialization.Arrow
Apache Arrow RecordBatch serializer for TransportR (Arrow IPC, LZ4) |
|
|
TransportR.Serialization.Protobuf
Protobuf-net + Zstd batch serializer for TransportR: annotated contracts, the most compact payload |
GitHub repositories
This package is not used by any popular GitHub repositories.