github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

pkieltyka / raemon

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 44
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (3)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (3)
    • v0.1.2
    • v0.1.1
    • v0.1.0
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

Raemon is a Ruby framework for building UNIX daemons. — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Version bump to 0.1.2 
pkieltyka (author)
Fri Jan 01 13:35:11 -0800 2010
commit  85291a1543b7557e91e90b77738ac41f84a7d327
tree    bd8cbdb6cf55b420a3173d4ca60cfba68630724f
parent  af13a25ee2e07790edd397b16b8d1ea70494e681
raemon /
name age
history
message
file .gitignore Tue Dec 15 13:43:27 -0800 2009 Cosmetic code changes, add also Server sets log... [pkieltyka]
file LICENSE Thu Nov 26 15:09:09 -0800 2009 Raemon v0.1.0 [pkieltyka]
file README Fri Nov 27 08:29:53 -0800 2009 Update README [pkieltyka]
file Rakefile Thu Nov 26 15:09:09 -0800 2009 Raemon v0.1.0 [pkieltyka]
file VERSION Loading commit data...
directory examples/
directory lib/ Fri Jan 01 13:35:11 -0800 2010 Version bump to 0.1.2 [pkieltyka]
README
Raemon
======

Raemon is a Ruby framework for building daemons. It's designed for writing
master/worker pre-forking servers running on UNIX. The library has been
tested on both 1.8.7 and 1.9.1 and carries no dependencies outside of the
Ruby core. More to come.

By: Peter Kieltyka
Copyright (c) 2007-2009 NuLayer Inc. All rights reserved.


Usage
=====

Raemon supports two modes of use: as a lightweight master/worker library
or as a full daemon server.


Lightweight master/worker library
---------------------------------
Simply mixin the Raemon::Worker module into any class and implement the
'start' and 'execute' methods.

start   - called when the worker process is first created
execute - called to begin the execution of the worker

The Raemon::Worker module also provides a 'shutting_down?' helper method
that should be tested between iterations in the worker loop to gracefully
shutdown the worker.

To start the workers use the Raemon::Master class.

See examples/test.rb and examples/beanstalk.rb for how the library works
in this scenario.

Also, you can find an evented Beanstalk example in examples/evented.rb.


Daemon server
-------------
Raemon::Server provides tools that helps build daemon applications
that feel like a Ruby on Rails application. See examples/sampled.


Installation
============
Via gemcutter:
$ gem install raemon

From source:
$ git clone git://github.com/pkieltyka/raemon.git
$ cd raemon && rake build
$ gem install pkg/raemon-X.X.X.gem


TODO
====
1. Test cases
2. Create a UNIX socket connection between the master and workers
3. Setup a heartbeat between the master and the workers
4. Monitor memory usage of the workers in the master and restart/stop
   a worker if its out of whack
5. Write a daemon generator (as examples/sampled)


Thanks
======
Raemon was influenced by the following projects:

servolux   - http://github.com/TwP/servolux
daemon_kit - http://github.com/kennethkalmer/daemon-kit
rails      - http://github.com/rails/rails
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server