aeden-refinery 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (10) hide show
  1. data/CHANGELOG +1 -0
  2. data/LICENSE +21 -0
  3. data/README.rdoc +50 -0
  4. data/README.textile +50 -0
  5. data/Rakefile +23 -0
  6. data/bin/epub +53 -0
  7. data/bin/monitor +47 -0
  8. data/bin/pubnow +61 -0
  9. data/bin/refinery +53 -0
  10. metadata +64 -0
data/CHANGELOG ADDED
@@ -0,0 +1 @@
1
+ v0.9.0. Initial release.
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2009 Anthony Eden
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,50 @@
1
+ = Refinery
2
+
3
+ Refinery is a distributed processing framework written in the Ruby
4
+ programming language. It is designed to work with Amazon's Web
5
+ Services such as SQS and S3 to distribute image and data processing
6
+ across multiple severs to alleviate the need for heavy-duty data and
7
+ image processing on web application servers.
8
+
9
+ Interprocess messaging is accomplished through a distributed queue system such as Amazon SQS and data storage is accomplished through a distributed data store
10
+ such as Amazon's S3.
11
+
12
+ == Required Libraries
13
+
14
+ * RightScale AWS
15
+ * JSON
16
+ * Moneta
17
+
18
+ == Optional Libraries
19
+
20
+ If you want to run the monitor then you'll need to install Sequel and have SQLite3 installed.
21
+
22
+ If you want to run the stats server to view operational statistics
23
+ about Refinery then you'll need to install Sequel, SQLite3 and Ramaze.
24
+
25
+ == Executing
26
+
27
+ Refinery have several executable scripts that are used to launch the various components:
28
+
29
+ === bin/refinery
30
+
31
+ This command executes the refinery execution server. This is where jobs
32
+ are run.
33
+
34
+ Example: bin/refinery -c config/config.yml
35
+
36
+ === bin/epub
37
+
38
+ This command executes all publishers that fire on a regular basis.
39
+
40
+ Example: bin/epub -c config/config.yml
41
+
42
+ === bin/pubnow
43
+
44
+ This command executes a single publisher once.
45
+
46
+ Example: bin/pubnow -c config/config.yml sample
47
+
48
+ === bin/monitor
49
+
50
+ This command is used to run the monitor system. The monitor system tracks the health of the refinery. The monitor should only be run on a single host.
data/README.textile ADDED
@@ -0,0 +1,50 @@
1
+ h1. Refinery
2
+
3
+ Refinery is a distributed processing framework written in the Ruby
4
+ programming language. It is designed to work with Amazon's Web
5
+ Services such as SQS and S3 to distribute image and data processing
6
+ across multiple severs to alleviate the need for heavy-duty data and
7
+ image processing on web application servers.
8
+
9
+ Interprocess messaging is accomplished through a distributed queue system such as Amazon SQS and data storage is accomplished through a distributed data store
10
+ such as Amazon's S3.
11
+
12
+ h2. Required Libraries
13
+
14
+ * RightScale AWS
15
+ * JSON
16
+ * Moneta
17
+
18
+ h2. Optional Libraries
19
+
20
+ If you want to run the monitor then you'll need to install Sequel and have SQLite3 installed.
21
+
22
+ If you want to run the stats server to view operational statistics
23
+ about Refinery then you'll need to install Sequel, SQLite3 and Ramaze.
24
+
25
+ h2. Executing
26
+
27
+ Refinery have several executable scripts that are used to launch the various components:
28
+
29
+ h3. bin/refinery
30
+
31
+ This command executes the refinery execution server. This is where jobs
32
+ are run.
33
+
34
+ Example: bin/refinery -c config/config.yml
35
+
36
+ h3. bin/epub
37
+
38
+ This command executes all publishers that fire on a regular basis.
39
+
40
+ Example: bin/epub -c config/config.yml
41
+
42
+ h3. bin/pubnow
43
+
44
+ This command executes a single publisher once.
45
+
46
+ Example: bin/pubnow -c config/config.yml sample
47
+
48
+ h3. bin/monitor
49
+
50
+ This command is used to run the monitor system. The monitor system tracks the health of the refinery. The monitor should only be run on a single host.
data/Rakefile ADDED
@@ -0,0 +1,23 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rake/rdoctask'
4
+
5
+ desc 'Default: run tests.'
6
+ task :default => [:test]
7
+
8
+ desc 'Run tests.'
9
+ Rake::TestTask.new(:test) do |t|
10
+ t.libs << 'lib'
11
+ t.pattern = 'test/**/*_test.rb'
12
+ t.verbose = true
13
+ end
14
+
15
+ desc 'Generate documentation.'
16
+ Rake::RDocTask.new(:rdoc) do |rdoc|
17
+ rdoc.rdoc_dir = 'rdoc'
18
+ rdoc.title = 'Refinery'
19
+ rdoc.options << '--line-numbers' << '--inline-source'
20
+ rdoc.rdoc_files.include('README.rdoc')
21
+ rdoc.rdoc_files.include('lib/*.rb')
22
+ rdoc.rdoc_files.include('lib/**/*.rb')
23
+ end
data/bin/epub ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # == Synopsis
4
+ #
5
+ # epub: run the event publisher
6
+ #
7
+ # == Usage
8
+ #
9
+ # epub [OPTION]
10
+ #
11
+ # -h, --help:
12
+ # show help
13
+ #
14
+ # -d, --debug:
15
+ # turn on debug logging
16
+ #
17
+ # -c, --config filename
18
+ # specify a configuration file
19
+ #
20
+ # -p, --publishers directory
21
+ # specify the directory for finding publishers
22
+ #
23
+ # -v, --verbose
24
+ # print info to the standard output
25
+
26
+ require 'getoptlong'
27
+ require 'rdoc/usage'
28
+ require File.dirname(__FILE__) + '/../lib/refinery'
29
+
30
+ options = {}
31
+ opts = GetoptLong.new(
32
+ [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
33
+ [ '--debug', '-d', GetoptLong::NO_ARGUMENT ],
34
+ [ '--config', '-c', GetoptLong::REQUIRED_ARGUMENT],
35
+ [ '--publishers', '-p', GetoptLong::REQUIRED_ARGUMENT],
36
+ [ '--verbose', '-v', GetoptLong::NO_ARGUMENT]
37
+ )
38
+ opts.each do |opt, arg|
39
+ case opt
40
+ when '--help'
41
+ RDoc::usage
42
+ when '--debug'
43
+ options[:debug] = true
44
+ when '--config'
45
+ options[:config] = arg
46
+ when '--publishers'
47
+ options[:publishers] = arg
48
+ when '--verbose'
49
+ options[:verbose] = true
50
+ end
51
+ end
52
+
53
+ Refinery::EventPublisher.new(options).run
data/bin/monitor ADDED
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # == Synopsis
4
+ #
5
+ # monitor: monitor the refinery system
6
+ #
7
+ # == Usage
8
+ #
9
+ # monitor [OPTION]
10
+ #
11
+ # -h, --help:
12
+ # show help
13
+ #
14
+ # -d, --debug:
15
+ # turn on debug logging
16
+ #
17
+ # -c, --config filename
18
+ # specify a configuration file
19
+ #
20
+ # -v, --verbose
21
+ # print info to the standard output
22
+
23
+ require 'getoptlong'
24
+ require 'rdoc/usage'
25
+ require File.dirname(__FILE__) + '/../lib/refinery'
26
+
27
+ options = {}
28
+ opts = GetoptLong.new(
29
+ [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
30
+ [ '--debug', '-d', GetoptLong::NO_ARGUMENT ],
31
+ [ '--config', '-c', GetoptLong::REQUIRED_ARGUMENT],
32
+ [ '--verbose', '-v', GetoptLong::NO_ARGUMENT]
33
+ )
34
+ opts.each do |opt, arg|
35
+ case opt
36
+ when '--help'
37
+ RDoc::usage
38
+ when '--debug'
39
+ options[:debug] = true
40
+ when '--config'
41
+ options[:config] = arg
42
+ when '--verbose'
43
+ options[:verbose] = true
44
+ end
45
+ end
46
+
47
+ Refinery::Monitor.new(options).run
data/bin/pubnow ADDED
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # == Synopsis
4
+ #
5
+ # epub: run the event publisher
6
+ #
7
+ # == Usage
8
+ #
9
+ # pubnow [OPTION] KEY
10
+ #
11
+ # -h, --help:
12
+ # show help
13
+ #
14
+ # -d, --debug:
15
+ # turn on debug logging
16
+ #
17
+ # -c, --config filename
18
+ # specify a configuration file
19
+ #
20
+ # -p, --publishers directory
21
+ # specify the directory for finding publishers
22
+ #
23
+ # -v, --verbose
24
+ # print info to the standard output
25
+ #
26
+ # KEY: the name of the publisher to run. For example
27
+ # to run the sample publisher use 'sample'
28
+
29
+ require 'getoptlong'
30
+ require 'rdoc/usage'
31
+ require File.dirname(__FILE__) + '/../lib/refinery'
32
+
33
+ options = {}
34
+ opts = GetoptLong.new(
35
+ [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
36
+ [ '--debug', '-d', GetoptLong::NO_ARGUMENT ],
37
+ [ '--config', '-c', GetoptLong::REQUIRED_ARGUMENT],
38
+ [ '--publishers', '-p', GetoptLong::REQUIRED_ARGUMENT],
39
+ [ '--verbose', '-v', GetoptLong::NO_ARGUMENT ]
40
+ )
41
+ opts.each do |opt, arg|
42
+ case opt
43
+ when '--help'
44
+ RDoc::usage
45
+ when '--debug'
46
+ options[:debug] = true
47
+ when '--config'
48
+ options[:config] = arg
49
+ when '--publishers'
50
+ options[:publishers] = arg
51
+ when '--verbose'
52
+ options[:verbose] = true
53
+ end
54
+ end
55
+
56
+ if ARGV.length != 1
57
+ puts "Missing key argument (try --help)"
58
+ exit 0
59
+ end
60
+
61
+ Refinery::EventPublisher.new(options).run_once(ARGV.shift)
data/bin/refinery ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # == Synopsis
4
+ #
5
+ # refinery: run the Refinery server
6
+ #
7
+ # == Usage
8
+ #
9
+ # refinery [OPTION]
10
+ #
11
+ # -h, --help:
12
+ # show help
13
+ #
14
+ # -d, --debug:
15
+ # turn on debug logging
16
+ #
17
+ # -c, --config filename
18
+ # specify a configuration file
19
+ #
20
+ # -w, --workers directory
21
+ # specify the directory for finding workers
22
+ #
23
+ # -v, --verbose
24
+ # print info to the standard output
25
+
26
+ require 'getoptlong'
27
+ require 'rdoc/usage'
28
+ require File.dirname(__FILE__) + '/../lib/refinery'
29
+
30
+ options = {}
31
+ opts = GetoptLong.new(
32
+ [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
33
+ [ '--debug', '-d', GetoptLong::NO_ARGUMENT ],
34
+ [ '--config', '-c', GetoptLong::REQUIRED_ARGUMENT],
35
+ [ '--workers', '-w', GetoptLong::REQUIRED_ARGUMENT],
36
+ [ '--verbose', '-v', GetoptLong::NO_ARGUMENT]
37
+ )
38
+ opts.each do |opt, arg|
39
+ case opt
40
+ when '--help'
41
+ RDoc::usage
42
+ when '--debug'
43
+ options[:debug] = true
44
+ when '--config'
45
+ options[:config] = arg
46
+ when '--workers'
47
+ options[:workers] = arg
48
+ when '--verbose'
49
+ options[:verbose] = true
50
+ end
51
+ end
52
+
53
+ Refinery::Server.new(options).run
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: aeden-refinery
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0
5
+ platform: ruby
6
+ authors:
7
+ - Anthony Eden
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-05-16 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: Process data in a distributed fashion.
17
+ email: anthonyeden@gmail.com
18
+ executables:
19
+ - refinery
20
+ - epub
21
+ - pubnow
22
+ - monitor
23
+ extensions: []
24
+
25
+ extra_rdoc_files: []
26
+
27
+ files:
28
+ - logs
29
+ - publishers
30
+ - Rakefile
31
+ - README.rdoc
32
+ - README.textile
33
+ - LICENSE
34
+ - CHANGELOG
35
+ - workers
36
+ has_rdoc: true
37
+ homepage: http://github.com/aeden/refinery
38
+ post_install_message:
39
+ rdoc_options:
40
+ - --title
41
+ - Refinery - Distributed Processing
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - ">="
47
+ - !ruby/object:Gem::Version
48
+ version: "0"
49
+ version:
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: "0"
55
+ version:
56
+ requirements: []
57
+
58
+ rubyforge_project: refinery
59
+ rubygems_version: 1.2.0
60
+ signing_key:
61
+ specification_version: 2
62
+ summary: Refinery processes data in a distributed environment.
63
+ test_files: []
64
+