A
Arved Sandstrom
And it's simply amazing how many of them work and how few bugs haveArne said:Threads can somewhat be avoided in desktop apps, but threads
are usually unavoidable in server apps.
Arne
anything to do with concurrency even though *everything* is running in a
multi-threaded environment.
At one client site where I have been for about a year and a half the
developers, internal and external, have probably fixed over a thousand
defects in that time. In two fairly good-sized J2EE apps. Not one - I
repeat, not one - defect has had anything to do with concurrency issues.
Good thing I didn't read that Sun blurb - I might have avoided working
with J2EE at all.
For that same client I wrote a moderately complex inherently
multi-threaded socket server that went into production over a year ago.
It has had no unscheduled downtime, and has had less than five defects
logged against it, none of them serious, and none of them having
anything to do with concurrency problems. Good thing I didn't read that
Sun blurb first - I would have avoided java.util.concurrent classes like
the plague, because none of them could possibly have worked well.
While working for an employer back about 7 or 8 years ago I was in
charge of the in-house servlet engine, which was partially written in C
but mostly in Java. Plenty of multi-threading happening there. Given how
incredibly difficult writing this kind of code is, according to Sun, I'm
amazed at how few concurrency problems we had back then. We must have
just lucked out, I guess.
The stated intent of JCIP, and other books like it, is to arm developers
with the information they need to write reliable and maintainable
concurrent apps. Clearly a fair few people are able to do precisely
that. So are the authors of JCIP, and all those programmers out there
who have actually demonstrably written reliable and maintainable
concurrent applications, all full of it? I don't think so.
AHS