Daemon Kit - RubyKaigi 2009
-
Upload
kenneth-kalmer -
Category
Technology
-
view
2.301 -
download
2
description
Transcript of Daemon Kit - RubyKaigi 2009
Facing your daemons
Ruby daemons are a PITA
Tired of brittle daemons ? Tired of running blind ? Tired of setting up monitoring ? Tired of worrying about logging ? Tired of missing pid files ?
daemonkit
http://github.com/kennethkalmer/daemon-kit
Kenneth Kalmer@kennethkalmer
http://opensourcery.co.za
daemonkit ?
Opionated Framework for Ruby daemons Keep things DRY Generators to help make things simple Rake tasks to help keep things simple
Multiple environments
Development Be noisy, break early, break hard
Testing Staging Production
Be quiet, stay alive, recover easily
Don't worry about pid files
Managed for you Infered or explicit files Great for controlling clusters Handles stale pid files
Don't worry about logging
Multiple levels Syslog support Log rotation friendly (HUP)
Don't worry about configuration
Simple YAML config files Ondemand hashes
Environmentaware configuration Defaults and environment specific overrides
Don't worry about monitoring
Generate monit/god configuration files via rake
Don't worry about silent death
Safety nets for threads Hoptoad integration Exception emails Change logging levels with SIGUSR1/SIGUSER2
Generators accelarate
AMQP consumer Nanite agent XMPP bot Cron daemon Ruote remote participants
$ daemon_kit mydaemon i amqp
Easy deployment
Custom capistrano recipe tailored for daemons Awaiting vlad contribution :)
$ daemon_kit mydaemon d capistrano $ ./script/generate deploy_capistrano
Suitable for networking
EventMachine is a dependency AMQP uses EM Scheduler uses EM XMPP to use EM (under construction)
Looking forward
RobustThread support Bundled thread/fibre pool implementation Sys V Init script generation Bleakhouse support Privilege dropping & chroot'ing
Arigato gozaimasu !
http://github.com/kennethkalmer/daemonkit http://kit.rubyforge.org/daemon/rdoc #daemonkit on Freenode
http://opensourcery.co.za @kennethkalmer