Java Reference
In-Depth Information
Table A.1
Cross-reference of antipatterns by name
Name
Description
Solution
Symptoms
Location
1. Bad Workload
Management
Poor distribution of work occurs
when one server of a cluster gets
a disproportionate share of the
work.
Even load bal-
ancing, job parti-
tioning
Sporadic perfor-
mance and incon-
sistent
performance
across identically
configured serv-
ers
Chapter 10,
Section 10.4
2. Cacheless
Cow
Caches can be used to provide a
significant performance boost with
very little effort, but many develop-
ers neglect this basic enhance-
ment. Most Internet applications
take advantage of hardware and
web servers for caching of static
content, but caching of dynamic
content takes more time.
Dynamic com-
mand cache
Poor performance
Chapter 5,
all sections
3. Chaotic
Session
Management
Certain state management tech-
niques with distributed architec-
tures have different strengths and
weaknesses. Some alternatives
include dispatching with session
affinity, distributed state manage-
ment, stateful session bean state
management, and entity bean
state management. They can eas-
ily be misapplied.
Choose the right
tool for the job.
Understand the
problem domain
and the technol-
ogies that will
be applied to
the problem.
Improper choice
of technique can
result in poor per-
formance, diffi-
cult application
maintenance, and
difficult extensibil-
ity.
Chapter 10,
Section 10.5
4. Coarse or Fine
Commands
Commands can be divided too
coarsely or finely for optimal per-
formance, readability, or reuse.
Optimal com-
mand granularity
Poor reuse/poor
performance
Chapter 4,
Section 4.4
5. Compound
JSPs
When a command's execution can
lead to one of many pages being
returned to the user, sometimes a
programmer will express this deci-
sion logic in a JSP.
Push decision-
making into con-
trollers
Poor separation of
concerns
Chapter 4,
Section 4.3
6. Connection
Thrashing
When database connections are
created from scratch with each
new user connection, the perfor-
mance can be poor, because data-
base connection costs are
prohibitive. This antipattern can
happen for other connection types
as well.
Connection pool-
ing
Poor performance
Chapter 7,
Section 7.2
Search WWH ::




Custom Search