Skip to content
bitzorcas
EN

Concept

Server-Sent Events

Planned SSE support — Server-Sent Events for notification inbox updates and other streaming scenarios.

Last updated

Server-Sent Events (SSE) are not yet implemented in BitzOrcas. SSE is planned as a lightweight alternative to WebSockets for notification streaming and similar one-directional push scenarios.

Planned use cases

ScenarioSSE suitability
Notification inbox updates✅ Ideal — server pushes new notifications
Audit log streaming✅ Good — one-directional log tail
Dashboard metrics✅ Good — periodic metric push
Chat messages⚠️ Possible but SignalR better for bidirectional

Planned endpoint

GET /api/notifications/stream
Accept: text/event-stream
→ {"type": "notification", "data": {...}}
→ {"type": "notification", "data": {...}}
→ {"type": "heartbeat", "data": {}}

ASP.NET Core SSE implementation (planned)

app.MapGet("/api/notifications/stream", async (HttpContext ctx) =>
{
ctx.Response.Headers.ContentType = "text/event-stream";
ctx.Response.Headers.CacheControl = "no-cache";
// Stream notifications to client
await foreach (var notification in notificationStream.ReadAllAsync(ct))
{
await ctx.Response.WriteAsync($"data: {JsonSerializer.Serialize(notification)}\n\n");
await ctx.Response.Body.FlushAsync();
}
});

See also