Way of handling slow upload processing

Hi,

I've written code to upload files a la Agile Web Development with Rails Second edition. The thing is, its awfully slow.

In my tests, I was processing an uploaded image using RMagick. My new project doesn't require me to process image files--it just needs Ruby to process the file and save it to the server. The trouble is there could be a large number of files.

So my question is, is Ruby viable to use in this context? There are significant advantages to writing most of the site in Ruby, except for this part. Is it possible to write the file processing script in another, faster language and have Ruby hand over the file processing and saving to that script?

Ron

Ron wrote:

Hi,

I've written code to upload files a la Agile Web Development with Rails Second edition. The thing is, its awfully slow.

In my tests, I was processing an uploaded image using RMagick. My new project doesn't require me to process image files--it just needs Ruby to process the file and save it to the server. The trouble is there could be a large number of files.

So my question is, is Ruby viable to use in this context? There are significant advantages to writing most of the site in Ruby, except for this part. Is it possible to write the file processing script in another, faster language and have Ruby hand over the file processing and saving to that script?

Ron

Hi Ron, Do you use nginx? Ezra Zygmuntowicz did a post on an nginx module for file uploads: http://brainspl.at/articles/2008/07/20/nginx-upload-module courtesy of Valery Kholodkov who wrote the module: http://www.grid.net.ru/nginx/upload.en.html .

Daniel