File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Languages and the fly likes What is God.rb ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "What is God.rb ???" Watch "What is God.rb ???" New topic
Author

What is God.rb ???

Tina Ma
Ranch Hand

Joined: Nov 29, 2007
Posts: 198

What does this script do? This is from the table of contents in your book.

The contents seem so interesting, just the details i will like to know on-hand when developing a rails project !! I want to read this book.


Tina
SCJP 1.4, SCWCD 1.4
Martin Gross
Greenhorn

Joined: Sep 10, 2004
Posts: 11
Taken from an Interview with Tom Preston-Werner (Creator of god) http://www.infoq.com/interviews/preston-werner-powerset-github-ruby:
"God is I call it a process monitoring framework. I like to call it a framework because your configuration files but it's pure Ruby, it's just a Ruby file. And so in this file you can do really advanced things like you can do looping, you can even have variables, you can have abstractions, the way that the config file works it's a lot of block, methods that take blocks and then yields to them. So if you want and have a bunch of functionality that can be the same across a bunch of configuration files you can take that and create a method that contains all of that stuff. And all you do is pass it in a certain block which you then use and applies all of this code that you have written.

And you can reuse that whereas in your traditional systems like monit you don't have looping, you don't have variables, it has a very obtuse syntax that you have to learn specially, and it doesn't have extensibility. Another primary reason that I wrote God is to have an easy way to extend the framework. There is a lot of built in conditions like "Is the process running? Is it using too much memory? Too much CPU? Does it URL respond?" These kinds of things. With God you can write a new condition in Ruby just as easily as a few lines, all you have to do is implement a specific interface.

And when you are done you can just put that into your configuration file if you want. It could be that easy. Or you could refactor it out and include that from elsewhere. But it makes the whole concept of extending the framework so easy, because it's just Ruby and we all know Ruby so why not use that as a configuration file?"
Martin Gross
Greenhorn

Joined: Sep 10, 2004
Posts: 11
God Project Page
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is God.rb ???
 
Similar Threads
agile database techniques
Head First EJB....which edition?
book contents
Jabber server configuration
Taking SCJP in September. Should I go for 1.4 or 1.5?