~/talk

NeverBlock, trivial non-blocking IO

Talkat RubyConf 2008 · 2008-11-06..11-08· [networking, ruby]
links:none on file
slides:none on file

NeverBlock is a Ruby library that runs ordinary blocking-looking code concurrently by combining fibers with EventMachine, so code stays linear but yields at IO. It requires asynchronous drivers (it ships adapters for MySQL plus and PostgreSQL, hooks into ActiveRecord, Net::HTTP and Thin). Benchmarks show 100 synchronous queries fall from ~10s to ~1s, the author creates ~200,000 fibers vs ~8,000 threads, and one app cuts Thin processes from 16 to 4 for ~75% memory savings.

AI-written summary · about

  1. 0:00Introduction
  2. 1:16What is NeverBlock
  3. 2:40Synchronous execution example
  4. 4:02Thread-based concurrency
  5. 5:28Event-driven callbacks
  6. 10:22Simplifying concurrency
  7. 14:00Fibers core mechanism
  8. 18:38Two-way fiber comms
  9. 21:32Fibers vs threads efficiency
  10. 22:36Fiber-event machine combo
  11. 25:50NeverBlock for Rails
  12. 27:15Request processing visualized
  13. 29:45Production impact
  14. 31:07Features and future
  15. 32:29Q&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.