SSE, HTTP, Streaming, WebSockets Oh My! (Remote)
session
Thursday, April 30th, 15:00
Modern web apps aren’t request/response anymore, they’re alive. In this session, we’ll explore how BoxLang makes real-time communication not just possible, but surprisingly simple.
We’ll walk through three powerful approaches to real-time UX:
- Server-Sent Events (SSE) for lightweight, one-way streaming
- HTTP response streaming for progressive data delivery
- WebSockets with SocketBox for full duplex, event-driven apps
BoxLang now includes first-class SSE support, allowing you to stream data directly from your server using the built-in SSE() function, complete with async execution, keep-alive handling, and automatic client disconnect detection. You can also consume streaming APIs (like AI providers) using the fluent http() API with real-time chunk processing callbacks.
On the WebSocket side, we’ll introduce SocketBox, a library that integrates directly with the BoxLang/CommandBox HTTP layer to handle connection upgrades and message routing, bringing modern, event-driven communication to the BoxLang ecosystem without complex infrastructure.
This session is a practical, demo-driven introduction where you’ll see:
- Streaming AI responses token-by-token to the browser
- Building live dashboards without polling
- Progressively rendering long-running requests
- Real-time chat and messaging with WebSockets
- Choosing the right tool: SSE vs streaming vs WebSockets
Whether you’re building live dashboards, streaming AI responses, or interactive applications, you’ll leave with a clear understanding of how to implement real-time features in BoxLang today, and when to reach for SSE, HTTP streaming, or WebSockets. No hacks, no polling—just modern, event-driven patterns you can apply immediately.
Learning Objectives
By the end of this session, attendees will be able to:
- Explain the differences between SSE, HTTP streaming, and WebSockets, including when each approach is appropriate
- Implement Server-Sent Events in BoxLang using the SSE() function for real-time, one-way updates
- Consume and process streaming HTTP responses using BoxLang’s fluent http() API and chunk handlers
- Build a basic WebSocket application using SocketBox for bidirectional, event-driven communication
- Choose the right real-time strategy based on application needs, complexity, and scalability considerations
- Apply real-time patterns to common use cases like AI streaming, live dashboards, and interactive apps