Hi,

normally i like multithreading, but in this case i like the simple approach (at least for rendering the pages), because as application programmer (the guy who will develop the apps in javascript) its much easier if you dont have to think about locks, racing conditions and other pitfalls. and the rendering itself is (depending on what you do, of course) fast enough for me (simple pages need <10ms !). I want to multithread the upload to the client after all work is done. in my current implementation the complete server is blocked until the download is finished. in my logfiles i have entries with 25 minutes (see "http://greschenz.dyndns.org/logsByTime.html";) !!! thats really unacceptable !
could you mail me some samples howto multithread portable (linux & win32) ?

cu, gg


John Stanton schrieb:
Gunter,

I recently wrote a multi-threaded portable web server in simpl ANSI C. It uses Win32 threads or pthreads. It caches threads and re-uses them on a most recently used basis. Efficiency is obtained by using TransmitFile (Win32) or sendfile (Unix).

The logic is simple for an efficient, multi-threaded www server.

An added bonus of mutli-threading is that it takes advantage of the ability of a browser to open multiple concurrent connections and persistent connections.

My WWW server is set up as an application server, with embedded Sqlite and an embedded byte-coded metalanguage used to define DHTML pages. An associated compiler produces the byte code. By using compiled byte code the overhead of interpreting a script-type language is avoided.

Günter Greschenz wrote:
Hi,

yes i know, the problem is, its single-threaded (because of protability), so if anyone starts a download with a slow connection, the server is blocked for other connections.. im still thinking about this problem... single-threading whle rendering th pages and multithreading for sending them to the clients, or maybe async socket writes (is this possible in linux ?) but i've seen (in the logs :-) a lot of people are interested. its funny to sit at the console at home and see the log messages when anyone comes by... at the moment its just an alpha-version... but if i have more time (or maybe anyone helps me) it will improve ! the server itself is an i386-linux at ~ 300mhz, so dont expect too much ...


Fred Williams schrieb:

What'ch got it running on, a 286?  Tried three different times and got
tired waiting all three times :-(

Not going to stir much interest with response times like that!


-----Original Message-----
From: Günter Greschenz [mailto:[EMAIL PROTECTED]
Sent: Monday, October 09, 2006 12:04 PM
To: sqlite-users@sqlite.org
Subject: [sqlite] new sqlite-based webserver


hi,

i dont know if anyone is interested in my new open source project...
i implemented a little webserver with javascript as backend-language
(1.7 from mozilla 2.0.rc1) and sqlite as datastorage (3.3.7)
the server is serving himself on "http://greschenz.dyndns.org"; :-)
the source can be downloaded at
"http://greschenz.dyndns.org/download/gas/";
its compilable with gcc(linux) and vs2005(win32)

please send me any comments / ideas...

cu, gg



--------------------------------------------------------------
---------------
To unsubscribe, send email to [EMAIL PROTECTED]
--------------------------------------------------------------
---------------




-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------






-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to