unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Thien-Thi Nguyen <ttn@gnuvola.org>
To: Neil Jerram <neil@ossau.uklinux.net>
Cc: guile-user@gnu.org
Subject: Re: Serving files with guile web server
Date: Tue, 22 Mar 2011 09:51:47 +0100	[thread overview]
Message-ID: <8762rb5yho.fsf@ambire.localdomain> (raw)
In-Reply-To: <874o6z97gg.fsf@ossau.uklinux.net> (Neil Jerram's message of "Sat, 19 Mar 2011 02:20:47 +0000")

() Neil Jerram <neil@ossau.uklinux.net>
() 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



  parent reply	other threads:[~2011-03-22  8:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-16 23:33 Serving files with guile web server romel
2011-03-17 14:55 ` romel
2011-03-19  2:20   ` Neil Jerram
2011-03-19 16:47     ` romel
2011-03-19 18:17       ` Neil Jerram
2011-03-19 22:23         ` romel
2011-03-31 14:44       ` Andy Wingo
2011-03-22  8:51     ` Thien-Thi Nguyen [this message]
2011-03-31 14:23       ` Andy Wingo
2011-03-31 15:09         ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8762rb5yho.fsf@ambire.localdomain \
    --to=ttn@gnuvola.org \
    --cc=guile-user@gnu.org \
    --cc=neil@ossau.uklinux.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).