Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DaemonKit @ RubyKaigi 2009

DaemonKit @ RubyKaigi 2009

My RubyKaigi 2009 lightning talk on daemon-kit

Kenneth Kalmer

July 18, 2009
Tweet

More Decks by Kenneth Kalmer

Other Decks in Technology

Transcript

  1. 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 ?
  2. daemon­kit ?  Opionated Framework for Ruby daemons  Keep

    things DRY  Generators to help make things simple  Rake tasks to help keep things simple
  3. Multiple environments  Development  Be noisy, break early, break

    hard  Testing  Staging  Production  Be quiet, stay alive, recover easily
  4. Don't worry about pid files  Managed for you 

    Infered or explicit files  Great for controlling clusters  Handles stale pid files
  5. Don't worry about configuration  Simple YAML config files 

    On­demand hashes  Environment­aware configuration  Defaults and environment specific overrides
  6. Don't worry about silent death  Safety nets for threads

     Hoptoad integration  Exception emails  Change logging levels with SIGUSR1/SIGUSER2
  7. Generators accelarate  AMQP consumer  Nanite agent  XMPP

    bot  Cron daemon  Ruote remote participants   $ daemon_kit mydaemon ­i amqp
  8. Easy deployment  Custom capistrano recipe tailored for daemons 

    Awaiting vlad contribution :)   $ daemon_kit mydaemon ­d capistrano  $ ./script/generate deploy_capistrano
  9. Suitable for networking  EventMachine is a dependency  AMQP

    uses EM  Scheduler uses EM  XMPP to use EM (under construction)
  10. Looking forward  RobustThread support  Bundled thread/fibre pool implementation

     Sys V Init script generation  Bleakhouse support  Privilege dropping & chroot'ing