Wednesday, February 12, 2020

OSB Performance Tuning options

Oracle Service Bus can be used for Service Virtualization, Routing, Mediation, Validate, etc purposes. As Oracle service bus services are stateless, it helps the OSB services in terms of performance. There are various tuning options to improve the performance of a service like having proper thread managements(using work manager), leveraging Coherence cache, following best pratices in XQuery trasformations, etc. As part of this blog I would be covering some of the OSB XQuery tuning options.

1. Use absolute XPath in feasible places, as it is faster.
2. Avoid using wildcards in xpaths. Instead using appropriate namespaces will help in improving the performance. When appropriate namespaces are used the unwanted content can be ignored thereby improving the trasformation performance.
3. Assign read-only content that is part of a xml to a context variable,  if it needs to be used multiple times. Having it in the variable avoid the processing of the XPath to fetch the value every time.
4. Avoid use of double front slashes in XPaths
The double front slash // need to be used ONLY if the exact xpath is unknown. Because if // is used then the full xml object will be searched for finding the matching patterns by the XQuery processing engine. As the full xml object need to searched it will consume more time.
5. Use indexed XPaths
If you know of the exact position to pick the value from XML then specifying the indexes will make the processing faster. If index is not specified then it might take more time. This scenario applies when the exact position is known. For example if it is know that the second OR X occurence of element need to be picked.
6. Extract frequently used parts of a large XML document as intermediate variables within a FLWOR expression

I would continuosly update the blog with other OSB performance tuning options. Keep watching this blog for more updates.

No comments:

Post a Comment