Dbsp 0.2.0
dotnet add package Dbsp --version 0.2.0
NuGet\Install-Package Dbsp -Version 0.2.0
<PackageReference Include="Dbsp" Version="0.2.0" />
<PackageVersion Include="Dbsp" Version="0.2.0" />
<PackageReference Include="Dbsp" />
paket add Dbsp --version 0.2.0
#r "nuget: Dbsp, 0.2.0"
#:package Dbsp@0.2.0
#addin nuget:?package=Dbsp&version=0.2.0
#tool nuget:?package=Dbsp&version=0.2.0
Dbsp
An incremental stream processing library for .NET, built on the ideas of DBSP: every collection is a Z-set (values with signed weights), every stream carries deltas, and every operator — joins and aggregations included — processes only the changes, never the full state. An update that touches one row costs work proportional to that row, not to the size of your data.
This is an independent .NET implementation, named after the theory. It is not Feldera's DBSP engine and is not affiliated with Feldera.
var builder = new CircuitBuilder(new CircuitOptions { Workers = 4 });
var orders = builder.Input<Order>("orders");
var customers = builder.Input<Customer>("customers");
var revenueDef = orders
.Where(o => o.Amount > 0)
.GroupBy(o => o.CustomerId)
.Join(customers.GroupBy(c => c.Id),
(_, order, customer) => new RegionAmount(customer.Region, order.Amount))
.GroupBy(x => x.Region)
.Sum(x => x.Amount)
.ToOutput();
await using var circuit = builder.Build();
circuit.Start();
var ordersIn = circuit.Handle(orders); // definitions redeem for typed handles
var revenue = circuit.Handle(revenueDef);
await ordersIn.InsertAsync(new Order(101, custId: 1, amount: 60m));
await ordersIn.RemoveAsync(new Order(101, custId: 1, amount: 60m)); // cancelled: retracts downstream
await foreach (var batch in revenue.Changes())
Console.WriteLine(batch); // e.g. {(emea, 40) => +1, (emea, 100) => -1}
The API is a fluent builder over delegates. It borrows LINQ's names where the semantics
match (Select, Where, GroupBy, Distinct) but is deliberately not LINQ: no
expression trees, no IQueryable.
What is in the package
- Joins (inner, left, full, anti),
Distinct,TopK,Count/Sum/Min/Maxand custom aggregates, all incremental and all correct under retraction. - Event time: watermarks, tumbling, hopping and session windows, emit-on-close, and eviction of state that is final.
- Recursive circuits (fixed points) for transitive-closure-style queries.
- Multi-worker execution in one process, and the same exchange across processes over TCP.
- Shared tables: reference data held once per process and joined by many circuits.
- Checkpoints of state together with input offsets, for exactly-once restart; acknowledged outputs and sinks for at-least-once delivery.
- Backpressure from bounded channels throughout,
ILoggerandMeterobservability, and a per-record error policy with a dead-letter output.
Targets net8.0 and net10.0. Its one dependency is
Microsoft.Extensions.Logging.Abstractions.
Related packages
| Package | What it adds |
|---|---|
Dbsp.Storage.Redis |
Operator state and atomic checkpoints in Redis |
Dbsp.Hosting |
Generic Host and dependency-injection integration |
Dbsp.Kafka |
Durable logs, warm standby, sources, sinks and Debezium CDC on Kafka |
The packages are released together: use the same version of each.
Documentation
- Introduction: the whole surface, from a first circuit to running one in production.
- README: concepts, the examples, benchmarks, and the known limitations.
This is a 0.x release: the API may change between minor versions.
| 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 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.Logging.Abstractions (>= 8.0.3)
-
net8.0
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Dbsp:
| Package | Downloads |
|---|---|
|
Dbsp.Hosting
Generic Host and dependency-injection integration for Dbsp: register a circuit definition with AddDbsp, and the host owns its lifecycle — start and checkpoint recovery, draining shutdown, output consumers, fault policy, configuration binding and a health check. |
|
|
Dbsp.Kafka
Kafka-backed durability for Dbsp: the state changelog and shared-table logs on compacted topics, written through one transactional producer per process (group commit, transactional.id fencing) and followed by a warm standby. |
|
|
Dbsp.Storage.Redis
Redis-backed storage provider for Dbsp: operator state in Redis hashes with atomic checkpoints (state + input offsets in one MULTI/EXEC) for exactly-once restart. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0 | 44 | 11/22/2026 |