~/talk

Evented Ruby vs Node.js

Talkat RailsConf 2012 · 2012-04-23..04-25· [ruby-on-rails, nodejs]
links:none on file
slides:none on file

Claim: you can get Node.js-style concurrency while staying in Ruby by running a reactor and making IO libraries reactor-aware. Add a reactor with EventMachine (or use thin/rainbows), wrap each Rack request in fibers with rack fiber pool, convert blocking adapters with em-synchrony or configure Faraday to use an EM adapter, and use em.defer or EM.popen for stubborn blocking work. Fewer processes and lower memory follow, but library patching and a smaller community are real costs.

AI-written summary · about

  1. 0:00Introduction to performance
  2. 2:51Understanding evented design
  3. 3:53Non-blocking IO explained
  4. 7:50Node.js versus Rails model
  5. 9:43Optimization strategies
  6. 14:19Latency versus concurrency
  7. 16:16Ruby reactor implementation
  8. 18:28Handling blocking IO in Ruby
  9. 21:30Using fibers for concurrency
  10. 25:02Applying fibers to Rails
  11. 28:42Libraries for evented Ruby
  12. 32:55Pros and cons of evented Ruby
  13. 36:22Conclusion and takeaways
~/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.