Faye: an Event Driven App
summary
Faye is a Rack-mounted Ruby (and Node.js-compatible) pub/sub server that implements Bayeux-style channels with wildcard routing, automatic reconnection and WebSocket/long-poll fallbacks. Core primitives are Publisher and Deferrable used to push hashes and JSON between channels, connections and the server. Tests use an async-scenario pattern: story methods accept callbacks, method_missing queues steps and resumes on completion. A real project, Terminus (a Capybara driver), uses Faye to remote-control browsers and demonstrably works.
AI-written summary · about
chapters (14)
- 0:00Platinum Sponsor
- 5:37Ruby client
- 5:57Message passing
- 11:13Continuation-passing style
- 13:05Architecture
- 15:09RackAdapter
- 17:02Server
- 21:01Connection
- 24:19Deferrable
- 25:15Cyclic data flow
- 26:35Non-cyclic dependencies
- 33:37Make test actions with callbacks
- 35:02Queue up commands
- 36:50Run command and schedule next
related talks
37mRuby on Rack: The Magic Between Request and Response
43mRails is a Follower
26mRuby off the Rails: Building a distributed system in Ruby
28mEvented Ruby vs Node.js
29mReal Time Rack
30mFunicular: A Browser App Framework Powered by PicoRuby.WASM
16mOne Ruby App to Rule Them All
36mStreaming over the web with modern Ruby
