~/talk

Advanced Eventmachine

Talkat RubyConf 2011 · 2011-09-29..10-01· [ruby, networking]
slides:none on file

Uses EventMachine to parallelize millions of small S3 uploads and reports a measured 6x throughput gain by avoiding synchronous calls; warns that requiring non-evented gems or heavy per-iteration work (example: default AMQP client reading thousands of messages) blocks the reactor and halts processing. Recommends patterns: keep IO in the reactor, use EM.next_tick vs EM.defer to split short vs long work (defer uses a 20-thread pool), use deferrables, queues, channels, EM::Iterator and em-synchrony/fibers to make async code readable.

AI-written summary · about

  1. 0:00Advanced EventMachine intro
  2. 3:06EventMachine at Scalarium
  3. 6:59Event loop explained
  4. 10:10Avoid blocking the loop
  5. 13:19next_tick and defer for concurrency
  6. 15:24Where code runs in EM
  7. 16:09Code with deferrables
  8. 23:12Queues and channels for coordination
  9. 26:28Parallel processing with EM::Iterator
  10. 29:14Callbacks with fibers
  11. 34:12EM with EM::Synchrony
  12. 35:37Goliath web apps
  13. 37:25Key takeaways
  14. 39:08Testing EventMachine applications
  15. 41:56Handling EM exceptions
~/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.