Friday 2nd November, 2012
11:30am to 12:15pm
Ruby, like Perl before it, has great support for systems programming and interfaces to common system calls. Unfortunately, this doesn't get talked about much in the Ruby community. In an age where alternative runtimes and threads are getting lots of attention many of the largest Rails deployments are running on single-threaded, blocking I/O, preforking web server called Unicorn.
This talk will be a safari tour through the unique features and internals of Unicorn. By strongly following the Unix philosophy of 'doing one thing well' Unicorn has carved out a reputation as a high-performance, dependable choice for Ruby apps.
The Unicorn codebase is the best, most comprehensive example of Unixsystems programming in Ruby that I've come across. You'll see real-worldexamples of fork(2), accept(2), execve(2), and others. I'll walk throughhow Unicorn distributes connections across a shared socket, how it implements deferred signal handling, how it can replace a running instance of itself without losing any connections. Trust me, by the time it's over you'll begin to feel mysteriously compelled to start growing your Unix beard.
Sign in to add slides, notes or videos to this session