Version française
Home     About     Download     Resources     Contact us    
Browse thread
web server interface for Ocaml ( like rack, wsgi, ...)?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: ben kuin <benkuin@g...>
Subject: Re: [Caml-list] web server interface for Ocaml ( like rack, wsgi, ...)?
> what's wrong with simply proxying the HTTP connections through your favorite webserver to the backend ocsigen/ocamlnet server?

Nothing per se. I've tried so set something up with ocsigen, but I had
to give up. There seems to be a certain philosophy behind it how you
should writing web apps.

But I just wanted to do something:
-  small ( one page app )
-  quick and dirty ( no big setup upfront, no compilation)
-  deployment, by dropping a (ocaml script) into a webroot, not matter
what webserver is running
- permissive license ( mit, ...)

 ~~~~ from wikipedia ~~~~
require 'rack'
app = Rack::Builder.app do
  lambda do |env|
    body = "Hello, World!"
    [200, {"Content-Type" => "text/plain", "Content-Length" =>
body.length.to_s}, [body]]
  end
end
~~~~~~~~~~~~~~~~~~~~




On Sun, Sep 19, 2010 at 12:32 PM, Richard Jones <rich@annexia.org> wrote:
> On Thu, Sep 16, 2010 at 10:29:23AM -0700, Jake Donham wrote:
>> On Thu, Sep 16, 2010 at 4:05 AM, ben kuin <benkuin@gmail.com> wrote:
>> > Is there a web server interface / adapter for ocaml that abstracts
>> > your application from the various web server implementations?
>>
>> There is no OCaml equivalent to rack / wsgi. It would be nice to have
>> something like this; the existing web frameworks (e.g. Ocamlnet and
>> Ocsigen as another poster mentioned) implement the whole stack, but it
>> would be nice to be able to mix and match (e.g. run Ocsigen's Eliom
>> applications in Ocamlnet's Netplex server). Part of the difficulty is
>> that there are different approaches to concurrency/asynchrony (Lwt for
>> Ocsigen, Equeue for netplex). My impression is that rack / wsgi punt
>> on this issue, and assume threading. But an OCaml equivalent could
>> possibly offer both a concurrent/asynchronous and a direct-style
>> interface.
>
> Maybe I'm missing the point, but what's wrong with simply proxying the
> HTTP connections through your favorite webserver to the backend
> ocsigen/ocamlnet server?
>
> Rich.
>
> --
> Richard Jones
> Red Hat
>