From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=AWL,HTML_00_10,HTML_MESSAGE, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 26C90BC6B for ; Mon, 8 Oct 2007 17:08:55 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAOvkCUfAXQImh2dsb2JhbACCcYtSAgEICik X-IronPort-AV: E=Sophos;i="4.21,243,1188770400"; d="scan'208";a="2629440" Received: from discorde.inria.fr ([192.93.2.38]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Oct 2007 17:08:55 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l98F8sLd029399 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 8 Oct 2007 17:08:54 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAACblCUfRVca7mGdsb2JhbACCcYtSAgEBBwQGERY X-IronPort-AV: E=Sophos;i="4.21,243,1188770400"; d="scan'208";a="2447886" Received: from rv-out-0910.google.com ([209.85.198.187]) by mail1-smtp-roc.national.inria.fr with ESMTP; 08 Oct 2007 17:08:53 +0200 Received: by rv-out-0910.google.com with SMTP id f5so704203rvb for ; Mon, 08 Oct 2007 08:08:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=5K+xZzAMwQaFJiUU2H1KUbsk9Qk+1Yesk50gXEo82WE=; b=I5iy9cM+ejuUlNSkfI0wNpHVYPkXw17gNyeg5unabYpnhHBc9XErX1m1asJ1ouCBgn0PFombSLtySxOm366NhdlyKOJS43nU/uf5Rtn9n5lyQhhLNP+8vN/I0PgQ3O/qPtJ2Dl2Pnk/olZp1HIvb3wlhJFizxUuJMRUl0B1+JPs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=qQRG4PQ9m0mFs/YO5cg9wl22f1I0lh2MLwA/+RwTykR5q2DRl2jkMrzxUJ2LSsF/jm2/gdFFCRBPh6rfLIeSOchUjrxuBqXACVp/F43bN+cKDMuy8q6ZKrtzzMzF4E/3FbsDKjzzCjjHrAKKpN6fPMAe7ZTmUU/5krSKIh9IpoY= Received: by 10.140.148.3 with SMTP id v3mr2917974rvd.1191856127600; Mon, 08 Oct 2007 08:08:47 -0700 (PDT) Received: by 10.141.83.10 with HTTP; Mon, 8 Oct 2007 08:08:47 -0700 (PDT) Message-ID: Date: Mon, 8 Oct 2007 17:08:47 +0200 From: Tom To: "Caml-list List" Subject: Correct way of programming a CGI script MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_21257_11628608.1191856127534" X-Miltered: at discorde with ID 470A4806.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; caching:01 ocaml:01 ocaml:01 caching:01 short:01 short:01 strings:01 strings:01 data:02 data:02 implemented:02 implemented:02 string:02 string:02 languages:03 X-Attachments: cset="UTF-8" cset="UTF-8" ------=_Part_21257_11628608.1191856127534 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! I am in a process of making a website (which might receive substantial amounts of traffic), and am considering options for the backend. I discarded PHP and other similar server-side scripting languages, due to performance problems (I suspect that PHP and similar could not scale well, unless I implemented complex caching techniques). I plan to use OCaml to generate static .html documents from the content from the database. Since the content will probably change not as often as it will be accessed, I believe this is the better way (as opposed to accessing the database every time a user wants to load the page). So, OCaml programs will only be run seldomly to access the database and generate HTML files, using the data fetched from the DB. However, I am still worried whether this would cause too much performance impact. I heard that OCaml is particularly slow (and probably memory-inefficient) when it comes to string manipulation. What is the preferred way in handling strings (building long strings from short parts - something StringBuilder would be used in Java)? Does anybody have any experience concerning this kind of applications? What about the startup time and memory usage of the program? Could these affect the stability and efficiency of the web server? (Hope someone will be able to decipher my language and care to answer :P ) - Tom ------=_Part_21257_11628608.1191856127534 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! I am in a process of making a website (which might receive substantial amounts of traffic), and am considering options for the backend. I discarded PHP and other similar server-side scripting languages, due to performance problems (I suspect that PHP and similar could not scale well, unless I implemented complex caching techniques). I plan to use OCaml to generate static .html documents from the content from the database. Since the content will probably change not as often as it will be accessed, I believe this is the better way (as opposed to accessing the database every time a user wants to load the page).

So, OCaml programs will only be run seldomly to access the database and generate HTML files, using the data fetched from the DB. However, I am still worried whether this would cause too much performance impact.

I heard that OCaml is particularly slow (and probably memory-inefficient) when it comes to string manipulation. What is the preferred way in handling strings (building long strings from short parts - something StringBuilder would be used in Java)? Does anybody have any experience concerning this kind of applications?

What about the startup time and memory usage of the program? Could these affect the stability and efficiency of the web server?

(Hope someone will be able to decipher my language and care to answer :P )

 - Tom
------=_Part_21257_11628608.1191856127534--