Permalink
Browse files

added an executable that's available from the path

  • Loading branch information...
1 parent 37a52ff commit 89911e831f5ad3a9e231af32429b95b333629efd @pauldowman committed Jul 31, 2009
Showing with 21 additions and 7 deletions.
  1. +4 −3 README.markdown
  2. +11 −0 bin/sqs-accelerator
  3. +5 −3 sqs_accelerator.gemspec
  4. +1 −1 sqs_accelerator.ru
View
@@ -43,8 +43,8 @@ A: Not yet, it's just a theory so far, my next priority is to benchmark this and
Usage instructions
------------------
-* Install this gem
-* Run sqs_accelerator.ru
+* sudo gem install pauldowman-sqs_accelerator
+* run the executable "sqs-accelerator"
* Hit [http://localhost:9292/](http://localhost:9292/) in a browser
* Make an HTTP GET request to /queues to list all queues
* Make an HTTP POST request to /queues with queue_name=newqueue to create a queue named newqueue
@@ -69,12 +69,13 @@ Still to do
* Find all the TODO comments in the code
* Benchmarking
-* A command to start and stop the daemon, maybe a [god](http://god.rubyforge.org/) config file
* Use SSL when connecting to SQS to protect message content (AWS credentials are never sent, they're just used to sign the message)
* Unit tests (I'm just trying to figure out if this idea even works first)
* Create a Ruby client library
* 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/)
* Fix bugs and make it nicer.
* Refactor all the SQS stuff out of the actions
+* Daemonize the executable
+* A [god](http://god.rubyforge.org/) config file?
* Some configuration options
View
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+
+require "fileutils"
+
+root_dir = File.join(File.dirname(__FILE__), "..")
+
+# TODO daemonize
+FileUtils.cd root_dir do
+ result = system "./sqs_accelerator.ru"
+ raise("error, process exited with status #{$?.exitstatus}") unless result
+end
View
@@ -1,19 +1,21 @@
spec = Gem::Specification.new do |s|
s.name = 'sqs_accelerator'
- s.version = '0.0.1'
+ s.version = '0.0.2'
s.date = '2009-06-22'
s.summary = 'SQS Accelerator'
s.description = "A simple and scalable event-drive server that proxies requests to Amazon's Simple Queue Service to queue messages very quickly."
s.email = 'paul@pauldowman.com'
s.homepage = "http://github.com/pauldowman/sqs-accelerator"
s.has_rdoc = false
s.authors = ["Paul Dowman"]
+ s.add_dependency('async_sinatra', '>= 0.1.4')
s.add_dependency('eventmachine', '>= 0.12.2')
s.add_dependency('igrigorik-em-http-request', '>= 0.1.6')
- s.add_dependency('sinatra', '>= 0.9.2')
- s.add_dependency('async_sinatra', '>= 0.1.4')
s.add_dependency('libxml-ruby', '>= 1.1.3')
+ s.add_dependency('sinatra', '>= 0.9.2')
s.rubyforge_project = "sqs-accelerator"
+
+ s.executables = ['sqs-accelerator']
# ruby -rpp -e' pp `git ls-files`.split("\n") '
s.files = ["README.markdown",
View
@@ -1,5 +1,5 @@
#!/usr/bin/env rackup -Ilib:../lib -s thin
-require 'lib/server'
+require "#{File.dirname(__FILE__)}/lib/server"
run SqsAccelerator::Server.new

0 comments on commit 89911e8

Please sign in to comment.