Skip site navigation (1) Skip section navigation (2)

Re: Triggers, Stored Procedures, PHP. was: Re: PostgreSQL

From: listas(at)lozano(dot)eti(dot)br
To: "Rick Gigger" <rick(at)alpinenetworking(dot)com>,<listas(at)lozano(dot)eti(dot)br>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>,"Randolf Richardson" <rr(at)8x(dot)ca>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Triggers, Stored Procedures, PHP. was: Re: PostgreSQL
Date: 2004-01-30 21:00:38
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-general

> > Web applications should NEVER fork processes or create their own threads.
> > Period. Do this isn't safe in any environment, os, web server or
> development
> > 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: BenDate: 2004-01-30 21:06:46
Subject: Are there commands to enquire about table structure?
Previous:From: Doug McNaughtDate: 2004-01-30 20:45:08
Subject: Re: Triggers, Stored Procedures, PHP. was: Re: PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group