Thin

22
thin http://code.macournoyer.com/thin/

description

Slides from a Lightning Talk for the Atlanta Ruby Users Group on Thin, a Ruby web server.

Transcript of Thin

Page 1: Thin

thinhttp://code.macournoyer.com/thin/

Page 2: Thin

what?

Page 3: Thin

replacement for mongrel

Page 4: Thin

Ruby web server

Page 5: Thin

glues three Ruby libraries

Page 6: Thin

mongrel parser

Page 7: Thin

eventmachine

Page 8: Thin

rack

Page 9: Thin

why?

Page 10: Thin
Page 11: Thin

more active development

Page 12: Thin

nicer to use

Page 13: Thin

how?

Page 14: Thin

$ sudo gem install rack

$ sudo gem install thin eventmachine \ --source http://code.macournoyer.com

Page 15: Thin

development

Page 16: Thin

$ cd /to/my/rails/app$ thin start>> Using rails adapter>> Thin web server (v0.8.0 codename Dodgy Dentist)>> Threaded mode OFF>> Maximum connections set to 1024>> Listening on 0.0.0.0:3000, CTRL+C to stop

Page 17: Thin

$ cd /to/my/rails/app$ thin -d start

$ script/console$ script/generate stuff$ tail -f log/development.log

$ thin stop

Page 18: Thin

production

Page 19: Thin

# example config/thin.yml---pid: tmp/pids/thin.pidlog: log/thin.logmax_conns: 1024timeout: 30max_persistent_conns: 512daemonize: trueenvironment: productionchdir: /path/to/your/appservers: 2port: 8000

Page 20: Thin

$ thin -C /path/to/thin.yml start

Page 21: Thin

plays well with cap and god

Page 22: Thin

Resources:salesforceonrails.com/tags/thin