PushStream.Core 0.1.0-alpha

This is a prerelease version of PushStream.Core.
There is a newer version of this package available.
See the version list below for details.
dotnet add package PushStream.Core --version 0.1.0-alpha
                    
NuGet\Install-Package PushStream.Core -Version 0.1.0-alpha
                    
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="PushStream.Core" Version="0.1.0-alpha" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="PushStream.Core" Version="0.1.0-alpha" />
                    
Directory.Packages.props
<PackageReference Include="PushStream.Core" />
                    
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 PushStream.Core --version 0.1.0-alpha
                    
#r "nuget: PushStream.Core, 0.1.0-alpha"
                    
#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 PushStream.Core@0.1.0-alpha
                    
#: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=PushStream.Core&version=0.1.0-alpha&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=PushStream.Core&version=0.1.0-alpha&prerelease
                    
Install as a Cake Tool

PushStream

Real-time server push without the complexity.

PushStream is an opinionated abstraction over Server-Sent Events (SSE) that makes implementing real-time server-to-client updates simple, safe, and maintainable.


Why PushStream?

Most real-time features only need one-way communication — the server pushing updates to clients:

  • Task progress notifications
  • Background job status
  • AI/ML processing events
  • Live activity feeds

Yet developers often reach for WebSockets or SignalR, introducing unnecessary complexity for simple push scenarios.

PushStream gives you real-time behavior without real-time complexity.


Quick Start

Server (ASP.NET Core)

// 1. Register PushStream services
builder.Services.AddPushStream();

// 2. Map an SSE endpoint
app.MapEventStream("/events");

// 3. Publish events from anywhere
public class TaskService
{
    private readonly IEventPublisher _publisher;

    public TaskService(IEventPublisher publisher)
    {
        _publisher = publisher;
    }

    public async Task ProcessTaskAsync(string taskId)
    {
        await _publisher.PublishAsync("task.started", new { taskId });
        
        // ... do work ...
        
        await _publisher.PublishAsync("task.progress", new { taskId, percentage = 50 });
        
        // ... complete work ...
        
        await _publisher.PublishAsync("task.completed", new { taskId, result = "Success" });
    }
}

Client (JavaScript/TypeScript)

import { EventClient } from 'pushstream-js';

const client = new EventClient('/events');

client.on('task.started', (data) => {
  console.log(`Task ${data.taskId} started`);
});

client.on('task.progress', (data) => {
  console.log(`Progress: ${data.percentage}%`);
});

client.on('task.completed', (data) => {
  console.log(`Completed: ${data.result}`);
});

client.connect();

That's it. No connection management. No reconnection logic. No heartbeat handling.


Features

Feature Description
Simple API Event-centric design that matches how you think
Auto-reconnect Client handles connection drops gracefully
Heartbeats Built-in keep-alive, no configuration needed
Named Events Predictable domain.action event naming
Type Safety Strongly typed events on the server
Framework Agnostic Core logic works anywhere, adapters for popular frameworks

When to Use PushStream

Use PushStream when:

  • Updates flow only from server to client
  • You need instant feedback for long-running operations
  • You want real-time without managing WebSocket complexity

Don't use PushStream when:

  • You need bi-directional messaging (use SignalR/WebSockets)
  • You're building a chat application with client-to-client messaging
  • You need request-response patterns over the same connection

Documentation

Document Description
Problem Statement Why this project exists
Why SSE? Technical justification for SSE over alternatives
Architecture System design and component overview
Design Decisions Key architectural choices and rationale
API Design Public API reference
Getting Started Step-by-step setup guide
Security & Auth Authentication considerations
Future Roadmap What's coming next

Project Structure

PushStream/
├── src/
│   ├── server/
│   │   ├── AbstractedSse/      # Core library
│   │   └── DemoApi/            # Sample API
│   └── client/
│       └── abstracted-sse-js/  # JavaScript client
├── docs/                       # Documentation
└── README.md

License

MIT


Contributing

Contributions are welcome! Please read the documentation first to understand the design philosophy and non-goals of the project.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on PushStream.Core:

Package Downloads
PushStream.AspNetCore

ASP.NET Core integration for PushStream - a simple, opinionated abstraction over Server-Sent Events (SSE) for real-time server-to-client communication.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 152 1/17/2026
0.1.0-alpha 115 1/3/2026