~/talk

Using Ractors and Making Ractors Usable

Talkat EuRuKo 2024 · 2024-09-11..09-13· [ruby, concurrency]
slides:none on file

Builds a Ractor-based Rack-compatible web server from a raw TCP GServer-style prototype into a Puma-like design: a receiver Ractor using fibers to buffer slow clients, a worker Ractor pool, and a scheduling handoff that returns responses to the original fiber. Uses async-http to parse into a Rack env but finds async-http is not Ractor-safe because a singleton console holds IO, so logging becomes a logger Ractor via RPC with refinements. Implementation is a few hundred lines and mostly works but hits thread↔Ractor wakeup and freezing/memory bugs that make production use unsafe.

AI-written summary · about

  1. 0:00Why threads are dangerous
  2. 5:26Actors and Ractors ease concurrency
  3. 8:56TCP HTTP server with Ractors
  4. 11:45Rack-compatible server with Ractors
  5. 15:40Ractor-unsafe gems challenges
  6. 20:59Making Ractors production-ready
  7. 23:49Ruby needs better Ractor support
  8. 27:04How to use Ractors and why they matter for Ruby
  9. 29:09Q&A
~/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.