~/talk

Deep Dive into RxJS WebSocket Subject

Talkat AngularNL 2020 · on Friday, 2020-07-24· [javascript, angular]
slides:none on file

Claims that Angular’s bundled RxJS provides a ready WebSocket wrapper: the WebSocketSubject sits on the browser W3C websocket, emits incoming messages, buffers outgoing messages when the socket is down, and shares one connection across subscribers to the same subject instance. Default serialization uses JSON.stringify/parse but is pluggable. Reconnect is not automatic so reconnection is implemented with RxJS operators like retryWhen + delayWhen + timer; demo uses an Angular service plus a Node.js ws backend with 2s reconnect attempts and a working live table.

AI-written summary · about

  1. 0:00Start
  2. 3:36Background
  3. 6:48Websocket Factory Function
  4. 14:46Error Handling
  5. 17:02Outgoing Messages Lost When the Connection Is Down
  6. 17:53Rxgs Websocket Subject Config
  7. 20:12Websocket Subject Config
  8. 22:43How To Handle the Reconnection
  9. 23:14Implement the Reconnection Capability Using Rfcs
  10. 25:37Vs Code
  11. 26:57Smart Web Socket Client
  12. 30:02Websocket Endpoint
  13. 31:55Connect Method
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.