Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Experimenting with S3 upload using eventmachine
Ruby
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
data
lib
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.md
s3.yml

README.md

This is a sample project that illustrates some strange behavior I ran into trying to upload files to Amazon S3 using EventMachine and the happening non-blocking S3 client.

You need to update the s3.yml file with your S3 account information and run bundle install. Then you can run either of the two included scripts:

ruby lib/http_upload.rb

or

ruby lib/https_upload.rb

On my machine (Mac OS X) when I run the https script the CPU spikes to 100% and the event loop is blocked for a couple of minutes before the file starts to transfer. However, the http version does not block the event loop, uses almost no CPU, and starts transferring data right away.

Something went wrong with that request. Please try again.