() Neil Jerram <[email protected]> () Sat, 19 Mar 2011 02:20:47 +0000
Well, I suppose I'd recommend considering not using the Guile server to serve static files. If efficiency is a concern, another approach is to wrap sendfile(2) or something like it. http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#index-sendfile-140 This is what "ttn-do sizzweb", "ttn-do serve-debiso" and the serveez packages do, although for the latter the wrapping is admittedly very thin (C only) at present. That may change... http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#sizzweb http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#serve-debiso http://git.savannah.gnu.org/cgit/serveez.git?h=next https://github.com/spk121/serveez-mg/ Probably a good exercise for Guile 2 FFI. If sendfile (or ilk) is too Linux- (or ilk) specific, a nice fallback would be to wrap the POSIX scatter/gather support, i.e., writev(2)/readv(2). http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#index-iovec-142 http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#index-writev-144 http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#index-readv-143 This is what (ttn-do zzz x-protocol) uses, albeit sub-optimally for now. http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#zzz-x_002dprotocol
