From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 40CCABC57 for ; Tue, 21 Sep 2010 09:50:37 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkYBAA8AmEzRVda2kGdsb2JhbACiHAgVAQEBAQkJDAcRAx+nWIk8ghSGay6IVQEBAwWFPASKOIVg X-IronPort-AV: E=Sophos;i="4.56,397,1280700000"; d="scan'208";a="68265577" Received: from mail-iw0-f182.google.com ([209.85.214.182]) by mail1-smtp-roc.national.inria.fr with ESMTP; 21 Sep 2010 09:50:36 +0200 Received: by mail-iw0-f182.google.com with SMTP id 34so7526272iwn.27 for ; Tue, 21 Sep 2010 00:50:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=5g1+4buGkwOJm+HUOIF+a3sdq3D1yhj20FwhLRGT29s=; b=MCcxtOlWNYmyEL8K8a019yGn/vCE5GG/6RbbuzJljnTXO/D/16U2NHZvdtpt13oYa0 YJ0yhEYrJYS8jlPk9GNrBGi3Kdn7AK6rafuLx3npJvz+LtyMkPk8nLSkYGproQCeG4Bu Fpn2k2KQC34ta/Eh8v3myQ3WwO7XJea2GndWo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Vd/HeDi/ktbJs+E0O48CI6JLFzFZcl+v2JdJeWYuRoD5oebTDSG8S94Rxo//MJjSPN n9S6QOE9QDk6ewh8JiusZMA3U90MiGOJBvE/YfS8grehAHsBWq9OOeiZnLt0JkhrWgzp 8wh8g9EeT5xsZ7h4lEMtXjw4YH5efJcY06wk8= MIME-Version: 1.0 Received: by 10.231.156.65 with SMTP id v1mr11800916ibw.107.1285055436557; Tue, 21 Sep 2010 00:50:36 -0700 (PDT) Received: by 10.231.212.216 with HTTP; Tue, 21 Sep 2010 00:50:36 -0700 (PDT) In-Reply-To: <20100919103258.GA14826@annexia.org> References: <20100919103258.GA14826@annexia.org> Date: Tue, 21 Sep 2010 09:50:36 +0200 Message-ID: Subject: Re: [Caml-list] web server interface for Ocaml ( like rack, wsgi, ...)? From: ben kuin To: Richard Jones , caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; ocaml:01 ocamlnet:01 compilation:01 ocaml:01 wikipedia:01 lambda:01 ocamlnet:01 threading:01 wrote:01 wrote:01 stack:01 caml-list:01 match:02 philosophy:02 env:03 > 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 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 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 >