SCA asynchronous invocation styles performance penalty to keep in mind
Mykyta_Kostovskyy 270000N0GT Visits (7628)
Today I would like to post my first blog entry in IBM.
Let me first introduce myself. My name is Mykyta Kostovskyy and have been working for 3 years in the WebSphere Business Integration (WBI) support team for WebSphere Process Server (WPS). My job responsibility is to interact and solve technical problems on the edge of business integration and business process management solutions.
I will blog mainly on WebSphere topics, especially I will write a lot on Security, Performance, and WBI Know-How.
So let's start! Today I will talk to you about interaction styles in the Service Component Architecture (SCA) layer. During my experience with different customer scenarios I have noticed the common pattern that most of the logic is written in an asynchronous way in SCA. This might be very useful as of fail-safety, because all the data is getting persisted to the database after each hop between elements. But this action has its price. In my tests, response time was about 10 times longer and throughput was about 9 times slower as for synchronous invocations.
It is hard to talk here about exact results for performance that you might see on your system, so I would recommend that you test this on your system with such a scenario:
Use Stand-Alone JSP or Web Service export binding to invoke your flow and in the middle put the process with defined asynchronous invoke QoS qualifier. Then do the same by changing from asynchronous to synchronous. You will see that the asynchronous call takes 10 times more time as one synchronous call, this is caused due to persistence routines made during the communication between components.
Anticipating your flows
please take into account the following parameters of performance:
So here are the suggestions from my side:
In a future blog post, I will prepare a test flow to demonstrate the flow performance and will keep you updated with the details of my findings and experience.
Conclusion: Each time you are implementing the flow, please keep in mind the above factor 10 speed penalty with asynchronous invocations. Simple flows and straight routine work can be implemented monolithic through synchronous calls and single transaction. Of course do not forget about compensations if non-XA resources used!
Some links that may help to understand the internals better: