Chapter 7. Using Web services 181
As a performance rule, the service designer should strive to publish coarse
grained services that accept all necessary parameters and information, thereby
allowing the service provider to accomplish as much as possible on behalf of the
consuming application. The goal is to minimize the number of requests that a
consumer makes in order to accomplish a set of business tasks. A minimum
number of requests ensures minimal effects due to network latency, system I/O,
and thread or process wait states that when aggregated with multiple requests
can result in significant delays.
For example, in case of a purchase order service, it is a good idea to allow the
consumer to specify product SKU numbers, quantities, credit or debit card
information, billing and shipping address information, and discount coupons all
within a single request. The request itself may initiate multiple atomic
transactions (credit card authorization, submission of charges, inventory query
and update, and order fulfillment) at the service provider that can each be
undone or reversed if needed while supporting the overall business process.
WebSphere Application Server V5.1 has introduced many enhancements on the
performance side for the Web services so that migration to the latest release can
improve performance with a factor that can vary from two to four. It has also
added a cache capability for Web services called the
WebSphere dynamic cache
service
. For those cases where it is applicable, Web services performance using
the dynamic cache is greatly augmented.
The cache mechanism needs a unique identifier to recognize which service
requests can be served by the same reply. The tools let the user specify this
identifier from Web services specific component, s including:
???? SOAP Action
???? SOAP Envelope
???? Servlet path (in the JSR 109 case, this refers to a port-component)
???? SOAP operation (requires parsing of the SOAP message)
???? SOAP operation parameters (requires parsing of SOAP message)
An essential tool is Tivoli® Performance Monitor that is packaged with
WebSphere Application Server. This tool receives performance data from the
application server and plots performance graphics at run-time (see Figure 7-7 on
page 182).