On Sun, 25 Jul 2010 06:52:46 -0700 (PDT) Dario Teixeira <darioteixe...@yahoo.com> wrote:
> The only circumstance where I would be cautious on relying solely on a > naked Ocsigen is if you are also required to serve plenty of static > content (images, etc). Even though Ocsigen includes an extension for > serving static pages, for hysterical reasons no Unix supports > non-blocking mode for regular files, which of course causes problems > for Lwt-apps (see the Lwt manual for more information on this). I thought ocaml's "threads" are meant to solve the I/O problem. Doesn't it use native pthreads for each OCaml thread, and prior to performing I/O it releases the mutex allowing other threads to run? Of course you'd still have to wait for the I/O to complete to serve the file to one particular user, but in the meantime you could serve some other (already cached) file to another user, generate some dynamic content, etc. Lwt's Lwt_preemptive seems to allow one to use 'preemptive threads' (which I assume are just usual OCaml threads). So would it be possible to put the file I/O on Lwt_preemptive.detach threads? Has anyone tried to measure the performance of doing that? Best regards, --Edwin _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs