We have been trying to send large files with EventMachine and noticed a few issues. If we just use send data with the contents of a file inside it is slow, and the server eats about 98% of the CPU. The send_file call only supports files up to 32K, which we are sending files as large as 5mb. Lastly we have been unable to use stream_file_data, because it has a dependency on evma_fastfilereader, which I couldn't seem to find anywhere to install anymore.
Has anyone been sending large file with eventmachine that could share some tips. In our case we are using EM for both the client and the server. We are trying to sync over a directory of many files, is this just not a recommended usage of EM? Besides looking for solutions to make this work better on EM, are there other recommendations of better ways to send and receive large amounts of file data with Ruby?
On Sun, Sep 28, 2008 at 8:18 PM, Dan Mayer <d...@devver.net> wrote:We have been trying to send large files with EventMachine and noticed a few issues. If we just use send data with the contents of a file inside it is slow, and the server eats about 98% of the CPU. The send_file call only supports files up to 32K, which we are sending files as large as 5mb. Lastly we have been unable to use stream_file_data, because it has a dependency on evma_fastfilereader, which I couldn't seem to find anywhere to install anymore.
Hmmm. I think that was confused oversight on Francis/my part. evma_fastfilereader should be part of EM. Until it is, you can get it by installing Swiftiply.
Has anyone been sending large file with eventmachine that could share some tips. In our case we are using EM for both the client and the server. We are trying to sync over a directory of many files, is this just not a recommended usage of EM? Besides looking for solutions to make this work better on EM, are there other recommendations of better ways to send and receive large amounts of file data with Ruby?
Using stream_file_data I regularly transfer very large files with Swiftiply.
Kirk Haines
_______________________________________________
Eventmachine-talk mailing list
Eventmac...@rubyforge.org
http://rubyforge.org/mailman/listinfo/eventmachine-talk
Aman
Dan,If you have some time, would you be able to use your data sets against this other BufferedTokenizer implementation:
You might also try Tony's C buffer:
http://github.com/igrigorik/em-http-request/tree/master/ext/buffer/em_buffer.c
http://github.com/tarcieri/rev/tree/master/ext/rev/rev_buffer.c
Aman