A painting of me

I like Unicorn because it's Unix. ⇒

   9 October 2009, early morning

Unicorn is an HTTP server written in Ruby. There are certainly no shortage of these. This one is interesting in that it's a serious ass UNIX application: anywhere the server can leverage the operating system it does. This is neat, but it's pretty atypical as modern servers software go -- blocking IO (!!) -- so it basically can't deal with slow clients reasonably. (The developers discuss this upfront, and explain good ways to deal with slow clients.) It's an interesting example of how software is designed to meet a particular goal.

This is a post from my link log: If you click the title of this post you will be taken the web page I am discussing.

Perma-Link  

Comments

  1. What’s wrong with threads?

  2. Nothing. (Well, in Ruby they are apparently poorly implemented.) I think the reason Unicorn uses processes is because they much simpler to work with and debug, not because threads are inherently bad.

  3. GitHub explains why they are using Unicorn.It sounds like being able to kill a process (one worker) rather than kill a process with multiple threads (many workers) is a win. It also sounds like the start up times for servers like Mongrel can be quite long, versus simply forking an existing process.

Don't be shy, you can comment too!

 
Some things to keep in mind: You can style comments using Textile. In particular, *text* will get turned into text and _text_ will get turned into text. You can post a link using the command "linktext":link, so something like "google":http://www.google.com will get turned in to google. I may erase off-topic comments, or edit poorly formatted comments; I do this very rarely.