pauldowman-sqs_accelerator 0.0.1 → 0.0.2
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.
- data/README.markdown +5 -4
- data/bin/sqs-accelerator +11 -0
- data/lib/server.rb +1 -1
- data/sqs_accelerator.gemspec +5 -3
- data/sqs_accelerator.ru +1 -1
- metadata +15 -14
data/README.markdown
CHANGED
@@ -43,8 +43,8 @@ A: Not yet, it's just a theory so far, my next priority is to benchmark this and
|
|
43
43
|
Usage instructions
|
44
44
|
------------------
|
45
45
|
|
46
|
-
*
|
47
|
-
*
|
46
|
+
* sudo gem install pauldowman-sqs_accelerator
|
47
|
+
* run the executable "sqs-accelerator"
|
48
48
|
* Hit [http://localhost:9292/](http://localhost:9292/) in a browser
|
49
49
|
* Make an HTTP GET request to /queues to list all queues
|
50
50
|
* Make an HTTP POST request to /queues with queue_name=newqueue to create a queue named newqueue
|
@@ -69,12 +69,13 @@ Still to do
|
|
69
69
|
|
70
70
|
* Find all the TODO comments in the code
|
71
71
|
* Benchmarking
|
72
|
-
* A command to start and stop the daemon, maybe a [god](http://god.rubyforge.org/) config file
|
73
72
|
* Use SSL when connecting to SQS to protect message content (AWS credentials are never sent, they're just used to sign the message)
|
74
73
|
* Unit tests (I'm just trying to figure out if this idea even works first)
|
75
74
|
* Create a Ruby client library
|
76
75
|
* Switch all actions to use evented HTTP client instead of EM.defer. Right now some actions are using EM.defer to use the RightAWS client in a thread. These actions will be less scalable. Sending messages, the most important action, _is_ using the evented client. This means making direct HTTP requests to the [SQS Query API](http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/)
|
77
76
|
* Fix bugs and make it nicer.
|
78
77
|
* Refactor all the SQS stuff out of the actions
|
78
|
+
* Daemonize the executable
|
79
|
+
* A [god](http://god.rubyforge.org/) config file?
|
79
80
|
* Some configuration options
|
80
|
-
|
81
|
+
* More queue management features (e.g. an action to delete a queue, all_queues should link to each queue, provide check-box to delete the queue, etc.)
|
data/bin/sqs-accelerator
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "fileutils"
|
4
|
+
|
5
|
+
root_dir = File.join(File.dirname(__FILE__), "..")
|
6
|
+
|
7
|
+
# TODO daemonize
|
8
|
+
FileUtils.cd root_dir do
|
9
|
+
result = system "./sqs_accelerator.ru"
|
10
|
+
raise("error, process exited with status #{$?.exitstatus}") unless result
|
11
|
+
end
|
data/lib/server.rb
CHANGED
@@ -125,7 +125,7 @@ class SqsAccelerator::Server < Sinatra::Base
|
|
125
125
|
if message_body.size > SqsAccelerator::SqsHelper::MAX_MESSAGE_SIZE
|
126
126
|
logger.error "Message is too large, rejecting."
|
127
127
|
response.status = 413 # "Request Entity Too Large": http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
|
128
|
-
body "Message must be less than SqsAccelerator::SqsHelper::MAX_MESSAGE_SIZE bytes"
|
128
|
+
body "Message must be less than #{SqsAccelerator::SqsHelper::MAX_MESSAGE_SIZE} bytes"
|
129
129
|
return
|
130
130
|
end
|
131
131
|
|
data/sqs_accelerator.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
2
2
|
s.name = 'sqs_accelerator'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.2'
|
4
4
|
s.date = '2009-06-22'
|
5
5
|
s.summary = 'SQS Accelerator'
|
6
6
|
s.description = "A simple and scalable event-drive server that proxies requests to Amazon's Simple Queue Service to queue messages very quickly."
|
@@ -8,12 +8,14 @@ spec = Gem::Specification.new do |s|
|
|
8
8
|
s.homepage = "http://github.com/pauldowman/sqs-accelerator"
|
9
9
|
s.has_rdoc = false
|
10
10
|
s.authors = ["Paul Dowman"]
|
11
|
+
s.add_dependency('async_sinatra', '>= 0.1.4')
|
11
12
|
s.add_dependency('eventmachine', '>= 0.12.2')
|
12
13
|
s.add_dependency('igrigorik-em-http-request', '>= 0.1.6')
|
13
|
-
s.add_dependency('sinatra', '>= 0.9.2')
|
14
|
-
s.add_dependency('async_sinatra', '>= 0.1.4')
|
15
14
|
s.add_dependency('libxml-ruby', '>= 1.1.3')
|
15
|
+
s.add_dependency('sinatra', '>= 0.9.2')
|
16
16
|
s.rubyforge_project = "sqs-accelerator"
|
17
|
+
|
18
|
+
s.executables = ['sqs-accelerator']
|
17
19
|
|
18
20
|
# ruby -rpp -e' pp `git ls-files`.split("\n") '
|
19
21
|
s.files = ["README.markdown",
|
data/sqs_accelerator.ru
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pauldowman-sqs_accelerator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Dowman
|
@@ -13,59 +13,59 @@ date: 2009-06-22 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
16
|
+
name: async_sinatra
|
17
17
|
type: :runtime
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.
|
23
|
+
version: 0.1.4
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
26
|
+
name: eventmachine
|
27
27
|
type: :runtime
|
28
28
|
version_requirement:
|
29
29
|
version_requirements: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.12.2
|
34
34
|
version:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name:
|
36
|
+
name: igrigorik-em-http-request
|
37
37
|
type: :runtime
|
38
38
|
version_requirement:
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
40
40
|
requirements:
|
41
41
|
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
version: 0.
|
43
|
+
version: 0.1.6
|
44
44
|
version:
|
45
45
|
- !ruby/object:Gem::Dependency
|
46
|
-
name:
|
46
|
+
name: libxml-ruby
|
47
47
|
type: :runtime
|
48
48
|
version_requirement:
|
49
49
|
version_requirements: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - ">="
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 1.1.3
|
54
54
|
version:
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: sinatra
|
57
57
|
type: :runtime
|
58
58
|
version_requirement:
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - ">="
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version:
|
63
|
+
version: 0.9.2
|
64
64
|
version:
|
65
65
|
description: A simple and scalable event-drive server that proxies requests to Amazon's Simple Queue Service to queue messages very quickly.
|
66
66
|
email: paul@pauldowman.com
|
67
|
-
executables:
|
68
|
-
|
67
|
+
executables:
|
68
|
+
- sqs-accelerator
|
69
69
|
extensions: []
|
70
70
|
|
71
71
|
extra_rdoc_files: []
|
@@ -83,6 +83,7 @@ files:
|
|
83
83
|
- views/queue_info.haml
|
84
84
|
has_rdoc: false
|
85
85
|
homepage: http://github.com/pauldowman/sqs-accelerator
|
86
|
+
licenses:
|
86
87
|
post_install_message:
|
87
88
|
rdoc_options: []
|
88
89
|
|
@@ -103,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
104
|
requirements: []
|
104
105
|
|
105
106
|
rubyforge_project: sqs-accelerator
|
106
|
-
rubygems_version: 1.
|
107
|
+
rubygems_version: 1.3.5
|
107
108
|
signing_key:
|
108
109
|
specification_version: 2
|
109
110
|
summary: SQS Accelerator
|