08.06.2014 Views

Download PDF (1.3 MB) - IBM Redbooks

Download PDF (1.3 MB) - IBM Redbooks

Download PDF (1.3 MB) - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Minimizing cross-component asynchronous invocations within a<br />

module<br />

Asynchronous invocations are intended to provide a rich set of qualities of service, including<br />

transactions, persistence, and recoverability. Therefore, think of an asynchronous invocation<br />

as a full messaging hop to its target. When the intended target of the invocation is in the same<br />

module, a synchronous invocation yields better performance.<br />

Some qualities of services (such as event sequencing and store-and-forward) can only be<br />

associated with asynchronous SCA calls. Consider the performance impact of asynchronous<br />

invocations when setting these qualities of service.<br />

Performance considerations for asynchronous invocation of<br />

synchronous services in a FanOut/FanIn block<br />

Do not select asynchronous (deferred response interaction) service invocations for services<br />

with synchronous bindings (for example, web services) unless there is an overriding need and<br />

the non-performance implications for this style of invocation are understood.<br />

Apart from the performance implications of calling a synchronous service asynchronously,<br />

you must consider reliability and transactional aspects. Generally, use asynchronous callouts<br />

only for idempotent query type services. If you need to guarantee that the service is called<br />

only once, do not use asynchronous invocation. Provide complete guidance on the functional<br />

applicability of using asynchronous callouts in your mediation flow is beyond the scope of this<br />

paper.<br />

More information is in the Integration Designer help documentation and Business Process<br />

Manager V8.0 Information Center:<br />

http://pic.dhe.ibm.com/infocenter/dmndhelp/v8r0mx/index.jsp?topic=%2Fcom.ibm.wbpm.<br />

main.doc%2Fic-homepage-bpm.html<br />

Assuming that asynchronous callouts are functionally applicable for your configuration, there<br />

might be a performance reason for starting a service in this style. However, understand that<br />

asynchronous processing is inherently more expensive in terms of processor cycles because<br />

of the additional messaging resources incurred by calling a service this way.<br />

Additional operational considerations in choosing synchronous or asynchronous mode might<br />

apply. For example, asynchronous invocations use the service integration bus messaging<br />

infrastructure, which in turn uses a database for persistence. Synchronous invocations<br />

perform well with basic tuning of the JVM heap size and thread pools, but for asynchronous<br />

invocations, SCA artifacts require review and tuning. This requirement includes tuning the<br />

SCA messaging engine (see 4.3.7, “Messaging engine properties” on page 56), data sources<br />

(see 4.3.6, “Java Database Connectivity data source parameters” on page 55), and the<br />

database itself. For the data source, the tuning for JMS bindings in this paper can provide<br />

guidance as the considerations are the same.<br />

If multiple synchronous services with large latencies are called, asynchronous invocations<br />

can reduce the overall response time of the mediation flow, but at the expense of increasing<br />

the internal response time of each individual service call. This reduction of overall response<br />

time and increase of internal response time assume that asynchronous callouts are<br />

configured with parallel waiting in the FanOut section of the flow under the following<br />

conditions:<br />

►<br />

►<br />

With iteration of an array when configuring the FanOut to check for asynchronous<br />

responses after all or N messages are fired<br />

With extra wires or FlowOrder primitive (by default)<br />

Chapter 3. Development best practices 41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!