A page opens one stream per data-live URL
Browse files at this commit9348d6d76fec9a736d2c95f3e82d5d81732acb83Parent: 59f4261- docs
- a page opens one stream per data-live URL
1 changed file +2 -0
- docs/architecture.md +2 -0
docs/architecture.mdmodified+2 -0
| @@ -263,6 +263,8 @@ Pages update without a reload. A write that changes what a page shows calls `Liv | ||
| 263 | 263 | |
| 264 | 264 | The user topics are keyed by user id, and their streams take the viewer from the session, so no URL names another user's inbox. Repo streams follow the same visibility as the repo page (a private repo answers 404 to a viewer who cannot read it). Explore lists public repos only. |
| 265 | 265 | |
| 266 | +A page can hold several streams at once: the repo header (`/{owner}/{repo}/events`) sits above the page's own list, issue, pull or run. `nav.js` opens one EventSource for each distinct `data-live` URL in the page, so each of them updates the page. | |
| 267 | + | |
| 266 | 268 | ### 5.8 Restart resilience |
| 267 | 269 | |
| 268 | 270 | A page survives a server restart without a reload by hand. Every page holds one stream to `GET /-/alive` (no login, no data). The stream sends `retry: 1000` first, and every event stream sent through `events_response` does the same, so the browser reconnects about once a second. When the stream fails, `nav.js` shows a bar ("Server restarting… your page is kept"). When it opens again, the bar goes and the page refreshes once (`refreshLive`). |