5. Mongrel1
“Thin is a Ruby web server that glues
together 3 of the best Ruby libraries in
web history:
• the Mongrel parser...”
(Thin homepage)
6. Mongrel1
“Back then I wrote a little Ruby web
server called Ebb that was meant to be
a faster Mongrel.
That code was the starting point for
Node”
(Ryan Dahl, node.js author)
8. Mongrel2
is a web server
•
•
•
application
language
network architecture } agnostic
9. Mongrel2
Language Agnostic
• Focus on HTTP
• Not for a specific language
• Use it with Ruby, Python, C++, PHP, Haskell,
Common Lisp, Perl, .NET, Clojure, Lua ...
37. Mongrel2
Handler
UUID SIZE:ID ID ID, BODY
Push/Pull Pub/Sub
handler
Requests Responses
handler
handler
38. Mongrel2
Handler
• One or many handlers
• Increase/decrease # of handlers while the
server is running, no reload/restart needed
• UUID are used to route messages
39. Mongrel2
Handler
• Communication with handler completely
async
• ØMQ sockets can work over different
transports (tcp, domain sockets...)
• Messages to/from handler built on
netstrings (D. J. Bernstein) are easy to parse
40. Mongrel2
Ruby Handler
• http://github.com/perplexes/m2r
• JRuby or ruby 1.9.2
• Simple handler or Rack enabled
41. Mongrel2
Ruby Handler
• Run any Rack app using mongrel2, now!