PulseSharp 0.0.1-alpha
Prefix ReservedSee the version list below for details.
dotnet add package PulseSharp --version 0.0.1-alpha
NuGet\Install-Package PulseSharp -Version 0.0.1-alpha
<PackageReference Include="PulseSharp" Version="0.0.1-alpha" />
<PackageVersion Include="PulseSharp" Version="0.0.1-alpha" />
<PackageReference Include="PulseSharp" />
paket add PulseSharp --version 0.0.1-alpha
#r "nuget: PulseSharp, 0.0.1-alpha"
#:package PulseSharp@0.0.1-alpha
#addin nuget:?package=PulseSharp&version=0.0.1-alpha&prerelease
#tool nuget:?package=PulseSharp&version=0.0.1-alpha&prerelease
<p align="center"> <picture> <source media="(prefers-color-scheme: dark)" srcset="assets/brand/lockup-on-dark.svg"> <img alt="PulseSharp" src="assets/brand/lockup-on-light.svg" height="72"> </picture> </p>
<p align="center"><strong>Lightweight events and jobs for .NET — from the device to the cloud.</strong></p>
Status: preview (
0.0.1-alpha). Events work with the in-memory store. Jobs, SQLite, PostgreSQL and sync are coming (see the roadmap). The API may change before1.0.
What is PulseSharp?
PulseSharp is a small .NET library for durable events and background jobs.
- Events: something happened (
SaleCompleted). PulseSharp saves the event first, then delivers it to every handler, in order, with retries. - Jobs: work to do (
ImportProducts). PulseSharp saves the job, runs it once, and reports progress. Jobs can be retried and cancelled.
It works the same way in a desktop app, a web app, a worker service or a console app, and on the database you already have.
A quick look
dotnet add package PulseSharp --prerelease
public sealed record SaleCompleted(Guid SaleId, decimal Total);
public sealed record SaleStream(Guid SaleId) : StreamName
{
public override string Value()
{
return $"Sale-{SaleId}";
}
}
// Setup: choose a store and add handlers. Every handler has a stable name.
builder.Services.AddPulseSharp(pulse =>
{
pulse.UseInMemory();
pulse.On<SaleCompleted>("print-receipt", async (sale, context, ct) => await PrintReceipt(sale, ct));
pulse.AddHandler<SaleCompleted, UpdateStock>();
});
// Something happened: emit it from anywhere through IPulse
await pulse.Emit(new SaleStream(sale.Id), new SaleCompleted(sale.Id, sale.Total));
// A handler class, created through dependency injection for every event
public sealed class UpdateStock(IStock stock) : IEventHandler<SaleCompleted>
{
public async Task Handle(SaleCompleted sale, EventContext context, CancellationToken ct)
{
await stock.Decrease(sale.SaleId, ct);
}
}
PulseSharp runs as a hosted service, so it works in any app that uses the .NET Generic Host: web apps, worker services, and desktop apps that build a host.
What you get today
- Events of one stream reach each handler in order. Different streams and different handlers are independent.
- A failing handler is retried with a growing delay. After
MaxAttemptsits stream stops for that handler only, and everything else keeps flowing. - Stable names: duplicate handler names or event names stop the app at startup with a clear message.
- Optimistic concurrency with
EmitOptions.ExpectedVersion. - Every event gets a time-ordered, globally unique id (UUIDv7) and records the node that emitted it.
Why PulseSharp?
- Lightweight. The contracts package has no dependencies. You add only the packages you use.
- Any database. In-memory, SQLite and PostgreSQL first. Other stores plug into a small contract.
- Any app. No ASP.NET Core in the core packages. It works with Native AOT.
- Device to cloud. Events are saved on the device and keep working offline. They sync to the server when the device is back online.
- Honest guarantees. Delivery is at-least-once, and every handler sees each stream in order. The docs say exactly what is guaranteed and what is not.
Packages
| Package | What it adds | Status |
|---|---|---|
PulseSharp.Abstractions |
Contracts for handlers and libraries. No dependencies. | Preview |
PulseSharp |
The engine, with an in-memory store built in | Preview |
PulseSharp.Sqlite |
SQLite store, for desktop and mobile apps | Planned (0.3) |
PulseSharp.PostgreSql |
PostgreSQL store, for servers | Planned (0.4) |
PulseSharp.Sync |
Device ↔ cloud sync | Planned (0.5) |
PulseSharp.Monitor |
Optional web UI | Planned (0.6) |
Jobs (IPulse.Enqueue) arrive in 0.2. In this preview, Enqueue throws NotSupportedException.
Learn more
- Vision: why PulseSharp exists and where it is going
- Architecture: concepts, packages and the store contract
- Contributing
License
| 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 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. |
-
net8.0
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.2)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
- PulseSharp.Abstractions (>= 0.0.1-alpha)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on PulseSharp:
| Package | Downloads |
|---|---|
|
PulseSharp.Sqlite
SQLite store for PulseSharp: durable events and jobs for desktop, mobile and small server apps. Depends only on Microsoft.Data.Sqlite. |
|
|
PulseSharp.PostgreSql
PostgreSQL store for PulseSharp: durable events and jobs for servers, with several app instances sharing one database. Depends only on Npgsql. |
|
|
PulseSharp.Sync.Server
The server side of PulseSharp sync: an ASP.NET Core endpoint that receives events from devices and sends them the server's events. |
|
|
PulseSharp.Sync
Device to cloud sync for PulseSharp: the device keeps working offline and sends its events to the server, and receives the server's events, when it is online. No dependencies beyond PulseSharp. |
|
|
PulseSharp.Testing
Test helpers for apps that use PulseSharp: a recording IPulse, ready-made handler contexts, and a test host with the real engine that waits until every handler is done. Works with any test framework. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.8.0-alpha | 99 | 10/31/2026 |
| 0.7.0-alpha | 119 | 10/24/2026 |
| 0.6.0-alpha | 93 | 10/20/2026 |
| 0.5.0-alpha | 88 | 10/15/2026 |
| 0.4.0-alpha | 82 | 10/13/2026 |
| 0.3.0-alpha | 72 | 10/11/2026 |
| 0.2.0-alpha | 71 | 10/11/2026 |
| 0.1.0-alpha | 70 | 10/11/2026 |
| 0.0.1-alpha | 69 | 10/11/2026 |