Dloizides.Jobs.AspNetCore 1.1.3

dotnet add package Dloizides.Jobs.AspNetCore --version 1.1.3
                    
NuGet\Install-Package Dloizides.Jobs.AspNetCore -Version 1.1.3
                    
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="Dloizides.Jobs.AspNetCore" Version="1.1.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Dloizides.Jobs.AspNetCore" Version="1.1.3" />
                    
Directory.Packages.props
<PackageReference Include="Dloizides.Jobs.AspNetCore" />
                    
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 Dloizides.Jobs.AspNetCore --version 1.1.3
                    
#r "nuget: Dloizides.Jobs.AspNetCore, 1.1.3"
                    
#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 Dloizides.Jobs.AspNetCore@1.1.3
                    
#: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=Dloizides.Jobs.AspNetCore&version=1.1.3
                    
Install as a Cake Addin
#tool nuget:?package=Dloizides.Jobs.AspNetCore&version=1.1.3
                    
Install as a Cake Tool

Dloizides.Jobs.AspNetCore

The ASP.NET Core real-time wire for Dloizides.Jobs. Background-job status is durable and pollable out of the box; this package adds opt-in PUSH to the browser. MapJobStatusStream mounts an SSE and/or WebSocket endpoint that subscribes to the job status backplane and streams authoritative JobStatus snapshots to connected clients.

It is a separate package on purpose: the core stays free of Microsoft.AspNetCore so a worker with no HTTP surface can still run jobs. This package adds only a FrameworkReference to Microsoft.AspNetCore.App — SSE and WebSocket are both built on framework primitives, no third-party dependency.

Persist first, push second

Push is never load-bearing. The backplane event is only a hint ("job X changed"); on each event the wire re-reads the durable JobStatus via IJobStatusQuery and pushes that. So a push client and a poll client render identical truth, and a dropped notification or a blipped socket is healed by the next poll or a reconnect-then-snapshot (every connection sends an initial snapshot on open).

Wiring

// 1. A backplane in Dloizides.Jobs core / a transport package, selected by config:
builder.AddDloizidesJobs(jobs =>
{
    jobs.AddJob<IngestJob>();
    jobs.UseEntityFrameworkStore<AppDbContext>();
    jobs.UsePostgresStatusBackplane<AppDbContext>();   // cross-pod fan-out (Dloizides.Jobs.EntityFrameworkCore)
});

// 2. Register the wires (both; config decides which mount):
builder.Services.AddJobStatusStreaming();

var app = builder.Build();
app.UseWebSockets();          // required only if the WebSocket wire is used
app.MapJobStatusStream();     // default path: /jobs/status/stream
// appsettings.json
"Jobs": {
  "Status": {
    "Backplane": "Postgres",   // None (default) | InMemory | Postgres
    "Wire": "Sse"              // Sse (default) | WebSocket | Both
  }
}
  • SSE serves the base path (/jobs/status/stream). One-directional, browser EventSource auto-reconnect, proxy-friendly. Frames: event: <kind>\ndata: <JobStatus json>\n\n, plus : keep-alive heartbeats.
  • WebSocket serves {path}/ws. JSON { kind, status } text frames + app-level heartbeat frames.
  • Both mounts both. A ?job=<name> query narrows a connection to a single job (otherwise all jobs stream).

Each connection subscribes to the pod's backplane, re-queries the store per event in a fresh scope (no DbContext held open for the connection's life), and tolerates a client vanishing mid-stream without faulting the server.

Scale

Backplane Reaches Ceiling
None (poll-only) any N replicas the poll interval — always works
InMemory one process single replica / local dev
Postgres LISTEN/NOTIFY every replica, no new infra tens of pods × thousands of clients

When Postgres fan-out becomes the bottleneck, swap Jobs:Status:Backplane to a broker-backed transport (e.g. Redis) — the wire is unchanged.

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 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. 
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
1.1.3 126 9/22/2026
1.1.2 85 9/22/2026
1.1.1 90 9/22/2026
1.1.0 88 9/22/2026
1.0.0 135 8/14/2026