[nycphp-talk] Web Services
Michael B Allen
ioplex at gmail.com
Tue Jan 15 13:21:56 EST 2008
On 1/15/08, Tim Gales <tgales at tgaconnect.com> wrote:
> Michael B Allen wrote:
> [...]
> > PHP is not Mathematica. It's primarily a template based system for
> > emitting text...
>
> Peter Yared (who gave a presentation back in '05) says many application
> servers are basically 'text pumps'
> http://peteryared.blogspot.com/2003/09/application-servers-2004-big-muffin-in.html
There's one major issue with "The Donut Architecture" being web
services which is that without a single lock to coordinate the efforts
of everyone you have a race-condition nightmare. It's very important
to realize that each service must check a state variable with a single
authority. A database is ideal for that because it implicitly provides
a lock.
Meaning, if you have web servers A, B and C and A does some work and
indicates to B that it can do some work and then B sends C some work
... etc then it becomes very difficult to stop or move things in the
workflow. The key is to use a state variable in the database and
always check it before performing the next job. Unfortunately most
people do not realize this and end up with systems that are very
difficult to control.
Application server technology is one big game of Whac-A-Mole.
Mike
--
Michael B Allen
PHP Active Directory SPNEGO SSO
http://www.ioplex.com/
More information about the talk
mailing list