Our current application has to talk with a SAP PI layer, in the form of SOAP style services. Unfortunately, this services layer, does not implement any form of caching, leading to high response times, even for subsequent requests. We think we are down to two options to solve this problem. Note that these are HTTP POSTs.
We would like to know, if anyone has any experiences with either approaches, or when faced with a similar situation, how would you solve it
Before you run down the path of working out your caching mechanism, keep in mind what services and processes (SOA and BPM) are about. They're designed to abstract away the actual implementation of some sort of business functionality behind a standards-based interface.
When you say there are high response times, have you analysed what the source of the delay is?
The services and processes you are invoking are meant to be treated as black boxes, i.e. you shouldn't have to know what happens behind the covers, only that it's performing the function you asked it to do.
However, if you implement caching, you are making the assumption that the services you are calling have no side effects such as updating data, keeping an audit trail, notifying other parties or systems of an event, etc. So even if you find a technical way of implementing your caching requirement, you might actually be undermining the service implementation. To your application it will look OK, but you could be impacting other systems or processes that you are not aware of.
If you are confident that you know what you are doing then by all means look at caching. Implementing it in your application by storing the response object would probably be fastest but would not be usable by other applications, so the performance benefit will be localised. If you go this approach, you may still want to consider building a mechanism for selective caching rather than applying to all.
Some ESBs and even XML gateways/appliances have caching capabilities. I know the IBM DataPower devices, for example, have document caching capabilities where you can control which services/URLs are cached, and what sort of time-to-live those cached copies have. This approach has the advantage of offering all consumers of the SAP services the same performance increases you're looking for.
Also keep in mind that caching will increase memory consumption, so if you don't approach it carefully you could cause your application, or the ESB or whatever you implement it with, to run out of memory. DataPower seemed to have the unfortunate habit of just resetting itself without telling anyone when we ran into this problem on a project! :)
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With