rhoconnect 3.0.5 → 3.0.6

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 (73) hide show
  1. data/CHANGELOG.md +7 -1
  2. data/Gemfile.lock +9 -9
  3. data/README.md +4 -4
  4. data/Rakefile +41 -28
  5. data/bench/bench_runner.rb +4 -5
  6. data/bench/benchapp/Gemfile +1 -1
  7. data/bench/benchapp/Gemfile.lock +26 -27
  8. data/bench/benchapp/config.ru +4 -0
  9. data/bench/benchapp/log/passenger.3000.log +1 -0
  10. data/bench/benchapp/log/passenger.9292.log +59 -0
  11. data/bench/benchapp/settings/settings.yml +2 -0
  12. data/bench/benchapp/tmp/pids/passenger.3000.pid.lock +0 -0
  13. data/bench/benchapp/tmp/pids/passenger.9292.pid.lock +0 -0
  14. data/bench/distr_bench/distr_bench +7 -0
  15. data/bench/distr_bench/distr_bench_main +99 -0
  16. data/bench/distr_bench/run_distr_client.sh +12 -0
  17. data/bench/distr_bench/run_test_query_script.sh +50 -0
  18. data/bench/lib/bench/bench_result_processor.rb +90 -0
  19. data/bench/lib/bench/cli.rb +35 -2
  20. data/bench/lib/bench/logging.rb +2 -0
  21. data/bench/lib/bench/runner.rb +4 -2
  22. data/bench/lib/bench/session.rb +3 -1
  23. data/bench/lib/bench/statistics.rb +41 -1
  24. data/bench/lib/bench/timer.rb +7 -0
  25. data/bench/lib/bench/utils.rb +8 -0
  26. data/bench/lib/bench.rb +35 -9
  27. data/bench/lib/testdata/0-data.txt +0 -0
  28. data/bench/lib/testdata/1-data.txt +0 -0
  29. data/bench/lib/testdata/10-data.txt +15 -0
  30. data/bench/lib/testdata/2-data.txt +3 -0
  31. data/bench/lib/testdata/25-data.txt +39 -0
  32. data/bench/lib/testdata/250-data.txt +353 -0
  33. data/bench/lib/testdata/3-data.txt +4 -0
  34. data/bench/lib/testdata/5-data.txt +7 -8
  35. data/bench/lib/testdata/50-data.txt +70 -0
  36. data/bench/lib/testdata/500-data.txt +711 -0
  37. data/bench/prepare_bench +45 -0
  38. data/bench/run_bench.sh +3 -3
  39. data/bench/run_blob_script.sh +1 -1
  40. data/bench/run_cud_script.sh +1 -1
  41. data/bench/run_query_md_script.sh +1 -1
  42. data/bench/run_query_only_script.sh +1 -1
  43. data/bench/run_query_script.sh +1 -1
  44. data/bench/run_test_query_script.sh +30 -0
  45. data/bench/run_test_source_script.sh +21 -0
  46. data/bench/scripts/test_query_script.rb +64 -0
  47. data/bench/scripts/test_source_script.rb +27 -0
  48. data/bin/rhoconnect-benchmark +13 -0
  49. data/doc/client-objc.txt +236 -1
  50. data/doc/client.txt +132 -0
  51. data/doc/extending-rhoconnect-server.txt +79 -0
  52. data/doc/install.txt +1 -1
  53. data/doc/java-plugin.txt +291 -0
  54. data/doc/rest-api.txt +3 -1
  55. data/installer/unix-like/create_texts.rb +73 -16
  56. data/installer/unix-like/pre_install.sh +1 -1
  57. data/installer/unix-like/rho_connect_install_constants.rb +1 -1
  58. data/installer/utils/constants.rb +2 -2
  59. data/installer/utils/nix_install_test.rb +85 -75
  60. data/installer/utils/package_upload/repos.rake +82 -2
  61. data/installer/windows/rhosync.nsi +5 -5
  62. data/lib/rhoconnect/api/application/queue_updates.rb +14 -0
  63. data/lib/rhoconnect/api/source/set_db_doc.rb +3 -1
  64. data/lib/rhoconnect/server.rb +9 -17
  65. data/lib/rhoconnect/version.rb +1 -1
  66. data/rhoconnect.gemspec +1 -1
  67. data/spec/api/admin/get_api_token_spec.rb +6 -0
  68. data/spec/api/source/set_db_doc_spec.rb +13 -0
  69. data/spec/server/server_spec.rb +27 -1
  70. data/tasks/redis.rake +2 -2
  71. metadata +73 -48
  72. data/examples/simple/dump.rdb +0 -0
  73. data/installer/utils/package_upload/repos.rb +0 -83
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- ## 3.0.5 (not released)
1
+ ## 3.0.6 (2011-11-15)
2
+ * #20022889 - support for GET/POST /api/application routes
3
+ * #20609683 - support 'append' parameter in 'set_db_doc' REST API
4
+ * #20910767 - fix for params modification in before filter (#1802,#1804) and fixing incorrect blob create spec
5
+ * #20917129 - adding spec for checking 'Cache-Control:no-cache' and 'Pragma:no-cache' response headers
6
+
7
+ ## 3.0.5 (2011-10-21)
2
8
  * use redis 2.4 by default
3
9
  * #17447481 - auto-renewal of expired C2DM tokens
4
10
  * #19723593 - re-creating Client if clientregister call is made with unknown client id
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rhoconnect (3.0.5)
4
+ rhoconnect (3.0.6)
5
5
  bundler (~> 1.0)
6
6
  json (~> 1.5.0)
7
- rake (= 0.9.2)
7
+ rake (~> 0.9.2)
8
8
  redis (>= 2.2.0)
9
9
  resque (~> 1.19.0)
10
10
  rest-client (~> 1.6.1)
@@ -38,23 +38,23 @@ GEM
38
38
  nokogiri (~> 1.5.0)
39
39
  ruby-hmac
40
40
  formatador (0.2.1)
41
- fpm (0.3.9)
41
+ fpm (0.3.10)
42
42
  json
43
43
  highline (1.6.2)
44
44
  json (1.5.4)
45
- mime-types (1.16)
45
+ mime-types (1.17.1)
46
46
  multi_json (1.0.3)
47
47
  net-scp (1.0.4)
48
48
  net-ssh (>= 1.99.1)
49
49
  net-ssh (2.1.4)
50
50
  nokogiri (1.5.0)
51
- rack (1.3.4)
51
+ rack (1.3.5)
52
52
  rack-protection (1.1.4)
53
53
  rack
54
54
  rack-test (0.6.1)
55
55
  rack (>= 1.0)
56
56
  rake (0.9.2)
57
- rcov (0.9.10)
57
+ rcov (0.9.11)
58
58
  redis (2.2.2)
59
59
  redis-namespace (1.0.3)
60
60
  redis (< 3.0.0)
@@ -76,9 +76,9 @@ GEM
76
76
  ruby-hmac (0.4.0)
77
77
  rubyzip (0.9.4)
78
78
  sinatra (1.3.1)
79
- rack (~> 1.3, >= 1.3.4)
80
- rack-protection (~> 1.1, >= 1.1.2)
81
- tilt (~> 1.3, >= 1.3.3)
79
+ rack (>= 1.3.4, ~> 1.3)
80
+ rack-protection (>= 1.1.2, ~> 1.1)
81
+ tilt (>= 1.3.3, ~> 1.3)
82
82
  sqlite3 (1.3.4)
83
83
  templater (1.0.0)
84
84
  diff-lcs (>= 1.1.2)
data/README.md CHANGED
@@ -4,7 +4,7 @@ RhoConnect is an app integration server which keeps enterprise data current and
4
4
 
5
5
  More Info
6
6
  -------------------------------------------------------------
7
- * Intro to Rhodes & RhoConnect: <http://docs.rhomobile.com>
8
- * RhoConnect: <http://docs.rhomobile.com/rhoconnect/introduction>
9
- * Tutorial: <http://docs.rhomobile.com/rhoconnect/tutorial>
10
- * RDoc (still rough): <http://rdoc.info/projects/rhomobile/rhoconnect>
7
+ * Intro to Rhodes & RhoConnect: <http://docs.rhomobile.com>
8
+ * RhoConnect: <http://docs.rhomobile.com/rhoconnect/introduction>
9
+ * Tutorial: <http://docs.rhomobile.com/rhoconnect/tutorial>
10
+ * RDoc (still rough): <http://rdoc.info/projects/rhomobile/rhoconnect>
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
1
1
  require 'rubygems'
2
2
  load 'tasks/redis.rake'
3
- load 'installer/utils/nix_installation.rake'
4
- load 'installer/utils/package_upload/repos.rake'
5
3
 
6
4
  require 'bundler'
7
5
  Bundler.setup(:default, :development, :test)
6
+ load 'installer/utils/nix_installation.rake'
7
+ load 'installer/utils/package_upload/repos.rake'
8
8
 
9
9
  require 'yaml'
10
10
  $:.unshift File.join(File.dirname(__FILE__),'lib')
@@ -93,7 +93,7 @@ task :archive do
93
93
  end
94
94
 
95
95
  # Debian and RPM package building tasks
96
- def build_pkg(dist, arch, deps)
96
+ def build_pkg(dist, arch, deps, use_bench_tarball=false)
97
97
  start_dir = `pwd`.strip
98
98
  workspace = "#{start_dir}/pkg/workspace"
99
99
  version = Rhoconnect::VERSION
@@ -114,6 +114,9 @@ def build_pkg(dist, arch, deps)
114
114
  system("cp -r installer/unix-like/* #{workspace}/unix-like")
115
115
  system("cp pkg/#{gem_name} #{workspace}")
116
116
 
117
+ # Create bench tarball
118
+ `git archive --format=tar --prefix=bench/ HEAD:bench | gzip > #{workspace}/bench.tar.gz` if use_bench_tarball
119
+
117
120
  # cd into the pkg dir so that fpm will create the package into the pkg dir.
118
121
  Dir.chdir("./pkg")
119
122
 
@@ -136,33 +139,43 @@ def build_pkg(dist, arch, deps)
136
139
  Dir.chdir(start_dir)
137
140
  end #build_pkg
138
141
 
142
+ DEB_DEPS = [
143
+ "wget (>= 1.0)", "make (>= 3.0)", "patch (>= 2.0)",
144
+ "build-essential (>= 0)",
145
+ "zlib1g (>= 1.2.3)", "zlib1g-dev (>= 1.2.3)",
146
+ "libssl0.9.8 (>= 0)", "libssl-dev (>= 0.9.8)",
147
+ "libcurl4-openssl-dev (>= 0)",
148
+ "libreadline5 (>= 0)", "libreadline5-dev (>= 0)",
149
+ # "libreadline6 (>= 0)", "libreadline6-dev (>= 0)",
150
+ "libsqlite3-0 (>= 3.6.22-1)", "libsqlite3-dev (>= 3.6.22-1)"
151
+ ]
152
+
139
153
  desc "Build Debian DEB rhoconnect-#{Rhoconnect::VERSION}_all.deb package into the pkg directory"
140
154
  task "build:deb" => :build do
141
- deps = [
142
- "wget (>= 1.0)", "make (>= 3.0)", "patch (>= 2.0)",
143
- "build-essential (>= 0)",
144
- "zlib1g (>= 1.2.3)", "zlib1g-dev (>= 1.2.3)",
145
- "libssl0.9.8 (>= 0)", "libssl-dev (>= 0.9.8)",
146
- "libcurl4-openssl-dev (>= 0)",
147
- "libreadline5 (>= 0)", "libreadline5-dev (>= 0)",
148
- # "libreadline6 (>= 0)", "libreadline6-dev (>= 0)",
149
- "libsqlite3-0 (>= 3.6.22-1)", "libsqlite3-dev (>= 3.6.22-1)"
150
- ]
151
-
152
- build_pkg "deb", "all", deps
153
- end #build:deb
155
+ build_pkg "deb", "all", DEB_DEPS
156
+ end
157
+
158
+ desc "Build Debian DEB rhoconnect-#{Rhoconnect::VERSION}_all.deb package into the pkg directory"
159
+ task "build:bench:deb" => :build do
160
+ build_pkg "deb", "all", DEB_DEPS, true
161
+ end
162
+
163
+ RPM_DEPS = [
164
+ "wget >= 1.0", "make >= 3.0", "patch >= 2.0",
165
+ "gcc-c++ >= 4.1.2",
166
+ "zlib >= 1.2.3", "zlib-devel >= 1.2.3",
167
+ "curl >= 7.15.5", "curl-devel >= 7.15.5",
168
+ "pcre >= 6.6", "pcre-devel >= 6.6",
169
+ "openssl >= 0.9.8e", "openssl-devel >= 0.9.8e",
170
+ "readline-devel >= 5.1", "readline-devel >= 5.1"
171
+ ]
154
172
 
155
173
  desc "Build Red Hat RPM rhoconnect-#{Rhoconnect::VERSION}.noarch.rpm package into the pkg directory"
156
174
  task "build:rpm" => :build do
157
- deps = [
158
- "wget >= 1.0", "make >= 3.0", "patch >= 2.0",
159
- "gcc-c++ >= 4.1.2",
160
- "zlib >= 1.2.3", "zlib-devel >= 1.2.3",
161
- "curl >= 7.15.5", "curl-devel >= 7.15.5",
162
- "pcre >= 6.6", "pcre-devel >= 6.6",
163
- "openssl >= 0.9.8e", "openssl-devel >= 0.9.8e",
164
- "readline-devel >= 5.1", "readline-devel >= 5.1"
165
- ]
166
-
167
- build_pkg "rpm", "noarch", deps
168
- end #build:rpm
175
+ build_pkg "rpm", "noarch", RPM_DEPS
176
+ end
177
+
178
+ desc "Build Red Hat RPM benchmark rhoconnect-#{Rhoconnect::VERSION}.noarch.rpm package into the pkg directory"
179
+ task "build:bench:rpm" => :build do
180
+ build_pkg "rpm", "noarch", RPM_DEPS, true
181
+ end
@@ -17,10 +17,9 @@ begin
17
17
  puts `bundle update`
18
18
  puts
19
19
 
20
- # Skip the following lines because becnchapp Gemfile uses path to rhoconnect code
21
- # puts "Installing rhoconnect ..."
22
- # puts `rake install`
23
- # puts
20
+ puts "Installing rhoconnect ..."
21
+ puts `rake install`
22
+ puts
24
23
 
25
24
  Dir.chdir "bench/benchapp" #puts Dir.pwd
26
25
  puts "Checking bench application dependencies ..."
@@ -110,4 +109,4 @@ end
110
109
 
111
110
  puts "Script #{$0} is finished at #{Time.now.to_s}"
112
111
  puts ""
113
- # $stdout = orig_stdout #restore stdout
112
+ # $stdout = orig_stdout #restore stdout
@@ -1,6 +1,6 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'rhoconnect', :path => '../../'
3
+ gem 'rhoconnect'
4
4
 
5
5
  # Helps with some of the limitations of green threads, not needed in ruby 1.9.x
6
6
  gem 'SystemTimer', '~> 1.2.3', :platforms => :ruby_18
@@ -1,18 +1,3 @@
1
- PATH
2
- remote: ../../
3
- specs:
4
- rhoconnect (3.0.0)
5
- bundler (~> 1.0)
6
- json (~> 1.5.0)
7
- rake (= 0.9.2)
8
- redis (>= 2.2.0)
9
- resque (~> 1.17.0)
10
- rest-client (~> 1.6.1)
11
- rubyzip (~> 0.9.4)
12
- sinatra (= 1.2.7)
13
- templater (~> 1.0.0)
14
- uuidtools (>= 2.1.1)
15
-
16
1
  GEM
17
2
  remote: http://rubygems.org/
18
3
  specs:
@@ -23,7 +8,7 @@ GEM
23
8
  dbi (0.4.5)
24
9
  deprecated (= 2.0.1)
25
10
  deprecated (2.0.1)
26
- diff-lcs (1.1.2)
11
+ diff-lcs (1.1.3)
27
12
  eventmachine (0.12.10)
28
13
  extlib (0.9.15)
29
14
  highline (1.6.2)
@@ -33,24 +18,37 @@ GEM
33
18
  bouncy-castle-java
34
19
  jruby-rack (1.0.10)
35
20
  json (1.5.4)
36
- json (1.5.4-java)
37
- mime-types (1.16)
38
- rack (1.3.2)
21
+ mime-types (1.17.2)
22
+ multi_json (1.0.3)
23
+ rack (1.3.5)
24
+ rack-protection (1.1.4)
25
+ rack
39
26
  rack-test (0.6.1)
40
27
  rack (>= 1.0)
41
28
  rake (0.9.2)
42
- rcov (0.9.10)
43
- rcov (0.9.10-java)
29
+ rcov (0.9.11)
30
+ rcov (0.9.11-java)
44
31
  redis (2.2.2)
45
32
  redis-namespace (1.0.3)
46
33
  redis (< 3.0.0)
47
- resque (1.17.1)
48
- json (< 1.6, >= 1.4.6)
34
+ resque (1.19.0)
35
+ multi_json (~> 1.0)
49
36
  redis-namespace (~> 1.0.2)
50
37
  sinatra (>= 0.9.2)
51
38
  vegas (~> 0.1.2)
52
39
  rest-client (1.6.7)
53
40
  mime-types (>= 1.16)
41
+ rhoconnect (3.0.6)
42
+ bundler (~> 1.0)
43
+ json (~> 1.5.0)
44
+ rake (= 0.9.2)
45
+ redis (>= 2.2.0)
46
+ resque (~> 1.19.0)
47
+ rest-client (~> 1.6.1)
48
+ rubyzip (~> 0.9.4)
49
+ sinatra (~> 1.3)
50
+ templater (~> 1.0.0)
51
+ uuidtools (>= 2.1.1)
54
52
  rspec (2.6.0)
55
53
  rspec-core (~> 2.6.0)
56
54
  rspec-expectations (~> 2.6.0)
@@ -60,9 +58,10 @@ GEM
60
58
  diff-lcs (~> 1.1.2)
61
59
  rspec-mocks (2.6.0)
62
60
  rubyzip (0.9.4)
63
- sinatra (1.2.7)
64
- rack (~> 1.1)
65
- tilt (< 2.0, >= 1.2.2)
61
+ sinatra (1.3.1)
62
+ rack (>= 1.3.4, ~> 1.3)
63
+ rack-protection (>= 1.1.2, ~> 1.1)
64
+ tilt (>= 1.3.3, ~> 1.3)
66
65
  sqlite3 (1.3.4)
67
66
  templater (1.0.0)
68
67
  diff-lcs (>= 1.1.2)
@@ -98,7 +97,7 @@ DEPENDENCIES
98
97
  jruby-openssl (>= 0.7.4)
99
98
  rack-test (>= 0.5.3)
100
99
  rcov (>= 0.9.8)
101
- rhoconnect!
100
+ rhoconnect
102
101
  rspec (~> 2.6.0)
103
102
  sqlite3 (>= 1.3.3)
104
103
  thin
@@ -24,11 +24,15 @@ Rhoconnect::Server.enable :raise_errors
24
24
  Rhoconnect::Server.set :secret, 'cf8e8a1d3653fcfb2332d8b1af9f6762c3c45ea12144bb5f15cd5618cc8e453b45a02dd304bdd791489dcd1ae35b807e4b4f4e6f7faedb551e76996c0f3c11c6'
25
25
  Rhoconnect::Server.set :root, ROOT_PATH
26
26
  Rhoconnect::Server.use Rack::Static, :urls => ["/data"], :root => Rhoconnect::Server.root
27
+ Rhoconnect::Server.disable :logging
27
28
 
28
29
  # Load our rhoconnect application
29
30
  $:.unshift ROOT_PATH if RUBY_VERSION =~ /1.9/ # FIXME: see PT story #16682771
30
31
  require 'application'
31
32
 
33
+ #STDERR=nil
34
+ #STDOUT=nil
35
+
32
36
  # Setup the url map
33
37
  run Rack::URLMap.new \
34
38
  "/" => Rhoconnect::Server.new,
@@ -0,0 +1 @@
1
+ 2011/10/24 15:33:01 [error] 35864#0: *4 "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", host: "0.0.0.0"
@@ -0,0 +1,59 @@
1
+ 2011/10/24 15:35:37 [error] 35907#0: *4 "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", host: "0.0.0.0"
2
+ 2011/10/24 15:35:43 [error] 35907#0: *5 open() "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/api/admin/login" failed (2: No such file or directory), client: 127.0.0.1, server: _, request: "POST /api/admin/login HTTP/1.1", host: "localhost:9292"
3
+ 2011/10/24 15:36:35 [error] 35907#0: *7 open() "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/console/logout" failed (2: No such file or directory), client: 127.0.0.1, server: _, request: "GET /console/logout HTTP/1.1", host: "localhost:9292", referrer: "http://localhost:9292/console/"
4
+ 2011/10/24 15:36:35 [error] 35907#0: *7 open() "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", host: "localhost:9292"
5
+ 2011/10/24 15:36:41 [error] 35907#0: *7 "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: _, request: "GET / HTTP/1.1", host: "localhost:9292"
6
+ 2011/10/24 15:36:41 [error] 35907#0: *7 open() "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", host: "localhost:9292"
7
+ 2011/10/24 15:38:06 [error] 35949#0: *4 "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/index.html" is not found (2: No such file or directory), client: 127.0.0.1, server: _, request: "HEAD / HTTP/1.1", host: "0.0.0.0"
8
+ 2011/10/24 15:38:11 [error] 35949#0: *5 open() "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/console" failed (2: No such file or directory), client: 127.0.0.1, server: _, request: "GET /console HTTP/1.1", host: "localhost:9292"
9
+ 2011/10/24 15:38:11 [error] 35949#0: *5 open() "/Users/mzverev/Projects/master/rhoconnect/bench/benchapp/public/favicon.ico" failed (2: No such file or directory), client: 127.0.0.1, server: _, request: "GET /favicon.ico HTTP/1.1", host: "localhost:9292"
10
+ [03:39:29 PM 2011-10-24] Rhoconnect Server v3.0.6 started...
11
+ :public is no longer used to avoid overloading Module#public, use :public_folder instead
12
+ from /Library/Ruby/Gems/1.8/gems/resque-1.19.0/lib/resque/server.rb:12
13
+ [ pid=35977 thr=0x10079a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.175 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
14
+ [ pid=35977 thr=0x101d3a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.181 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
15
+ [ pid=35977 thr=0x101ea6000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.184 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
16
+ [ pid=35977 thr=0x101c9e000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.188 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
17
+ [ pid=35977 thr=0x101eda000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.193 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
18
+ [ pid=35977 thr=0x1007ce000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.199 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
19
+ [ pid=35977 thr=0x101c6a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.205 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
20
+ [ pid=35977 thr=0x101b32000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.208 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
21
+ [ pid=35977 thr=0x101e0a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.210 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
22
+ [ pid=35977 thr=0x101f0e000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.212 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
23
+ [ pid=35977 thr=0x101dd6000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.214 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
24
+ [ pid=35977 thr=0x101b66000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.309 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
25
+ [ pid=35977 thr=0x101e3e000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.432 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
26
+ [ pid=35977 thr=0x100766000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.642 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
27
+ [ pid=35977 thr=0x101b9a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.663 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
28
+ [ pid=35977 thr=0x101c36000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:06.694 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
29
+ [ pid=35977 thr=0x101e3e000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:50.370 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
30
+ [ pid=35977 thr=0x101dd6000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:51.333 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
31
+ [ pid=35977 thr=0x101b32000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:51.346 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
32
+ [ pid=35977 thr=0x101b9a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 15:40:51.347 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
33
+ [04:41:27 PM 2011-10-24] Rhoconnect Server v3.0.6 started...
34
+ :public is no longer used to avoid overloading Module#public, use :public_folder instead
35
+ from /Library/Ruby/Gems/1.8/gems/resque-1.19.0/lib/resque/server.rb:12
36
+ [ pid=36271 thr=0x101d3e000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.131 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
37
+ [ pid=36271 thr=0x101c3a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.135 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
38
+ [ pid=36271 thr=0x10079a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.137 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
39
+ [ pid=36271 thr=0x101b6a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.140 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
40
+ [ pid=36271 thr=0x101ace000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.142 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
41
+ [ pid=36271 thr=0x101e0e000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.149 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
42
+ [ pid=36271 thr=0x101cd6000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.151 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
43
+ [ pid=36271 thr=0x101a66000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.153 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
44
+ [ pid=36271 thr=0x101b9e000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.155 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
45
+ [ pid=36271 thr=0x101b02000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.162 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
46
+ [ pid=36271 thr=0x101c06000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.164 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
47
+ [ pid=36271 thr=0x101a32000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.170 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
48
+ [ pid=36271 thr=0x101a9a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.176 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
49
+ [ pid=36271 thr=0x100732000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.179 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
50
+ [ pid=36271 thr=0x1007ce000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.185 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
51
+ [ pid=36271 thr=0x101d72000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.191 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
52
+ [ pid=36271 thr=0x101d0a000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.193 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
53
+ [ pid=36271 thr=0x101da6000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.195 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
54
+ [ pid=36271 thr=0x101dda000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.197 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
55
+ [ pid=36271 thr=0x101b36000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.744 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
56
+ [ pid=36271 thr=0x101ca2000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.777 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
57
+ [ pid=36271 thr=0x101bd2000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:34.833 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
58
+ [ pid=36271 thr=0x100766000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:35.133 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
59
+ [ pid=36271 thr=0x101c6e000 file=ext/nginx/HelperAgent.cpp:921 time=2011-10-24 16:49:35.150 ]: Couldn't forward the HTTP response back to the HTTP client: It seems the user clicked on the 'Stop' button in his browser.
@@ -10,10 +10,12 @@
10
10
  :syncserver: http://localhost:9292/api/application/
11
11
  :licensefile: settings/license.key
12
12
  :redis: localhost:6379
13
+ :log_disabled: true
13
14
  :development:
14
15
  :syncserver: http://localhost:9292/api/application/
15
16
  :licensefile: settings/license.key
16
17
  :redis: localhost:6379
18
+ :log_disabled: true
17
19
  :production:
18
20
  :syncserver: http://localhost:9292/api/application/
19
21
  :licensefile: settings/license.key
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), '..','lib'))
5
+ require 'bench'
6
+
7
+ Bench::DistributedCli.start
@@ -0,0 +1,99 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rubygems'
4
+ $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__),'..','lib'))
5
+ require 'bench'
6
+
7
+ def process_results
8
+ finished_data = Bench.get_server_state("bench_statistics_data")
9
+ finished_data.each do |session,session_data|
10
+ puts "Client data for #{session} : startTime (#{session_data['start_time']}), endTime (#{session_data['end_time']})"
11
+ @total_count += session_data['count'].to_i
12
+ @start_time = session_data['start_time'].to_f unless @start_time > 0.0 and session_data['start_time'].to_f >= @start_time
13
+ @end_time = session_data['end_time'].to_f unless session_data['end_time'].to_f <= @end_time
14
+ if not session_data['times'].nil?
15
+ times_data = session_data['times'].split(',')
16
+ @times_count += times_data.size
17
+ times_data.each do |timevalue|
18
+ @times_sum += timevalue.to_f
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ def average_time
25
+ @times_count > 0 ? @times_sum/@times_count : 0.0
26
+ end
27
+
28
+ def save_results
29
+ return if Bench.result_filename.nil?
30
+
31
+ res_hash = YAML.load_file(Bench.result_filename) if File.exist?(Bench.result_filename)
32
+ res_hash ||= {}
33
+ puts "Overall results are : startTime (#{@start_time.to_s}), endTime (#{@end_time.to_s}), count (#{@total_count.to_s}), payload (#{Bench.datasize}), concurrency (#{Bench.concurrency})"
34
+ res_hash[Bench.concurrency.to_s] = (@end_time > 0.0 and @start_time > 0.0) ? [@total_count/(@end_time - @start_time)] : [0.0]
35
+ res_hash[Bench.concurrency.to_s] << average_time
36
+ File.open(Bench.result_filename, 'w' ) do |file|
37
+ file.write res_hash.to_yaml unless res_hash.empty?
38
+ end
39
+ end
40
+
41
+ # 1) Extract Bench title and key
42
+ sync_key = ARGV[0]
43
+
44
+ # 2) Simulate the payload
45
+ Bench.datasize = ARGV[1].to_i
46
+ @expected = Bench.get_test_data(Bench.datasize)
47
+ Bench.concurrency = ARGV[2].to_i
48
+
49
+ # 3) extract result filename
50
+ Bench.result_filename = ARGV[3] unless ARGV[3].nil?
51
+
52
+ # 4) Extract server name
53
+ server = ARGV[4] unless ARGV[4].nil?
54
+ server ||= 'default'
55
+ if server != 'default'
56
+ Bench.base_url = server
57
+ end
58
+
59
+ # 5) Set up the server
60
+ Bench.admin_login = 'rhoadmin'
61
+ Bench.admin_password = ''
62
+ Bench.get_test_server
63
+ Bench.reset_app
64
+ Bench.user_name = "benchuser"
65
+ Bench.password = "password"
66
+ Bench.set_server_state("test_db_storage:application:#{Bench.user_name}",@expected)
67
+ Bench.reset_refresh_time('MockAdapter')
68
+
69
+ #6) set the sync key
70
+ @start_time = Time.now + 5.0
71
+ Bench.set_server_state(sync_key, @start_time.to_f.to_s)
72
+ puts "Sync Key #{sync_key} is set to #{@start_time} - Please, start the clients now!!!"
73
+
74
+ #7) wait until all distributed clients are finished
75
+ while true
76
+ sleep(1)
77
+ stats_data = Bench.get_server_state("bench_statistics_data")
78
+ if (not stats_data.nil?) and stats_data.size == Bench.concurrency
79
+ break
80
+ end
81
+ puts " Waiting for the clients to finish : #{Bench.concurrency - stats_data.size} out of #{Bench.concurrency}"
82
+ end
83
+
84
+ # 8) Now, save all data to the disk
85
+ begin
86
+ sleep(1)
87
+ @total_count = 0
88
+ @start_time = 0.0
89
+ @end_time = 0.0
90
+ @times_sum = 0.0
91
+ @times_count = 0
92
+ process_results
93
+ save_results
94
+ rescue Exception => e
95
+ puts e
96
+ end
97
+
98
+ #8) Clean-up the db
99
+ Bench.reset_app
@@ -0,0 +1,12 @@
1
+ #! /bin/sh
2
+ test_label=$1
3
+ server=$2
4
+ n_iterations=$3
5
+ payload=$4
6
+
7
+ RACK_ENV=production
8
+ export RACK_ENV
9
+
10
+ sync_key="${test_label}_$payload"
11
+ n_threads=1
12
+ ruby distr_bench start '../scripts/test_query_script.rb' 'rhoadmin' '' $server $sync_key $n_threads $n_iterations $payload
@@ -0,0 +1,50 @@
1
+ #! /bin/sh
2
+
3
+ timestamp_postfix=$(date +%Y_%m_%d_%H%M%S)
4
+ test_label=query_bench_$timestamp_postfix
5
+
6
+ if [ $# -gt 0 ] ; then
7
+ test_label=$1
8
+ fi
9
+ server='default'
10
+ if [ $# -gt 1 ] ; then
11
+ server=$2
12
+ fi
13
+
14
+ clients[0]=ec2-50-17-151-136.compute-1.amazonaws.com
15
+ clients[1]=ec2-107-22-43-25.compute-1.amazonaws.com
16
+ clients[2]=ec2-75-101-174-0.compute-1.amazonaws.com
17
+ clients[3]=ec2-50-16-87-55.compute-1.amazonaws.com
18
+ clients[4]=ec2-107-22-48-222.compute-1.amazonaws.com
19
+ clients[5]=ec2-107-22-61-93.compute-1.amazonaws.com
20
+ clients[6]=ec2-107-22-53-145.compute-1.amazonaws.com
21
+ clients[7]=ec2-50-17-152-123.compute-1.amazonaws.com
22
+ clients[8]=ec2-50-17-155-181.compute-1.amazonaws.com
23
+ clients[9]=ec2-75-101-225-80.compute-1.amazonaws.com
24
+
25
+ n_iterations=100
26
+ current_path=`pwd`
27
+
28
+ # setup the benchmark directory structure
29
+ ruby ../prepare_bench "$test_label" query_bench_$timestamp_postfix "1 2 3 5 10"
30
+
31
+ # simulate variaous number of data records
32
+ for n_clients in 1 2 3 5 10
33
+ do
34
+ for payload in 1 5 10 50 100 250 500
35
+ do
36
+ result_filename=./bench_results/query_bench_$timestamp_postfix/raw_data/query_bench_result.$payload
37
+ sync_key=sync_${timestamp_postfix}
38
+ for (( i = 0 ; i < $n_clients; i++ ))
39
+ do
40
+ ssh -i /tmp/EC2-inst.pem -o "UserKnownHostsFile /dev/null" -o "StrictHostKeyChecking no" ec2-user@${clients[$i]} "cd /opt/rhoconnect/bench/distr_bench; ./run_distr_client.sh $sync_key $server $n_iterations $payload 1>/dev/null" &
41
+ done
42
+
43
+ # start main script
44
+ ruby distr_bench_main ${sync_key}_$payload $payload $n_clients $result_filename $server
45
+ sleep 5
46
+ done
47
+ done
48
+
49
+ # once benchmark is finished - process the results
50
+ ruby ../lib/bench/bench_result_processor.rb ./bench_results/query_bench_$timestamp_postfix/raw_data ./bench_results/query_bench_$timestamp_postfix/images