Java Reference
In-Depth Information
between your systems. The Hardwired Connections antipattern deals with sev-
eral traditional technologies and decisions that may force a tighter coupling
than you'd like. Most connections fall in one of three families:
The transactional approach. For this one, transactional middleware—like
CICS , Encina, or Tuxedo—is used to execute a process on the target
system. A communications buffer is passed to serve as input or output
parameters. Sometimes, this approach is used to maintain additional
transactional integrity. Other times, the approach is used solely as a dis-
tributed RPC .
The message-based approach. For this approach, a sender ships a block of
data to a listener, who processes the message and decides how to react.
Messaging-oriented middleware and Internet architectures are examples
of this approach.
The RPC approach. With this approach, a distributed procedure call is
made, passing parameters through a predefined signature.
7.4.1
The communications buffer
In the past, the centerpiece for all three approaches has been the communica-
tions buffer , a block of data passed between two systems. We'd then map out
specific fields related to our interface. Figure 7.6 shows this strategy for a
credit card transaction. For a transactional system, we have a sender and a ded-
icated listener method that is synchronously fired with the communications
block. For a messaging equivalent, a sender routes the message to a waiting
listening process or thread, much like the HTTP server routes our PUT or GET
to a servlet on a web server. Setting the mechanism aside, we have a very simi-
lar solution. The listener must now parse the communications area, and the
format must be exact. Most interface changes have to occur simultaneously at
the client and server. While this approach has been very common, it is very
tightly coupled.
A good analogy is management style. Poor managers tend to delegate
poorly. They assign a task, and describe in excruciating detail how that task
must be done. This approach limits flexibility and hinders efficiency by locking
us out of more efficient solutions to the problem. The communications buffer
has many of the same problems. The request is bound to the delivery vehicle,
and the communications area is usually described in details beyond those
required to do the task.
Search WWH ::




Custom Search