• Stars
    star
    538
  • Rank 82,538 (Top 2 %)
  • Language
    Ruby
  • Created almost 16 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Daemon Kit aims to simplify creating Ruby daemons by providing a sound application skeleton (through a generator), task specific generators (jabber bot, etc) and robust environment management code.

Daemon Kit

Code Climate Gem Version Build Status Coverage Status

Description

Daemon Kit aims to simplify creating Ruby daemons by providing a sound application skeleton (through a generator), task specific generators (jabber bot, etc) and robust environment management code.

Using simple built-in generators it is easy to create evented and non-evented daemons that perform a multitude of different tasks.

Supported generators:

  • XMPP bot (evented)
  • AMQP consumer (evented)
  • SQS consumer
  • Nanite agent (requires < 0.3)
  • Cron-style daemon
  • ruote remote participants

Features/Problems

  • Build it
  • Review TODO.txt

Synopsis

  $ daemon-kit -h

Get some help

  $ daemon-kit [/path/to/your/daemon] [options]

The above command generates a skeleton daemon environment for you to adapt.

  $ daemon-kit [/path/to/your/daemon] -i xmpp

Use the 'xmpp' generator instead of the default one.

Generators

Currently five generators exist: default, xmpp, amqp, cron, ruote. Prior to version 0.3 there was a nanite generator too.

The default generator creates a simple daemon with an infinite loop inside that you can adapt.

XMPP Generator

The jabber generator creates a simple daemon that leverages the blather gem to process inbound messages. The daemon will manage the roster and other little tasks, leaving you to provide the hooks for processing messages, presence notifications and subscription request.

Cron Generator

The cron generator creates a simple daemon that leverages the rufus-scheduler gem to create a simple cron-like daemon. Please be aware that this daemon could never be a replacement for the battle-tested cron[http://www.gentoo.org/doc/en/cron-guide.xml] utility shipped standard with most *nix distributions.

AMQP Consumer Generator

The AMQP generator creates a simple daemon that has all the stub code and configuration in place to help you write AMQP consumers quickly and effectively. The generated daemon relies on the presence of the amqp gem.

ruote Remote Participants

The ruote remote participant generator speeds up the development of workflow participants that run outside of the Ruby process that houses the engine. Daemon-kit handles all the communication and delegation logic, allowing you to focus purely on your participant's activities.

Requirements

  • Ruby 1.8.7 or later (developed on REE/1.9.1)
  • eventmachine-0.12.10
  • rspec (for writing/running your specs)

Generator Requirements

Depending on the generator you choose for your daemon, it might require additional gems to run.

The generators are all written using Thor, which is bundled with daemon-kit and not needed for running any of the generators.

Install

Currently recommended to stick to the git repo:

  $ git clone git://github.com/kennethkalmer/daemon-kit.git
  $ rake build
  $ gem install pkg/daemon-kit-X.X.X.gem

Stable versions, when released are available directly from Rubygems:

  $ gem install daemon-kit

Upgrading

When upgrading daemons generated from earlier versions of daemon-kit, it is easier in most cases to re-generate the daemon. Since 0.1.8 the generators use Thor, which allows you to review a diff of each file before deciding to overwrite it.

Further reading

License

(The MIT License)

Copyright (c) 2009 Kenneth Kalmer (Internet Exchange CC, Clear Planet Information Solutions Pty Ltd)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

powerdns-on-rails

Rails frontend for PowerDNS running MySQL or PostgreSQL backends
Ruby
189
star
2

ruote-kit

RESTish wrapper for ruote workflow engine
Ruby
100
star
3

safely

Wrap your Ruby code a loving, error reporting embrace
Ruby
47
star
4

ratpack

Simple HTTP to XMPP/AMQP bridge built on Sinatra
Ruby
46
star
5

ember-cli-nouislider

{{range-slider}} component for ember-cli powered by noUiSlider
HTML
43
star
6

activerecord-tableless-models

DEPRECATED: Please see https://github.com/softace/activerecord-tableless
Ruby
25
star
7

re-frame-semantic-ui-react-github-widget

Using semantic-ui-react with re-frame - sample project
Clojure
21
star
8

bind-dlz-on-rails

Rails interface to completely manage a BIND DLZ installation
Ruby
19
star
9

correlate

An experiment in expressing relationships between CouchRest documents and ActiveRecord models
Ruby
14
star
10

synaptein

synaptein is a Jabber switching daemon for translating from/to other protocols to XMPP
Ruby
10
star
11

ruote-activerecord

ActiveRecord persistence and participant for ruote
Ruby
9
star
12

chef-and-nagios-presentation

Chef & Nagios Presentation
7
star
13

smsinabox

Ruby wrapper & command line tools for the SMS in a Box Service (ZA)
Ruby
7
star
14

ratchet-ember

Experimenting with combining Ratchet & Ember
JavaScript
6
star
15

resque-web-passenger

A sample rack setup to show how to deploy resque-web in its own virtual host
Ruby
5
star
16

ruote-external-workitem

Thin wrapper class for Ruote workitems when used outside of the core engine
5
star
17

ruote-kit-client

Small client library that speaks JSON to ruote-kit and provides you with bpm bliss in return
Ruby
5
star
18

postini

The postini gem is a Ruby interface on top of the Postini SOAP API's (Early Access Program) and forms part of the postini4r project
Ruby
5
star
19

re-frame-semantic-ui-react-github-tabs

Passing around components with reagent and Semantic UI- sample code
Clojure
4
star
20

ruote-rest-rails-client

Extracted from a production app, this is one way to interact with ruote-rest from inside Rails
Ruby
4
star
21

docker-stack

Ruby
4
star
22

profittrailer-setup

Shell
4
star
23

connect.sh

Simple bash script to ease SSH access from a list of hosts
Shell
3
star
24

celluloid-smtp-sample

Simple example of an SMTP server with Celluloid::IO & EventMachine
Ruby
3
star
25

portage-overlay

Some additional comforts for my portage tree
2
star
26

jquery-copyfriendly

Unobtrusive jQuery plugin to place the text of any element in an invisible text field, making sure no unnecessary whitespace is copied with to the clipboard
2
star
27

kennethkalmer.github.com

My github page
2
star
28

mua-proxy

Transparent proxy server between MUA's (Mail User Agents) and POP3 servers
Ruby
2
star
29

dotfiles

My collection of dotfiles
Emacs Lisp
2
star
30

pillow

TODO: one-line summary of your gem
Ruby
2
star
31

lorem-app

Little shoes application leveraging the lorem gem
Ruby
2
star
32

rk-em-blues

Ruby
1
star
33

partyhat

Coming soon
Ruby
1
star
34

gh-profile-ioc

Use Ruby & Javascript together in a simple example of extreme "Inversion of Control"
JavaScript
1
star
35

rubyfuza-2013

Sample code for my Rubyfuza 2013 presentation on reusing your client-side JS on the server with V8/Rhino
Ruby
1
star
36

autotest-growl-remote

autotest-growl for pure network-based growls
Ruby
1
star
37

dockerfiles

Shell
1
star
38

dsl-stats

MWeb ADSL usage reports via Slack webhooks - pet project
Clojure
1
star