~/talk

Exploring the Power of Turbo Streams and ActionCable

Talkat RailsConf 2023 · 2023-04-24..04-26· [ruby-on-rails]
slides:none on file

Builds a real-time tic-tac-toe using Turbo Streams and ActionCable, with turbo frames for local updates and HTML-over-the-wire broadcasts. Demonstrates three incremental constraints: require two players, reject a third connection via a customized ActionCable connection, and end the game on unsubscribe to notify the opponent. Shows broadcasting from models and replacing specific DOM targets, wires cookies for player IDs, and runs the demo live so the game works end to end.

AI-written summary · about

  1. 0:00Welcome
  2. 2:27Speaker and talk story
  3. 4:32Turbo Streams vs Action Cable
  4. 6:38WebSockets explained in simple terms
  5. 8:03Action Cable with WebSockets
  6. 9:26Turbo Streams magic
  7. 11:11Tic-Tac-Toe setup
  8. 13:20Adding players
  9. 15:30WebSocket client connection
  10. 17:16Opponent join notification
  11. 19:42Making moves visible
  12. 22:32Opponent UI update
  13. 23:37Two-player limit
  14. 25:04Action Cable connection custom
  15. 27:39Player disconnections
  16. 29:05Game logic channels
  17. 31:15Game end on leave
  18. 33:23Live demo
  19. 35:34Summary
~/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.