[Gambas-devel] Gambas as a web server ...

Benoît Minisini gambas at ...1...
Fri Feb 6 13:34:00 CET 2009


> Hi,
>
> The "C" / threading side of things is not a problem .. I can code this in
> my sleep and indeed have a couple of working examples I've written for
> other projects .. the real questions are;
>
> a. Can Gambas be efficiently called from "C"
> b. Can Eval (which I've not played with) compile and run code fragments
> efficiently c. Is there an alternative to "Eval" for compiling / running
> code fragments that I should use instead
>
> Just wondered if anyone had any advance knowledge of this before I started
> experimenting ... ?
>
> Gareth.
>

Hi, Gareth.

I'm writing for my job a Web application in Gambas. It is "just" a CGI script 
plugged into a light web server. I use a patched thttpd, but lighttpd is well-
known too.

thttpd does not use thread to dispatch request. Apparently threaded server 
seems to always be slower than non-threaded ones. It is very fast, and I'm 
sure that my CGI script written in Gambas beats in speed many other web 
application. :-)

Try that, and if you find it too slow, of course writing a HTTP server in the 
same process as the gambas interpreter would be interesting. 

You will win the process launch time (even if launching a process on Linux is 
very fast). 

But then, just take the thttpd source code and merge it in a gambas component. 
I can't imagine writing a faster HTTP server.

P.S.: I don't receive my own post on the mailing-list anymore, since I 
installed KDE 4.2. But this should not be related, unless there is an hidden 
change in KMail. Hopefully, I receive posts from other people. If somebody has 
a clue...

Regards,

-- 
Benoît




More information about the Devel mailing list