skynet 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +49 -0
- data/Manifest.txt +84 -6
- data/README.txt +75 -64
- data/app_generators/skynet_install/skynet_install_generator.rb +14 -8
- data/app_generators/skynet_install/templates/migration.rb +1 -24
- data/app_generators/skynet_install/templates/skynet_config.rb +50 -0
- data/app_generators/skynet_install/templates/skynet_initializer.rb +1 -0
- data/app_generators/skynet_install/templates/{skynet_schema.sql → skynet_mysql_schema.sql} +1 -24
- data/bin/skynet +37 -10
- data/bin/skynet_install +5 -5
- data/bin/skynet_tuplespace_server +27 -19
- data/examples/dgrep/README +70 -0
- data/examples/dgrep/config/skynet_config.rb +26 -0
- data/examples/dgrep/data/shakespeare/README +2 -0
- data/examples/dgrep/data/shakespeare/poetry/loverscomplaint +381 -0
- data/examples/dgrep/data/shakespeare/poetry/rapeoflucrece +2199 -0
- data/examples/dgrep/data/shakespeare/poetry/sonnets +2633 -0
- data/examples/dgrep/data/shakespeare/poetry/various +640 -0
- data/examples/dgrep/data/shakespeare/poetry/venusandadonis +1423 -0
- data/examples/dgrep/data/testfile1.txt +1 -0
- data/examples/dgrep/data/testfile2.txt +1 -0
- data/examples/dgrep/data/testfile3.txt +1 -0
- data/examples/dgrep/data/testfile4.txt +1 -0
- data/examples/dgrep/lib/dgrep.rb +59 -0
- data/examples/dgrep/lib/mapreduce_test.rb +32 -0
- data/examples/dgrep/lib/most_common_words.rb +45 -0
- data/examples/dgrep/script/dgrep +75 -0
- data/examples/rails_mysql_example/README +66 -0
- data/examples/rails_mysql_example/Rakefile +10 -0
- data/examples/rails_mysql_example/app/controllers/application.rb +10 -0
- data/examples/rails_mysql_example/app/helpers/application_helper.rb +3 -0
- data/examples/rails_mysql_example/app/models/user.rb +21 -0
- data/examples/rails_mysql_example/app/models/user_favorite.rb +5 -0
- data/examples/rails_mysql_example/app/models/user_mailer.rb +12 -0
- data/examples/rails_mysql_example/app/views/user_mailer/welcome.erb +5 -0
- data/examples/rails_mysql_example/config/boot.rb +109 -0
- data/examples/rails_mysql_example/config/database.yml +42 -0
- data/examples/rails_mysql_example/config/environment.rb +59 -0
- data/examples/rails_mysql_example/config/environments/development.rb +18 -0
- data/examples/rails_mysql_example/config/environments/production.rb +19 -0
- data/examples/rails_mysql_example/config/environments/test.rb +22 -0
- data/examples/rails_mysql_example/config/initializers/inflections.rb +10 -0
- data/examples/rails_mysql_example/config/initializers/mime_types.rb +5 -0
- data/examples/rails_mysql_example/config/initializers/skynet.rb +1 -0
- data/examples/rails_mysql_example/config/routes.rb +35 -0
- data/examples/rails_mysql_example/config/skynet_config.rb +36 -0
- data/examples/rails_mysql_example/db/migrate/001_create_skynet_tables.rb +43 -0
- data/examples/rails_mysql_example/db/migrate/002_create_users.rb +16 -0
- data/examples/rails_mysql_example/db/migrate/003_create_user_favorites.rb +14 -0
- data/examples/rails_mysql_example/db/schema.rb +85 -0
- data/examples/rails_mysql_example/db/skynet_mysql_schema.sql +33 -0
- data/examples/rails_mysql_example/doc/README_FOR_APP +2 -0
- data/examples/rails_mysql_example/lib/tasks/rails_mysql_example.rake +20 -0
- data/examples/rails_mysql_example/public/.htaccess +40 -0
- data/examples/rails_mysql_example/public/404.html +30 -0
- data/examples/rails_mysql_example/public/422.html +30 -0
- data/examples/rails_mysql_example/public/500.html +30 -0
- data/examples/rails_mysql_example/public/dispatch.cgi +10 -0
- data/examples/rails_mysql_example/public/dispatch.fcgi +24 -0
- data/examples/rails_mysql_example/public/dispatch.rb +10 -0
- data/{log/debug.log → examples/rails_mysql_example/public/favicon.ico} +0 -0
- data/examples/rails_mysql_example/public/images/rails.png +0 -0
- data/examples/rails_mysql_example/public/index.html +277 -0
- data/examples/rails_mysql_example/public/javascripts/application.js +2 -0
- data/examples/rails_mysql_example/public/javascripts/controls.js +963 -0
- data/examples/rails_mysql_example/public/javascripts/dragdrop.js +972 -0
- data/examples/rails_mysql_example/public/javascripts/effects.js +1120 -0
- data/examples/rails_mysql_example/public/javascripts/prototype.js +4225 -0
- data/examples/rails_mysql_example/public/robots.txt +5 -0
- data/examples/rails_mysql_example/script/about +3 -0
- data/examples/rails_mysql_example/script/console +3 -0
- data/examples/rails_mysql_example/script/destroy +3 -0
- data/examples/rails_mysql_example/script/generate +3 -0
- data/examples/rails_mysql_example/script/performance/benchmarker +3 -0
- data/examples/rails_mysql_example/script/performance/profiler +3 -0
- data/examples/rails_mysql_example/script/performance/request +3 -0
- data/examples/rails_mysql_example/script/plugin +3 -0
- data/examples/rails_mysql_example/script/process/inspector +3 -0
- data/examples/rails_mysql_example/script/process/reaper +3 -0
- data/examples/rails_mysql_example/script/process/spawner +3 -0
- data/examples/rails_mysql_example/script/runner +3 -0
- data/examples/rails_mysql_example/script/server +3 -0
- data/examples/rails_mysql_example/test/fixtures/user_favorites.yml +9 -0
- data/examples/rails_mysql_example/test/fixtures/users.yml +11 -0
- data/examples/rails_mysql_example/test/test_helper.rb +38 -0
- data/examples/rails_mysql_example/test/unit/user_favorite_test.rb +8 -0
- data/examples/rails_mysql_example/test/unit/user_test.rb +8 -0
- data/extras/README +7 -0
- data/extras/init.d/skynet +87 -0
- data/extras/nagios/check_skynet.sh +121 -0
- data/extras/rails/controllers/skynet_controller.rb +43 -0
- data/extras/rails/views/skynet/index.rhtml +137 -0
- data/lib/skynet.rb +59 -1
- data/lib/skynet/mapreduce_helper.rb +2 -2
- data/lib/skynet/mapreduce_test.rb +32 -1
- data/lib/skynet/message_queue_adapters/mysql.rb +422 -539
- data/lib/skynet/message_queue_adapters/tuple_space.rb +45 -71
- data/lib/skynet/skynet_active_record_extensions.rb +22 -11
- data/lib/skynet/skynet_config.rb +54 -20
- data/lib/skynet/skynet_console.rb +4 -1
- data/lib/skynet/skynet_console_helper.rb +5 -1
- data/lib/skynet/skynet_debugger.rb +58 -4
- data/lib/skynet/skynet_job.rb +61 -24
- data/lib/skynet/skynet_launcher.rb +29 -3
- data/lib/skynet/skynet_logger.rb +11 -1
- data/lib/skynet/skynet_manager.rb +403 -240
- data/lib/skynet/skynet_message.rb +1 -3
- data/lib/skynet/skynet_message_queue.rb +42 -19
- data/lib/skynet/skynet_partitioners.rb +19 -15
- data/lib/skynet/skynet_ruby_extensions.rb +18 -0
- data/lib/skynet/skynet_tuplespace_server.rb +17 -14
- data/lib/skynet/skynet_worker.rb +132 -98
- data/lib/skynet/version.rb +1 -1
- data/script/destroy +0 -0
- data/script/generate +0 -0
- data/script/txt2html +0 -0
- data/test/test_helper.rb +2 -0
- data/test/test_skynet.rb +13 -5
- data/test/test_skynet_manager.rb +24 -9
- data/test/test_skynet_task.rb +1 -1
- data/website/index.html +77 -29
- data/website/index.txt +53 -24
- data/website/stylesheets/screen.css +12 -12
- metadata +156 -66
- data/app_generators/skynet_install/templates/skynet +0 -46
- data/log/skynet.log +0 -29
- data/log/skynet_tuplespace_server.log +0 -7
- data/log/skynet_worker.pid +0 -1
@@ -1,46 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
<% if in_rails -%>
|
4
|
-
# Load your rails app
|
5
|
-
require File.dirname(__FILE__) + '/../config/boot'
|
6
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../config/environment'
|
7
|
-
<% end -%>
|
8
|
-
|
9
|
-
require 'rubygems'
|
10
|
-
require 'skynet'
|
11
|
-
|
12
|
-
Skynet::CONFIG[:LAUNCHER_PATH] = File.expand_path(__FILE__)
|
13
|
-
Skynet::CONFIG[:SKYNET_LOG_FILE] ||= STDERR
|
14
|
-
Skynet::CONFIG[:SKYNET_LOG_LEVEL] ||= Logger::ERROR
|
15
|
-
<% if in_rails -%>
|
16
|
-
Skynet::CONFIG[:SKYNET_PIDS_FILE] ||= File.expand_path("#{RAILS_ROOT}/log/skynet_#{RAILS_ENV}.pid")
|
17
|
-
Skynet::CONFIG[:SKYNET_LOG_FILE] ||= File.expand_path("#{RAILS_ROOT}/log/skynet_#{RAILS_ENV}.log")
|
18
|
-
<% else -%>
|
19
|
-
Skynet::CONFIG[:SKYNET_PIDS_FILE] ||= File.expand_path("../log/skynet.pid")
|
20
|
-
Skynet::CONFIG[:SKYNET_LOG_FILE] ||= File.expand_path("../log/skynet.log")
|
21
|
-
<% end -%>
|
22
|
-
|
23
|
-
<% if mysql -%>
|
24
|
-
# Use the mysql message queue adapter
|
25
|
-
Skynet::CONFIG[:MESSAGE_QUEUE_ADAPTER] = "Skynet::MessageQueueAdapter::Mysql"
|
26
|
-
<% if not in_rails -%>
|
27
|
-
Skynet::CONFIG[:MYSQL_HOST] = "localhost"
|
28
|
-
Skynet::CONFIG[:MYSQL_USERNAME] = "root"
|
29
|
-
Skynet::CONFIG[:MYSQL_PASSWORD] = ""
|
30
|
-
Skynet::CONFIG[:MYSQL_DATABASE] = "skynet"
|
31
|
-
<% end -%>
|
32
|
-
<% end -%>
|
33
|
-
|
34
|
-
begin
|
35
|
-
mq = Skynet::MessageQueue.new
|
36
|
-
rescue Skynet::ConnectionError
|
37
|
-
if Skynet::MessageQueue.adapter == :tuplespace
|
38
|
-
pid = fork do
|
39
|
-
exec("skynet_tuplespace_server start")
|
40
|
-
end
|
41
|
-
sleep Skynet::CONFIG[:TS_SERVER_START_DELAY]
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
|
46
|
-
Skynet.new
|
data/log/skynet.log
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# Logfile created on Sun Dec 16 13:48:06 -0800 2007 by logger.rb/1.5.2.9
|
2
|
-
[ERROR] #38693 2007-12-16 13:48:10.48554 <Skynet> STARTING MANAGER
|
3
|
-
[ERROR] #38693 2007-12-16 13:48:10.89662 <MANAGER> Starting 4 workers. 0 already running.
|
4
|
-
[ERROR] #38693 2007-12-16 13:48:10.89922 <MANAGER> Adding 4 WORKERS. Task Workers: 2, Master Workers: 0 Master & Task Workers: 2
|
5
|
-
[ERROR] #38693 2007-12-16 13:48:10.91940 <MANAGER> Adding Worker #1 PID: 38697 WORKER_TYPE?:task
|
6
|
-
[ERROR] #38693 2007-12-16 13:48:10.104896 <MANAGER> Adding Worker #2 PID: 38698 WORKER_TYPE?:task
|
7
|
-
[ERROR] #38693 2007-12-16 13:48:10.131977 <MANAGER> Adding Worker #3 PID: 38699 WORKER_TYPE?:any
|
8
|
-
[ERROR] #38693 2007-12-16 13:48:10.203838 <MANAGER> Adding Worker #4 PID: 38700 WORKER_TYPE?:any
|
9
|
-
[ERROR] #38693 2007-12-16 13:48:10.214819 <MANAGER> DISTRO [{:any=>2, :task=>2, :master=>0}]
|
10
|
-
[ERROR] #38693 2007-12-16 13:48:10.219610 <MANAGER> Checking started workers, 0 out of 4 after the 1th try...
|
11
|
-
[ERROR] #38697 2007-12-16 13:48:12.279163 <Skynet> STARTING WORKER
|
12
|
-
[ERROR] #38698 2007-12-16 13:48:12.347062 <Skynet> STARTING WORKER
|
13
|
-
[ERROR] #38699 2007-12-16 13:48:12.422812 <Skynet> STARTING WORKER
|
14
|
-
[ERROR] #38700 2007-12-16 13:48:12.422851 <Skynet> STARTING WORKER
|
15
|
-
[ERROR] #38693 2007-12-16 13:48:14.222861 <MANAGER> Checking started workers, 4 out of 4 after the 2th try...
|
16
|
-
[ERROR] #38693 2007-12-16 13:48:14.223069 <MANAGER> FINISHED STARTING ALL 4 WORKERS
|
17
|
-
[ERROR] #38693 2007-12-16 13:48:39.16030 <MANAGER> SHUTTING DOWN 38699 MR:
|
18
|
-
[ERROR] #38693 2007-12-16 13:48:39.16351 <MANAGER> SHUTTING DOWN 38700 MR:
|
19
|
-
[ERROR] #38697 2007-12-16 13:48:39.469756 <WORKER-38697> Exiting...
|
20
|
-
[FATAL] #38697 2007-12-16 13:48:39.474372 <WORKER-38697> WORKER 38697 DYING Skynet::RequestExpiredError Skynet::RequestExpiredError /Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:227:in `ts_command'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:174:in `take'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:78:in `take_worker_status'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:97:in `take_worker_status'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:138:in `notify_worker_stop'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:258:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:170:in `loop'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:170:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:358:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_launcher.rb:6:in `new'/Users/apisoni/geni/dev/skynet/bin/skynet:17
|
21
|
-
[ERROR] #38698 2007-12-16 13:48:39.595163 <WORKER-38698> Exiting...
|
22
|
-
[FATAL] #38698 2007-12-16 13:48:39.602075 <WORKER-38698> WORKER 38698 DYING Skynet::RequestExpiredError Skynet::RequestExpiredError /Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:227:in `ts_command'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:174:in `take'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:78:in `take_worker_status'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:97:in `take_worker_status'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:138:in `notify_worker_stop'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:258:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:170:in `loop'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:170:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:358:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_launcher.rb:6:in `new'/Users/apisoni/geni/dev/skynet/bin/skynet:17
|
23
|
-
[ERROR] #38699 2007-12-16 13:48:39.698919 <WORKER-38699> Exiting...
|
24
|
-
[FATAL] #38699 2007-12-16 13:48:39.701947 <WORKER-38699> WORKER 38699 DYING Skynet::RequestExpiredError Skynet::RequestExpiredError /Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:227:in `ts_command'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:174:in `take'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:78:in `take_worker_status'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:97:in `take_worker_status'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:138:in `notify_worker_stop'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:258:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:170:in `loop'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:170:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:358:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_launcher.rb:6:in `new'/Users/apisoni/geni/dev/skynet/bin/skynet:17
|
25
|
-
[ERROR] #38700 2007-12-16 13:48:39.788697 <WORKER-38700> Exiting...
|
26
|
-
[FATAL] #38700 2007-12-16 13:48:39.792239 <WORKER-38700> WORKER 38700 DYING Skynet::RequestExpiredError Skynet::RequestExpiredError /Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:227:in `ts_command'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:174:in `take'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/message_queue_adapters/tuple_space.rb:78:in `take_worker_status'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:97:in `take_worker_status'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:138:in `notify_worker_stop'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:258:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:170:in `loop'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:170:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_worker.rb:358:in `start'/Users/apisoni/geni/dev/skynet/bin/../lib/skynet/skynet_launcher.rb:6:in `new'/Users/apisoni/geni/dev/skynet/bin/skynet:17
|
27
|
-
[ERROR] #38693 2007-12-16 13:48:54.273721 <MANAGER> Missing worker 38698 from worker queue. Removing and/or killing.
|
28
|
-
[ERROR] #38693 2007-12-16 13:48:54.283175 <MANAGER> Missing worker 38697 from worker queue. Removing and/or killing.
|
29
|
-
[FATAL] #38693 2007-12-16 13:48:55.311967 <MANAGER> Manager Exiting!
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Logfile created on Sun Dec 16 13:44:46 -0800 2007 by logger.rb/1.5.2.9
|
2
|
-
STARTING SKYNET SERVER ON PORT: 7647 Logging to /Users/apisoni/geni/dev/skynet/log/skynet_tuplespace_server.log
|
3
|
-
STARTING SKYNET SERVER ON PORT: 7647 Logging to /Users/apisoni/geni/dev/skynet/log/skynet_tuplespace_server.log
|
4
|
-
Couldn't start Skynet Server #<Errno::EADDRINUSE: Address already in use - bind(2)>
|
5
|
-
Couldn't start Skynet Server #<SystemExit: exit>
|
6
|
-
STARTING SKYNET SERVER ON PORT: 7647 Logging to /Users/apisoni/geni/dev/skynet/log/skynet_tuplespace_server.log
|
7
|
-
Couldn't start Skynet Server #<SystemExit: exit>
|
data/log/skynet_worker.pid
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
38693
|