mrflip-edamame 0.1.1

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 (58) hide show
  1. data/.document +8 -0
  2. data/.gitignore +31 -0
  3. data/LICENSE.textile +21 -0
  4. data/README.textile +178 -0
  5. data/Rakefile +75 -0
  6. data/VERSION +1 -0
  7. data/app/edamame_san/config.ru +4 -0
  8. data/app/edamame_san/config.yml +17 -0
  9. data/app/edamame_san/config/.gitignore +1 -0
  10. data/app/edamame_san/edamame_san.rb +71 -0
  11. data/app/edamame_san/public/favicon.ico +0 -0
  12. data/app/edamame_san/public/images/edamame_logo.icns +0 -0
  13. data/app/edamame_san/public/images/edamame_logo.ico +0 -0
  14. data/app/edamame_san/public/images/edamame_logo.png +0 -0
  15. data/app/edamame_san/public/images/edamame_logo_2.icns +0 -0
  16. data/app/edamame_san/public/javascripts/application.js +8 -0
  17. data/app/edamame_san/public/javascripts/jquery/jquery-ui.js +8694 -0
  18. data/app/edamame_san/public/javascripts/jquery/jquery.js +4376 -0
  19. data/app/edamame_san/public/stylesheets/application.css +32 -0
  20. data/app/edamame_san/public/stylesheets/layout.css +88 -0
  21. data/app/edamame_san/views/layout.haml +13 -0
  22. data/app/edamame_san/views/load.haml +37 -0
  23. data/app/edamame_san/views/root.haml +25 -0
  24. data/bin/edamame-ps +2 -0
  25. data/bin/empty_all.rb +15 -0
  26. data/bin/stats.rb +13 -0
  27. data/bin/sync.rb +15 -0
  28. data/bin/test_run.rb +14 -0
  29. data/edamame.gemspec +110 -0
  30. data/lib/edamame.rb +193 -0
  31. data/lib/edamame/job.rb +134 -0
  32. data/lib/edamame/queue.rb +6 -0
  33. data/lib/edamame/queue/beanstalk.rb +132 -0
  34. data/lib/edamame/rescheduled.rb +89 -0
  35. data/lib/edamame/scheduling.rb +69 -0
  36. data/lib/edamame/store.rb +8 -0
  37. data/lib/edamame/store/base.rb +62 -0
  38. data/lib/edamame/store/tyrant_store.rb +50 -0
  39. data/lib/methods.txt +94 -0
  40. data/spec/edamame_spec.rb +7 -0
  41. data/spec/spec_helper.rb +9 -0
  42. data/utils/god/README-god.textile +54 -0
  43. data/utils/god/beanstalkd_god.rb +34 -0
  44. data/utils/god/edamame.god +30 -0
  45. data/utils/god/god-etc-init-dot-d-example +40 -0
  46. data/utils/god/god_email.rb +45 -0
  47. data/utils/god/god_process.rb +140 -0
  48. data/utils/god/god_site_config.rb +4 -0
  49. data/utils/god/sinatra_god.rb +36 -0
  50. data/utils/god/tyrant_god.rb +67 -0
  51. data/utils/simulation/Add Percent Variation.vi +0 -0
  52. data/utils/simulation/Harmonic Average.vi +0 -0
  53. data/utils/simulation/Rescheduling Simulation.aliases +3 -0
  54. data/utils/simulation/Rescheduling Simulation.lvlps +3 -0
  55. data/utils/simulation/Rescheduling Simulation.lvproj +22 -0
  56. data/utils/simulation/Rescheduling.vi +0 -0
  57. data/utils/simulation/Weighted Average.vi +0 -0
  58. metadata +135 -0
@@ -0,0 +1,4 @@
1
+ require 'yaml'
2
+ SITE_CONFIG_FILE = ENV['HOME']+'/.monkeyshines'
3
+ SITE_CONFIG = YAML.load(File.open(SITE_CONFIG_FILE))
4
+ God.setup_email SITE_CONFIG[:email]
@@ -0,0 +1,36 @@
1
+ class SinatraGod < GodProcess
2
+ SinatraGod::CONFIG_DEFAULTS = {
3
+ :port => 12000,
4
+ :app_dirname => File.dirname(__FILE__)+'/../../app/edamame_san',
5
+ :monitor_group => 'sinatras',
6
+ :server_exe => '/usr/local/bin/shotgun',
7
+ }
8
+ def initialize *args
9
+ super *args
10
+ self.config = SinatraGod::CONFIG_DEFAULTS.compact.merge(self.config)
11
+ end
12
+
13
+ def self.kind
14
+ :sinatra
15
+ end
16
+
17
+ def app_runner
18
+ File.join(config[:app_dirname], config[:app_name] || 'config.ru')
19
+ end
20
+
21
+ def start_command
22
+ [
23
+ config[:server_exe],
24
+ "--server=thin",
25
+ "--port=#{config[:port]}",
26
+ app_runner
27
+ ].flatten.compact.join(" ")
28
+ end
29
+ # w.start = "thin start -C #{file} -o #{number}"
30
+ # w.stop = "thin stop -C #{file} -o #{number}"
31
+ # w.restart = "thin restart -C #{file} -o #{number}"
32
+
33
+ def self.are_you_there_god_its_me_sinatra *args
34
+ create *args
35
+ end
36
+ end
@@ -0,0 +1,67 @@
1
+
2
+ #
3
+ # -host name : specify the host name or the address of the server. By default, every network address is bound.
4
+ # -port num : specify the port number. By default, it is 1978.
5
+ #
6
+ # -thnum num : specify the number of worker threads. By default, it is 8.
7
+ # -tout num : specify the timeout of each session in seconds. By default, no timeout is specified.
8
+ #
9
+ # -log path : output log messages into the file.
10
+ # -ld : log debug messages also.
11
+ # -le : log error messages only.
12
+ # -ulog path : specify the update log directory.
13
+ # -ulim num : specify the limit size of each update log file.
14
+ # -uas : use asynchronous I/O for the update log.
15
+ #
16
+ # -sid num : specify the server ID.
17
+ # -mhost name : specify the host name of the replication master server.
18
+ # -mport num : specify the port number of the replication master server.
19
+ # -rts path : specify the replication time stamp file.
20
+ # -rcc : check consistency of replication.
21
+ #
22
+ # -skel name : specify the name of the skeleton database library.
23
+ # -ext path : specify the script language extension file.
24
+ # -extpc name period : specify the function name and the calling period of a periodic command.
25
+ # -mask expr : specify the names of forbidden commands.
26
+ # -unmask expr : specify the names of allowed commands.
27
+ #
28
+ class TyrantGod < GodProcess
29
+ TyrantGod::CONFIG_DEFAULTS = {
30
+ :listen_on => '0.0.0.0',
31
+ :port => 11200,
32
+ :db_dirname => '/tmp',
33
+ #
34
+ :max_cpu_usage => 50.percent,
35
+ :max_mem_usage => 150.megabytes,
36
+ :monitor_group => 'tyrants',
37
+ :server_exe => '/usr/local/bin/ttserver',
38
+ }
39
+
40
+ def initialize *args
41
+ super *args
42
+ self.config = TyrantGod::CONFIG_DEFAULTS.compact.merge(self.config)
43
+ end
44
+
45
+ def self.kind
46
+ :ttyrant
47
+ end
48
+
49
+ def dbname
50
+ basename = config[:db_name] || (handle+'.tct')
51
+ File.join(config[:db_dirname], basename)
52
+ end
53
+
54
+ def start_command
55
+ [
56
+ config[:server_exe],
57
+ "-host #{config[:listen_on]}",
58
+ "-port #{config[:port]}",
59
+ "-log #{process_log_file}",
60
+ dbname
61
+ ].flatten.compact.join(" ")
62
+ end
63
+
64
+ def self.are_you_there_god_its_me_beanstalkd *args
65
+ create *args
66
+ end
67
+ end
@@ -0,0 +1,3 @@
1
+ [My Computer]
2
+ My Computer = "192.168.69.129"
3
+
@@ -0,0 +1,3 @@
1
+ [ProjectWindow_Data]
2
+ ProjectExplorer.ClassicPosition[String] = "52,33,416,383"
3
+
@@ -0,0 +1,22 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <Project Type="Project" LVVersion="8608001">
3
+ <Item Name="My Computer" Type="My Computer">
4
+ <Property Name="server.app.propertiesEnabled" Type="Bool">true</Property>
5
+ <Property Name="server.control.propertiesEnabled" Type="Bool">true</Property>
6
+ <Property Name="server.tcp.enabled" Type="Bool">false</Property>
7
+ <Property Name="server.tcp.port" Type="Int">0</Property>
8
+ <Property Name="server.tcp.serviceName" Type="Str">My Computer/VI Server</Property>
9
+ <Property Name="server.tcp.serviceName.default" Type="Str">My Computer/VI Server</Property>
10
+ <Property Name="server.vi.callsEnabled" Type="Bool">true</Property>
11
+ <Property Name="server.vi.propertiesEnabled" Type="Bool">true</Property>
12
+ <Property Name="specify.custom.address" Type="Bool">false</Property>
13
+ <Item Name="Rescheduling.vi" Type="VI" URL="../Rescheduling.vi"/>
14
+ <Item Name="Weighted Average.vi" Type="VI" URL="../Weighted Average.vi"/>
15
+ <Item Name="Harmonic Average.vi" Type="VI" URL="../Harmonic Average.vi"/>
16
+ <Item Name="Add Percent Variation.vi" Type="VI" URL="../Add Percent Variation.vi"/>
17
+ <Item Name="Rescheduling with revisit.vi" Type="VI" URL="../Rescheduling with revisit.vi"/>
18
+ <Item Name="Rescheduling with revisit 2.vi" Type="VI" URL="../Rescheduling with revisit 2.vi"/>
19
+ <Item Name="Dependencies" Type="Dependencies"/>
20
+ <Item Name="Build Specifications" Type="Build"/>
21
+ </Item>
22
+ </Project>
Binary file
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mrflip-edamame
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Philip (flip) Kromer
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-08-23 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: rspec
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "0"
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: yard
27
+ type: :development
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: "0"
34
+ version:
35
+ description: Edamame combines the Beanstalk priority queue with a Tokyo Tyrant database and God monitoring to produce a persistent distributed priority job queue system. Like beanstalk, it is fast, lightweight, distributed, priority queuing, reliable scheduling; it adds persistence, named jobs and job querying/enumeration.
36
+ email: flip@infochimps.org
37
+ executables:
38
+ - edamame-ps
39
+ - empty_all.rb
40
+ - stats.rb
41
+ - sync.rb
42
+ - test_run.rb
43
+ extensions: []
44
+
45
+ extra_rdoc_files:
46
+ - LICENSE.textile
47
+ - README.textile
48
+ files:
49
+ - .document
50
+ - .gitignore
51
+ - LICENSE.textile
52
+ - README.textile
53
+ - Rakefile
54
+ - VERSION
55
+ - app/edamame_san/config.ru
56
+ - app/edamame_san/config.yml
57
+ - app/edamame_san/config/.gitignore
58
+ - app/edamame_san/edamame_san.rb
59
+ - app/edamame_san/public/favicon.ico
60
+ - app/edamame_san/public/images/edamame_logo.icns
61
+ - app/edamame_san/public/images/edamame_logo.ico
62
+ - app/edamame_san/public/images/edamame_logo.png
63
+ - app/edamame_san/public/images/edamame_logo_2.icns
64
+ - app/edamame_san/public/javascripts/application.js
65
+ - app/edamame_san/public/javascripts/jquery/jquery-ui.js
66
+ - app/edamame_san/public/javascripts/jquery/jquery.js
67
+ - app/edamame_san/public/stylesheets/application.css
68
+ - app/edamame_san/public/stylesheets/layout.css
69
+ - app/edamame_san/views/layout.haml
70
+ - app/edamame_san/views/load.haml
71
+ - app/edamame_san/views/root.haml
72
+ - bin/edamame-ps
73
+ - bin/empty_all.rb
74
+ - bin/stats.rb
75
+ - bin/sync.rb
76
+ - bin/test_run.rb
77
+ - edamame.gemspec
78
+ - lib/edamame.rb
79
+ - lib/edamame/job.rb
80
+ - lib/edamame/queue.rb
81
+ - lib/edamame/queue/beanstalk.rb
82
+ - lib/edamame/rescheduled.rb
83
+ - lib/edamame/scheduling.rb
84
+ - lib/edamame/store.rb
85
+ - lib/edamame/store/base.rb
86
+ - lib/edamame/store/tyrant_store.rb
87
+ - lib/methods.txt
88
+ - spec/edamame_spec.rb
89
+ - spec/spec_helper.rb
90
+ - utils/god/README-god.textile
91
+ - utils/god/beanstalkd_god.rb
92
+ - utils/god/edamame.god
93
+ - utils/god/god-etc-init-dot-d-example
94
+ - utils/god/god_email.rb
95
+ - utils/god/god_process.rb
96
+ - utils/god/god_site_config.rb
97
+ - utils/god/sinatra_god.rb
98
+ - utils/god/tyrant_god.rb
99
+ - utils/simulation/Add Percent Variation.vi
100
+ - utils/simulation/Harmonic Average.vi
101
+ - utils/simulation/Rescheduling Simulation.aliases
102
+ - utils/simulation/Rescheduling Simulation.lvlps
103
+ - utils/simulation/Rescheduling Simulation.lvproj
104
+ - utils/simulation/Rescheduling.vi
105
+ - utils/simulation/Weighted Average.vi
106
+ has_rdoc: false
107
+ homepage: http://github.com/mrflip/edamame
108
+ licenses:
109
+ post_install_message:
110
+ rdoc_options:
111
+ - --charset=UTF-8
112
+ require_paths:
113
+ - lib
114
+ required_ruby_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: "0"
119
+ version:
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: "0"
125
+ version:
126
+ requirements: []
127
+
128
+ rubyforge_project:
129
+ rubygems_version: 1.3.5
130
+ signing_key:
131
+ specification_version: 3
132
+ summary: Beanstalk + Tokyo Tyrant = Edamame, a fast persistent distributed priority job queue.
133
+ test_files:
134
+ - spec/edamame_spec.rb
135
+ - spec/spec_helper.rb