Nanite agents now in daemon-kit

Posted by Kenneth Kalmer on April 30, 2009

My recent love affair with AMQP & nanite has been quite a nice boost to daemon-kit. First it got a neat AMQP consumer generator, and today it got a nanite agent generator with sample actor.

Here is how to get going quickly:

$ sudo gem install kennethkalmer-daemon-kit -s http://gems.github.com
$ daemon_kit myagent -i nanite_agent
$ cd myagent
$ ruby ./bin/myagent run

And in another console:

$ nanite-mapper -i
>> request('/sample/echo', 'ping') { |r| puts r.inspect }

You should get a ping message back from the sample actor.

The daemon-kit nanite agent implementation is more than just a replacement for the nanite-agent command line tool. It allows you to build more functionality into your agents as well. In my case I’m combining the cron features of daemon-kit with  the nanite agents to build a multi-purpose power daemon.

Fine print

This generator is still in it’s infancy and will undoubtedly have some changes moving forward, but so far it works just great in my simple tests. I’m publishing this to solicit some feedback from the nanite community in general.

Please follow the nanite README closely to ensure your nanite installation is working correctly. Ezra merged my changes to nanite, so the examples are working out the box again.

Disclaimer: I’m still learning nanite and AMQP, so I’m definitely no authority on either and asking me for help might yield longer than expected replies while I figure stuff out myself!

Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

Comments

  • Tags

    activerecord air amqp analytics audits bash bind capistrano cheat convert couchdb daemon-kit dlz dns elsewhere gentoo gist git hoptoad linux macros mercurial messaging mysql nginx olympics plugins postfix postini powerdns presentations projects quickies rails rake review ruby ruby19 ruote security shoes sitemap ssl svn webby
  • Recent Posts

  • Archives

  • Alltop. Seriously?! I got in?