Repository navigation
Add runnable WebSocket and SSE examples with a live browser client - #118
Merged
Merged
Conversation
Prefer the selected managed libpython for the unpackaged host. The setup-python library otherwise overrides it and breaks bootstrap imports against a different standard library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the same streaming application in Rust, Python, JavaScript and TypeScript, with a browser page that makes messages visible as they arrive.
The page at
/connects to a worker or hibernating cell WebSocket, sends text and binary frames, and logs outgoing messages and incoming echoes with timestamps. A separate SSE panel consumes named progress/done events through EventSource. It closes the finite feed on done, supports restarting and clearing logs, bounds each log to 100 entries, and uses text nodes for message content. The cell's stored message count updates after received echoes and can be refreshed for other clients' writes. Each socket echoes its own messages; this example does not broadcast between connections.All four project configurations serve the same dependency-free browser assets through the native asset pipeline while
/events,/wsand/rooms/*retain application routing. The walkthrough includes explicit handler registration, curl/browser clients, a Node network check, and a smoke runner that restarts each backend and verifies recovered counts. JavaScript and Python CI run their corresponding examples.Validation passed locally:
The guide explains invocation ownership, backpressure, output gates and hibernation. Network connections do not survive process restart, and SSE history/replay remains application-owned. The finite progress feed emits without an artificial UI delay.