caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] building web services using oCaml
@ 2002-09-17  4:56 Arnaud SAHUGUET
  2002-09-17 12:16 ` Xavier Leroy
  0 siblings, 1 reply; 8+ messages in thread
From: Arnaud SAHUGUET @ 2002-09-17  4:56 UTC (permalink / raw)
  To: caml-list; +Cc: sahuguet

[-- Attachment #1: Type: text/plain, Size: 2328 bytes --]

Hi,

I am looking for ways to build web services using oCaml.
(* this effort is part of the GALAX project at Bell-Labs. See http://db.bell-labs.com/galax/ for more info. *)

First I would like to point that out this includes two different aspects:

1- building the web services themselves (e.g. putting a SOAP interface on top of a database and spitting XML)
This is the server side, if you will.

2- glueing together web services
This is more the client side.

For 1-, it is not clear to me that oCaml has a competitive edge compared to other approaches, mainly because 1- requires a lot of "legacy" libraries not necessarily available for oCaml.
For 2-, however, the main components needed are an HTTP stack (HTTP, TCP, SSL, etc.) and an XML stack (XML parser, etc.). And this is where a functional language can really show its value.

I was looking at:
- ocamlNet
- cgi
and they support some aspects but not all that is needed like SSL, cookies, etc.
Are there other libraries that would do that for me?

As a more general question, shouldn't we (meaning of "we" to be defined :-) implement these stacks in oCaml?
Is there any value in doing it (except for the experience and fun of doing it)? 
Is there any advantage in having the stack (and whatever is underneath) available as oCaml constructs?

These protocols are complex and keep evolving. Taking a reference implementation (like libwww which is complete, maintained, supported and updated) and adding oCaml wrapper on top would make more sense to me. Our value added would be in the design of a nice API on top.

I am not saying that this should be done for everything, but when there is no (or little) value in having the low-level implementation details available as oCaml constructs, this is -- from my point of view -- the way to go.

I would like to raise the same question for XML libraries where namespaces, entity resolution, XML schemas (and God knows what they are going to invent) need to be supported. Should everything be done in oCaml? What is the value of having the low-level implementation details of XML trees available as oCaml objects?

As mentioned on various previous postings, the oCaml community is smaller than the Perl or Python ones. We need to be smarter and nimbler in our efforts.

regards,

Arnaud


[-- Attachment #2: Type: text/html, Size: 4388 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] building web services using oCaml
  2002-09-17  4:56 [Caml-list] building web services using oCaml Arnaud SAHUGUET
@ 2002-09-17 12:16 ` Xavier Leroy
  2002-09-17 14:33   ` Arnaud SAHUGUET
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Xavier Leroy @ 2002-09-17 12:16 UTC (permalink / raw)
  To: Arnaud SAHUGUET; +Cc: caml-list, sahuguet

> I was looking at:
> - ocamlNet
> - cgi
> and they support some aspects but not all that is needed like SSL,
> cookies, etc.

I seem to remember that OcamlNet supports cookies.  But I don't know
of any SSL library for Caml.  I have contemplated writing a Caml
binding for OpenSSL, preferably using CamlIDL to generate the C stubs,
but haven't quite found the time to do it yet :-)  Also, the OpenSSL
documentation is a bit sketchy; does anyone know of better
documentation than what is on www.openssl.org?

> Are there other libraries that would do that for me?

Let me mention Bedouin (http://bedouin.sourceforge.net/), an ambitious
project for programming CGI-like applications in OCaml.  Perhaps too
ambitious, since it appears to be still at the planning stage...

> As a more general question, shouldn't we (meaning of "we" to be
> defined :-) implement these stacks in oCaml?  Is there any value in
> doing it (except for the experience and fun of doing it)?  Is there
> any advantage in having the stack (and whatever is underneath)
> available as oCaml constructs?

There are cases where it just makes more sense to interface to an
existing C library.  I think SSL falls in this category, because the
SSL protocol is quite complex, and the OpenSSL implementation seems
of good quality.  On the other hand, the subset of HTTP that you need
to write CGI-like applications is simple enough that implementing it
directly in OCaml (like OcamlNet does) is easier than trying to
interface to, say, libwww.

> I would like to raise the same question for XML libraries [...]

I pass :-)

Cheers,

- Xavier Leroy
-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] building web services using oCaml
  2002-09-17 12:16 ` Xavier Leroy
@ 2002-09-17 14:33   ` Arnaud SAHUGUET
  2002-09-17 14:56     ` FYI about Galax [ Was: [Caml-list] building web services using oCaml ] Jerome Simeon
  2002-09-17 15:07     ` [Caml-list] building web services using oCaml Stephen Tse
  2002-09-18 18:57   ` Alain Frisch
  2002-09-19  7:03   ` openssl (was: [Caml-list] building web services using oCaml) Florian Hars
  2 siblings, 2 replies; 8+ messages in thread
From: Arnaud SAHUGUET @ 2002-09-17 14:33 UTC (permalink / raw)
  To: Xavier Leroy; +Cc: caml-list

> There are cases where it just makes more sense to interface to an
> existing C library.  I think SSL falls in this category, because the
> SSL protocol is quite complex, and the OpenSSL implementation seems
> of good quality.  On the other hand, the subset of HTTP that you need
> to write CGI-like applications is simple enough that implementing it
> directly in OCaml (like OcamlNet does) is easier than trying to
> interface to, say, libwww.

I agree that this is fine for a subset of HTTP. But what if we need the
whole thing.
I think the problem is not so much implementing something in oCaml, it is
implementing something that satisfies a given spec (e.g. SSL, HTTP, etc.)
and maintaining it. The maintainance is really the hard part.
>From my point of view, relying on a reference implementation (e.g. libwww
maintained by W3C) is a good way to go.

Furthermore, for cryptographic library, it is always risky to provide yet
another implementation because it is more prone to mistakes which can lead
to serious security leaks.

Arnaud

-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* FYI about Galax  [ Was: [Caml-list] building web services using oCaml ]
  2002-09-17 14:33   ` Arnaud SAHUGUET
@ 2002-09-17 14:56     ` Jerome Simeon
  2002-09-17 15:07     ` [Caml-list] building web services using oCaml Stephen Tse
  1 sibling, 0 replies; 8+ messages in thread
From: Jerome Simeon @ 2002-09-17 14:56 UTC (permalink / raw)
  To: Xavier Leroy, caml-list, Mary Fernandez; +Cc: Xavier Leroy, Arnaud Sahuguet

Since Arnaud bite the bullet already, let me give a few infos about
Galax.

Galax is an implementation of the XPath 2.0 / XQuery 1.0 family of
working drafts. (See http://www.w3.org/XML/Query). It is a complete
implementation of those two languages. People on this list will probably
be interested to know it also comes with (alpha) support for XML Schema
and static type inference.

Galax is open-source and implemented in Caml. The development is
(mostly) done by Mary Fernandez from AT&T and myself.

We are planning for an official release by the end of the month (which
is the reason we did not advertise it yet), but people interested can
find a very early prototype and more details on the Galax Web site.
(http://db.bell-labs.com/galax).

Voila,
Stay tuned for more in a couple of weeks :)

- Jerome

-- 
Jerome Simeon -
Bell Laboratories --- Lucent Technologies
600 Mountain Avenue, Murray Hill, NJ, USA
Tel: +1 908 582 5473 Fax: +1 908 582 7308

On Tue, 2002-09-17 at 10:33, Arnaud SAHUGUET wrote:
> > There are cases where it just makes more sense to interface to an
> > existing C library.  I think SSL falls in this category, because the
> > SSL protocol is quite complex, and the OpenSSL implementation seems
> > of good quality.  On the other hand, the subset of HTTP that you need
> > to write CGI-like applications is simple enough that implementing it
> > directly in OCaml (like OcamlNet does) is easier than trying to
> > interface to, say, libwww.
> 
> I agree that this is fine for a subset of HTTP. But what if we need the
> whole thing.
> I think the problem is not so much implementing something in oCaml, it is
> implementing something that satisfies a given spec (e.g. SSL, HTTP, etc.)
> and maintaining it. The maintainance is really the hard part.
> >From my point of view, relying on a reference implementation (e.g. libwww
> maintained by W3C) is a good way to go.
> 
> Furthermore, for cryptographic library, it is always risky to provide yet
> another implementation because it is more prone to mistakes which can lead
> to serious security leaks.
> 
> Arnaud
> 
> -------------------
> 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/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners



-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] building web services using oCaml
  2002-09-17 14:33   ` Arnaud SAHUGUET
  2002-09-17 14:56     ` FYI about Galax [ Was: [Caml-list] building web services using oCaml ] Jerome Simeon
@ 2002-09-17 15:07     ` Stephen Tse
  1 sibling, 0 replies; 8+ messages in thread
From: Stephen Tse @ 2002-09-17 15:07 UTC (permalink / raw)
  To: Arnaud SAHUGUET; +Cc: caml-list

"Arnaud SAHUGUET" <sahuguet@lucent.com> writes:

> > There are cases where it just makes more sense to interface to an
> > existing C library.  I think SSL falls in this category, because the
> > SSL protocol is quite complex, and the OpenSSL implementation seems
> > of good quality.  On the other hand, the subset of HTTP that you need
> > to write CGI-like applications is simple enough that implementing it
> > directly in OCaml (like OcamlNet does) is easier than trying to
> > interface to, say, libwww.
> 
> I agree that this is fine for a subset of HTTP. But what if we need
> the whole thing.  I think the problem is not so much implementing
> something in oCaml, it is implementing something that satisfies a
> given spec (e.g. SSL, HTTP, etc.)  and maintaining it. The
> maintainance is really the hard part.  >From my point of view,
> relying on a reference implementation (e.g. libwww maintained by
> W3C) is a good way to go.


libcurl is a good alternative to libwww,

http://curl.haxx.se/
http://curl.haxx.se/libcurl/

You may also be interested in the list of http libraries,

http://curl.haxx.se/docs/comparison-table.html
http://curl.haxx.se/libcurl/competitors.html


-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] building web services using oCaml
  2002-09-17 12:16 ` Xavier Leroy
  2002-09-17 14:33   ` Arnaud SAHUGUET
@ 2002-09-18 18:57   ` Alain Frisch
  2002-09-18 19:11     ` Arnaud Sahuguet
  2002-09-19  7:03   ` openssl (was: [Caml-list] building web services using oCaml) Florian Hars
  2 siblings, 1 reply; 8+ messages in thread
From: Alain Frisch @ 2002-09-18 18:57 UTC (permalink / raw)
  To: Caml list

On Tue, 17 Sep 2002, Xavier Leroy wrote:

> > Are there other libraries that would do that for me?
>
> Let me mention Bedouin (http://bedouin.sourceforge.net/), an ambitious
> project for programming CGI-like applications in OCaml.  Perhaps too
> ambitious, since it appears to be still at the planning stage...

Yeah yeah yeah. Bedouin has been inactive for a long period. Basically
because of my lack of time, and also an erosion of interest. Many people
seems to be interested in Bedouin, but it is hard to find contibutors for
the design or the implementation !  I'm willing to continue working on
Bedouin if other people - preferably with real-world experience - show
interest *and* get involved. Hint hint.

For the moment, Bedouin has:
- a mapping from the HTML 4 DTD to OCaml types, ensuring correctness
  of produced pages
- a skeleton of the application logic (handling sessions, dispatching
  pages)
- a skeleton of a widget library (abstraction of form controls, to allow
  an event-like style, with callbacks, etc...)


Gerd's wdialog should also be mentioned: http://wdialog.sourceforge.net/


-- Alain

-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Caml-list] building web services using oCaml
  2002-09-18 18:57   ` Alain Frisch
@ 2002-09-18 19:11     ` Arnaud Sahuguet
  0 siblings, 0 replies; 8+ messages in thread
From: Arnaud Sahuguet @ 2002-09-18 19:11 UTC (permalink / raw)
  To: Alain Frisch, Caml list

Are you aware of some similar work for Haskell with a library of combinators to produce well-formed HTML/XML?
http://www.cs.york.ac.uk/fp/HaXml/icfp99.html

Arnaud



----- Original Message ----- 
From: "Alain Frisch" <frisch@clipper.ens.fr>
To: "Caml list" <caml-list@pauillac.inria.fr>
Sent: Wednesday, September 18, 2002 2:57 PM
Subject: Re: [Caml-list] building web services using oCaml


> On Tue, 17 Sep 2002, Xavier Leroy wrote:
> 
> > > Are there other libraries that would do that for me?
> >
> > Let me mention Bedouin (http://bedouin.sourceforge.net/), an ambitious
> > project for programming CGI-like applications in OCaml.  Perhaps too
> > ambitious, since it appears to be still at the planning stage...
> 
> Yeah yeah yeah. Bedouin has been inactive for a long period. Basically
> because of my lack of time, and also an erosion of interest. Many people
> seems to be interested in Bedouin, but it is hard to find contibutors for
> the design or the implementation !  I'm willing to continue working on
> Bedouin if other people - preferably with real-world experience - show
> interest *and* get involved. Hint hint.
> 
> For the moment, Bedouin has:
> - a mapping from the HTML 4 DTD to OCaml types, ensuring correctness
>   of produced pages
> - a skeleton of the application logic (handling sessions, dispatching
>   pages)
> - a skeleton of a widget library (abstraction of form controls, to allow
>   an event-like style, with callbacks, etc...)
> 
> 
> Gerd's wdialog should also be mentioned: http://wdialog.sourceforge.net/
> 
> 
> -- Alain
> 
> -------------------
> 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/
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> 

-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

* openssl (was: [Caml-list] building web services using oCaml)
  2002-09-17 12:16 ` Xavier Leroy
  2002-09-17 14:33   ` Arnaud SAHUGUET
  2002-09-18 18:57   ` Alain Frisch
@ 2002-09-19  7:03   ` Florian Hars
  2 siblings, 0 replies; 8+ messages in thread
From: Florian Hars @ 2002-09-19  7:03 UTC (permalink / raw)
  To: Xavier Leroy; +Cc: caml-list

Xavier Leroy wrote:
> Also, the OpenSSL
> documentation is a bit sketchy; does anyone know of better
> documentation than what is on www.openssl.org?

Out there on the 'net, they have this old saying "any O'Reilly book will do":
http://www.oreilly.com/catalog/openssl/
(I haven't seen this book, just found it with google)

Yours, Florian Hars.

-------------------
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/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-09-19  7:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-17  4:56 [Caml-list] building web services using oCaml Arnaud SAHUGUET
2002-09-17 12:16 ` Xavier Leroy
2002-09-17 14:33   ` Arnaud SAHUGUET
2002-09-17 14:56     ` FYI about Galax [ Was: [Caml-list] building web services using oCaml ] Jerome Simeon
2002-09-17 15:07     ` [Caml-list] building web services using oCaml Stephen Tse
2002-09-18 18:57   ` Alain Frisch
2002-09-18 19:11     ` Arnaud Sahuguet
2002-09-19  7:03   ` openssl (was: [Caml-list] building web services using oCaml) Florian Hars

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).