> > Web applications should NEVER fork processes or create their own threads.
> > Period. Do this isn't safe in any environment, os, web server or
> > tool. You can see on the J2EE specs that Servlets and EJBs are expressly
> > prohibited from doing this.
> Is this true? I know lots of servelet developers (mostly using Tomcat) that
> do this all the time without encountering any problems. Could you point me
> to the part in the spec where it indicates that this is inappropriate?
The fact it worked for your friends using Tomcat doesn't mean it isn't wrong.
Take for example IE rendering of CSS attributes. I don't have the J2EE and
Servlet specs at hand to look at, but I'm sure I've read this.
Last year I was talking with Jetty developers (another open source web
container) and they realized they were'nt folowing the specs regarding to
authentication. The specs are a very long document and hot easy to read (or to
locate some specific info), so it's easy to misinterpret them or to forgive
somethg, but some (application) developers never bothered to read it. Just use
trial and error until "something works". :-)
I can't imagine how a web server cannot be affected by apps creating threads
and/or proccesses. Think about memmory use, resource pooling, syncronization
issues, ... remember a child process ot thread prevents the termination of its
parent (which may become a zombie on Unix systems, and a zombie still holds its
open file handles). If these child threads are buggy they could get to the
point the web server cannot accept new requests.
You may be lucky and never crash your server. But you may not be. The
difference between reliable and unreliabe system is the first ones don't leave
it to lucky, they impose rigid standard on coding practices and won't do things
that "just work".
s, Fernando Lozano
pgsql-general by date
|Next:||From: Ben||Date: 2004-01-30 21:06:46|
|Subject: Are there commands to enquire about table structure?|
|Previous:||From: Doug McNaught||Date: 2004-01-30 20:45:08|
|Subject: Re: Triggers, Stored Procedures, PHP. was: Re: PostgreSQL|