caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jimmie Houchin <jhouchin@texoma.net>
To: Francois Rouaix <frouaix@home.net>
Cc: "Caml-List@Inria.Fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Web Development with OCaml
Date: Wed, 11 Jul 2001 21:32:47 -0500	[thread overview]
Message-ID: <3B4D0C4F.C7DEC826@texoma.net> (raw)
In-Reply-To: <NFBBJPJKELEJMBOIHIDHEEOGCAAA.frouaix@home.net>

I would be interested in seeing any code you have available for release.
Any code is at least usable for learning.

A multi-tiered architecture is advocated by some but not all.
Philip Greenspun wrote a book called 
Philip and Alex's Guide to Web Publishing
http://www.amazon.com/exec/obidos/ASIN/1558605347/
view it online at:
http://www.arsdigita.com/books/panda/

He advocates using a two or one tier system. In the book he talks about
AolServer with it's built-in Tcl interpreter and his ACS, Arsdigita Community
Service web app.
http://www.arsdigita.com/products/
http://www.arsdigita.com/

He argues against the three-tiered model. Quite effectively I might add. You
might not agree with everything he says, but he does make a provocative
argument. In his book he talks bad about Java. He is actually a Lisp (Scheme)
proponent. Unfortunately his company took some VC money and now sings the Java
song. Blech. I don't think he liked it tho'.

If there were a sufficient group of people wanting to work towards such, his
ACS provides an excellent model from which to base ideas.

I think that
A web server written in OCaml which is extensible by OCaml modules,
With a built-in templating system based on HereDoc, Pxp, or Camlp4 and
A built-in persistent database connection pool
Could be the basis of an excellent two-tiered system.

>From this you could build a web app such as ACS.

There are several good models from which to get ideas which are implemented in
reasonably friendly languages. There are many templating tools from which to
borrow ideas. The nice thing is to find the tool we like and port it or
rewrite it for and in OCaml.

Am I wrong? Zope, Python can provide 20-80 rps.
Python is not known for it's speed.
Couldn't an implementation in OCaml perform better without sacrificing much in
a user friendly deployment language?

Erlang, an interpreted functional language, has it's own web server and
capacity to extend in Erlang.
It also has an excellent distributed database.
It performs equal to or better than Python's setup. (From my understanding)
Could not OCaml do equal or better?

Can't OCaml do better than the Java ...? :)


I would think OCaml could do well better than all of the above.
Am I wrong?
Am I wrong that there would be benefit to such?

This could be done well with an OCaml web server or with a mod_ocaml.

Behind either you develop the web app server.

Advantages mod_ocaml.
  Let the Apache group do what they do best.
  Ride their coattails and use their tools.
  Use OCaml for building the web app and site.
  Increased mind share for OCaml.

Advantages OCaml web server.
  One language, one tool.
  OCaml and go...

They are not mutually exclusive. :)

If the benefits I see are real and exist. 
Then the main issue is creating the community which develops these tools.
I believe this can come from those in this community who have done parts of
the tools.
I also believe that this is a project which when successfully organized and
active can attract other developers.

Well enough for now. I need to get back to the docs and see if I can wrap my
brain around OCaml. :)
If I can and choose to use OCaml for my web site I'll be happy to contribute
any non-site specific code to the project.

Jimmie Houchin



Francois Rouaix wrote:
> 
> To add a few cents to the discussion
> 
> > 5. An OCaml Web Server. I don't know what's available here yet.
> >        I haven't had the time to research yet.
> >        This could be a very interesting option, especially if it's fast.
> >        This could easily be an excellent option to put behind Tux.
> >        Tux serves number 1. above and passes all dynamic services to this
> > server.
> 
> Back in 1996, I had something called V6 running in OCaml; it was an HTTP
> proxy with
> a bunch of interesting features, and could serve as a Web server. However,
> this was
> a long time ago, and iI implemented only HTTP 1.0, not 1.1. Also, we didn't
> have threads in
> native mode in those days. The speed was still reasonable. I remember that I
> could
> easily use 60% of  our 10 Mb/s network (network still being used by other
> stuff in
> the lab).
> 
> > Is there any interest in a mod_ocaml or a fast-cgi module for OCaml?
> > I haven't a clue on how to develop either but could possibly learn. :)
> > After learning OCaml (at least some) first.
> 
> Actually, I did start an mod_ocaml project a couple of years ago. I had the
> core
> working, meaning that I produce a very simple page with the module.
> However, I stopped before moving forward because of the intricacy of
> correctly
> designing the whole thing (configuration, separation of name spaces between
> user-modules, compilation and loading on demand, etc...).
> Also, I had doubts about the usefulness of a mod_ocaml. In practice (meaning
> in the real .com world, where I was working at the time), one uses multiple
> tier architectures. And you want something in the frontend that is simple
> enough
> that non-real programmers can still tweak; something that only does layout,
> and
> no logic.
>
> If someone is interested, I might be able to retrieve the source. There is
> a good OReilly book on Apache modules (although Apache 2.0 may make
> this obsolete altogether).
> 
> --f
> -------------------
> Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
> To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  parent reply	other threads:[~2001-07-12  2:32 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-10  0:01 Jimmie Houchin
2001-07-10  7:10 ` Jean-Christophe Filliatre
2001-07-10  7:15 ` Tom Hirschowitz
2001-07-10  8:19   ` David Mentre
2001-07-10  9:38   ` Alain Frisch
2001-07-11  5:49     ` Jimmie Houchin
2001-07-11  6:03       ` Alexander V. Voinov
2001-07-11 14:47         ` Jimmie Houchin
2001-07-12  1:58           ` John Max Skaller
2001-07-11  6:19       ` Alain Frisch
2001-07-11  9:09         ` Samuel Heriard Dubreuil
2001-07-11 14:11           ` Jimmie Houchin
2001-07-11 15:35       ` Francois Rouaix
2001-07-11 20:44         ` Gerd Stolpmann
2001-07-12  2:32         ` Jimmie Houchin [this message]
2001-07-13  5:37       ` William Chesters
2001-07-13 10:29         ` Alain Frisch
2001-07-13 11:16           ` Vitaly Lugovsky
2001-07-13 14:04             ` Xavier Leroy
2001-07-13 17:08               ` [web-caml] " Vitaly Lugovsky
2001-07-15 18:03               ` Ari Heitner
2001-07-15 20:19                 ` Gerd Stolpmann
2001-07-16  8:23                 ` wakita
2001-07-17 16:18                 ` John Max Skaller
2001-07-17 18:50                   ` Ari Heitner
2001-07-18 22:24                     ` John Max Skaller
2001-07-13 16:12           ` Lyn A Headley
2001-07-13 17:50             ` William Chesters
2001-07-13 16:51           ` Miles Egan
2001-07-13 18:12           ` Jimmie Houchin

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=3B4D0C4F.C7DEC826@texoma.net \
    --to=jhouchin@texoma.net \
    --cc=caml-list@inria.fr \
    --cc=frouaix@home.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).