Thanks for the answers.
Starting shell processes is not really an options - I need to have
full access to the file fs, including seek, read, write.
I was experimenting a bit with notify_readable, and using
Kernel::select with small timeouts (and returning to EM loop if no
files fds are ready), but both approaches have terrible performance
compared to pure file.write on a non-loaded system, at a factor of 10
times less ios per second with short writes/reads.
I do not have a detailed analysis of expected IO, but so far it looks
that using blocking file IO is a good first approach. I will probably
go back to the subject once my project matures a bit and goes out of
stealth mode.
BTW: I cannot get
http://github.com/methodmissing/aio working at all,
either MacOsX or Linux, so I did not really consider this.
Thanks again for all the comments.
Michal