In The Loop
summary
A practical postmortem of a Ruby trading platform that actually uses the reactor pattern: shows code-level system call costs, file-descriptor behavior and how EventMachine + epoll/kqueue lets one process handle tens of thousands of connections; demonstrates deferral to a thread pool (default ~20) to avoid blocking on a 3s MySQL query or a 20s DNS resolve; cites libaio as the async file IO engine behind nodejs; reports GC pauses of ~50–130ms and a benchmark where eventmachine with pipelining outscores nginx for HTTP throughput.
AI-written summary · about
chapters (33)
- 0:00Start
- 2:42Example app
- 3:07FIX message
- 3:17The kernel
- 3:28User mode
- 4:02Definition
- 5:26open syscall
- 6:22Blocked buffer state
- 6:40Nonblocking I/O
- 8:58Reactor Pattern
- 9:31The Reactor Loop
- 9:56Registered descriptors
- 10:11Multiplexed I/O
- 12:03Event driven 1/0
- 12:13Event handlers/ callbacks
- 14:04Coupling Layers
- 14:26Dispatch Handler
- 15:28Application Handlers
- 16:53Testing
- 17:33Confusing sync and async
- 18:03Defer work to a thread pool
- 18:26Schedule on the reactor thread
- 19:23Tight loops
- 19:41Prefer a tick loop
- 20:07Slow Protocol parsers
- 20:41Name resolution and connects
- 21:21Async resolver
- 22:09Blocking 1/0
- 22:48Ruby wrapper for libeio
- 23:28All libs have to be evented
- 24:22Memory
- 25:34Buffer sizes
- 40:16Wildfire Interactive, Inc. is hiring








