Server-Sent Events
SSE is the simplest way to push real-time updates from server to browser. Unlike WebSocket (bidirectional), SSE is one-way: the server pushes, the client listens. It works over plain HTTP, reconnects automatically, and is supported by all modern browsers. When to use SSE over WebSocket:- Live dashboards and feeds
- Notification streams
- Progress updates
- Any scenario where the client only needs to receive data
Events
Creating Events
Connection Manager
PrismSSEManager tracks connected clients and handles broadcasting:
SSE Manager
Middleware Endpoint
The simplest way to expose an SSE endpoint:SSE Middleware
GET /events and receive a text/event-stream response.
Live Dashboard Example
Stock Price Dashboard
Browser Client
Notification Feed
User Notifications via SSE