Version française
Home     About     Download     Resources     Contact us    
Browse thread
Correct way of programming a CGI script
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Tom <tom.primozic@g...>
Subject: Correct way of programming a CGI script
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