caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe TROESTLER <debian00@tiscali.be>
To: "O'Caml Mailing List" <caml-list@inria.fr>
Cc: ocamlnet-devel@lists.sourceforge.net
Subject: Re: Common CGI interface
Date: Wed, 20 Apr 2005 22:00:31 +0200 (CEST)	[thread overview]
Message-ID: <20050420.220031.69130073.debian00@tiscali.be> (raw)
In-Reply-To: <1113940495.6248.101.camel@localhost.localdomain>

On Tue, 19 Apr 2005, Gerd Stolpmann <info@gerd-stolpmann.de> wrote:
> 
> Good idea. However, I think it is too late for such a discussion.
> First, it already happened. [...] Ocamlnet.

Are questions welcomed?

At the time I was not so much interested by web apps -- this is still
not my main concern but, at times, I have to build some and I like
both powerful and simple tools.  My experience with OCamlNet is that,
for a newcomer, it is difficult to find ones way through it.  The
library is impressive but, IMO, the interface could be made _simpler_
and more orthogonal.

For example I am wondering why standard CGI must use [let cgi = new
std_activation()] while FastCGI requires [Netcgi_fcgi.serv (fun cgi ->
...)].  Why can't the callback method be used consistently all over
the place?  Additional advantages are that it allows to handle
exceptions [1], to [#finalize] automatically when the request has been
dealt with (the user may still want to call [#finalize] manually but
would not be required to do so) and to [#commit]/[#flush] the output.
Finally, how are we supposed to launch different threads for different
requests [2]?

About arguments: is the mutability of arguments useful?  This makes
the whole interface more complex for a purpose I can't see.  Also, why
not distinguish simple parameters (for which a method that returns a
string is sufficient) and file uploads (for which one clearly wants
more flexibility).

Why is there an exception [Std_environment_not_found]?  Isn't it the
role of the library to reject requests with lack of information (and
log them)?  Why bother the user with that?  (I don't even think one
may want to customize the reply to such requests as they are just
bogus.)

I have a few more questions in the same vein but will stop here
waiting for reactions before bothering everybody even more! :-)

Regards,
ChriS

---
[1] I believe the library should just log them and process the next
request.  Moreover [Exit] should probably be treated specially as a
way to terminate the script early (say after an error message).

[2] I read the reply of Eric Stokes but I do not understand it: are
the various threads going to share the same socket??  And what about
if requests are multiplexed (this is not currently supported by Apache
but may be eventually with the new threaded Apache and is definitely
supported by other web servers)?


  parent reply	other threads:[~2005-04-20 20:01 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-18  6:15 CamlGI question Mike Hamburg
2005-04-18  7:29 ` [Caml-list] " Robert Roessler
2005-04-18 13:49   ` Alex Baretta
2005-04-18 14:31     ` Gerd Stolpmann
2005-04-18 16:04       ` Michael Alexander Hamburg
2005-04-18 16:28         ` Alex Baretta
2005-04-19  3:23           ` Mike Hamburg
2005-04-19  3:26             ` [Caml-list] CamlGI question [doh] Mike Hamburg
2005-04-19  9:18               ` Gerd Stolpmann
2005-04-19 15:28                 ` Mike Hamburg
     [not found]                   ` <1113933973.6248.76.camel@localhost.localdomain>
2005-04-19 18:44                     ` Eric Stokes
2005-04-19 19:18                       ` Christophe TROESTLER
2005-04-19 21:11                     ` Eric Stokes
2005-04-19  9:31               ` Alex Baretta
2005-04-19 11:33 ` [Caml-list] CamlGI question Christophe TROESTLER
2005-04-19 12:51   ` Christopher Alexander Stein
2005-04-19 19:03     ` Common CGI interface (was: [Caml-list] CamlGI question) Christophe TROESTLER
2005-04-19 19:54       ` Gerd Stolpmann
2005-04-20  6:55         ` Jean-Christophe Filliatre
2005-04-20  7:22         ` Common XML interface (was: Common CGI interface) Alain Frisch
2005-04-20 11:15           ` [Caml-list] " Gerd Stolpmann
2005-04-20 11:38             ` Nicolas Cannasse
2005-04-20 13:23           ` Stefano Zacchiroli
2005-04-21  6:59             ` [Caml-list] Common XML interface Alain Frisch
2005-04-21 11:34               ` Gerd Stolpmann
2005-04-20 20:00         ` Christophe TROESTLER [this message]
2005-04-20 21:06           ` [Caml-list] Re: Common CGI interface Gerd Stolpmann
2005-04-21  7:36             ` [Ocamlnet-devel] " Florian Hars
2005-04-21 10:41               ` Gerd Stolpmann
2005-04-25 10:38             ` Christophe TROESTLER
2005-04-26 11:08               ` Gerd Stolpmann
2005-05-06 20:14                 ` Christophe TROESTLER
2005-05-10  0:07                   ` [Caml-list] " Christophe TROESTLER
2005-05-10  0:10                   ` Christophe TROESTLER
2005-04-26 16:24               ` [Caml-list] " Eric Stokes
2005-05-06 20:14                 ` Christophe TROESTLER
2005-04-19 20:13   ` [Caml-list] CamlGI question Michael Alexander Hamburg

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

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

  git send-email \
    --in-reply-to=20050420.220031.69130073.debian00@tiscali.be \
    --to=debian00@tiscali.be \
    --cc=caml-list@inria.fr \
    --cc=ocamlnet-devel@lists.sourceforge.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 NNTP newsgroup(s).