Server-sent events
Server-Sent Events is a web standard for streaming text-based event updates one way from a server to a client over HTTP.
HTML5 in Action
Server-sent Events is a web API for receiving a stream of event updates from a server over an HTTP connection.
- How it is used
- Uses SSE to deliver server-driven updates to a browser without repeated client requests.
- How deep it goes
- Walks through a chat application's event stream and front-end listeners, while leaving PHP and MySQL instruction aside.
- Examples
- Illustrates SSE with a chat application that distributes messages to online users.
- What you can do after
- Apply it via EventSource and event listeners to receive updates in a browser application.
Designing AI Systems
Server-Sent Events is an HTTP-based mechanism for continuously delivering unidirectional, incrementally generated events from a server to a client.
- How it is used
- Delivers AI-generated tokens progressively to conversational clients over HTTP.
- How deep it goes
- Explains event formatting and a workflow handler, including validation, generator exhaustion, and per-chunk timeouts.
- Examples
- Uses a patient intake assistant that yields tokens and a final session ID.
- What you can do after
- Operate a Python streaming workflow by configuring response mode, yielding chunks, and sending a completion event.
AI Agents in Action, Second Edition
Server-Sent Events is an HTTP-based protocol for streaming event updates from a server to a client over a persistent connection.
- How it is used
- Connects agents and LLM applications to independently hosted MCP servers over HTTP.
- How deep it goes
- Explains deployment choices and configuration examples, but stops short of detailing the SSE protocol internals.
- Examples
- Uses MCP server commands, a localhost SSE URL, deployment diagrams, comparison tables, and transport-switching exercises.
- What you can do after
- Operate/configure MCP servers over SSE and switch an agent from STDIO using a server URL.
Read how AI Agents in Action, Second Edition explains server-sent events →
Go in Practice, Second Edition
Server-sent events are a web mechanism for continuously delivering text-based event updates from a server to a client over HTTP.
- How it is used
- Deploys persistent HTTP connections for lightweight, real-time, server-to-client notifications without polling.
- How deep it goes
- Explains the communication model and demonstrates a Go file-watching service, without developing bidirectional messaging.
- Examples
- Demonstrates a Go website that watches filesystem changes and reports file operations and byte lengths in real time.
- What you can do after
- Build a Go SSE service with fsnotify that streams directory changes to browser clients.
Read how Go in Practice, Second Edition explains server-sent events →
Also covered in
What to know first
- HTTPHTTP is an application-layer protocol that defines request-and-response communication for transferring resource representations and related metadata between networked systems.
- WebSocketWebSocket is a network protocol that enables persistent, bidirectional communication between endpoints over a single connection.
- meanThe mean is a measure of central location equal to the arithmetic average of numerical observations, or the probability-weighted average of a random variable’s possible values.
- tokenA token is a discrete unit of text, such as a word, subword, punctuation mark, or symbol, produced by tokenization and processed by a language model.
Related concepts
- EventSourceuses · EventSource is a browser interface for receiving server-sent events over a persistent HTTP connection.
- WebSocketcontrasts with · WebSocket is a network protocol that enables persistent, bidirectional communication between endpoints over a single connection.
- HTTPuses · HTTP is an application-layer protocol that defines request-and-response communication for transferring resource representations and related metadata between networked systems.
Questions about server-sent events
What is server-sent events?
Server-Sent Events is a web standard for streaming text-based event updates one way from a server to a client over HTTP.
Which Manning books explain server-sent events?
HTML5 in Action, Designing AI Systems, AI Agents in Action, Second Edition and Go in Practice, Second Edition.
What should I know before learning server-sent events?
Manning books that teach server-sent events usually introduce HTTP, WebSocket, mean and token first.
What is the difference between server-sent events and AJAX?
Server-Sent Events is a web standard for streaming text-based event updates one way from a server to a client over HTTP. AJAX is a web development technique for asynchronously exchanging data between a browser and a server and updating page content without a full-page reload.
What is server-sent events also called?
Server-sent events is also called SSE.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



