No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.md
apachebench_results.txt
config.ru
config_em_pg_client.ru
em-postgres_gem.txt
em_async_app.rb
em_pg_client.rb
em_postgres_toy.rb
install_siege.txt
my_async_app.rb
ourstage_development.sql
promo_click_data
promo_judge.rb
siege_results.txt
thin_implementation.txt
tracker_heartbeat.rb
tracker_heartbeat_post_data

README.md

  • em_postgres_toy.rb (This is the gem we'll use!) A rack app that will use the ruby-em-pg-client gem to make non-blocking* request to postgres. Pretty much the same as the em_pg_client.rb EXCEPT that it implements a queue where each SQL call to postgres will be queued until the previous SQL call's result has been totally read.

    NOTE: this gem does NOT include the dependency on the pg gem. You must add "gem 'pg'" to you're Gemfile

  • config.ru A more complex rack app that has a couple of routes and uses the em_pg_client gem.

  • em_pg_client.rb (Won't work for multiple SQL commands!!) A rack app that will use the ruby-em-pg-client gem to make non-blocking* request to postgres. https://github.com/royaltm/ruby-em-pg-client

    • Postgres can NOT handle multiple request per connection!!! This gem will send a "send_query" request to postgres and return immediately But, one can NOT invoke another send_query request until the previous send_query's result is totally read. This is because the result is sent back on the same file descriptor that was used by the connection and the send_query command.

    I would've like it if postgres did a true async mode. Different FD's for connection, command and result set, oh well.

  • config_em_pg_client.ru (Won't work for multiple SQL commands!!) A more complex rack app that has a couple of routes and uses the em_pg_client gem.