Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Tuesday, April 26, 2011

Out-of-the-box Result Caching with Oracle Service Bus

On my previous post (http://rickyhp.blogspot.com/2011/04/creating-robust-scale-out-data.html), i have shared about Data Abstraction and Cache with Oracle Coherence. Today let's see how Oracle Service Bus can provide out-of-the-box data cache solution for your existing web services without changing any of your application's code.

Oracle Service Bus provides out-of-box caching mechanism using Oracle Coherence. You can use it to cache result from any Business Services.
This can dramatically improve performance if the response from the business service is relatively static.
Oracle Service Bus uses a single cache for all business services. Only valid/correct results from business services are cached.

For cache expiration, cached results have a time-to-live (TTL) attribute.
You can configure cache expiration either with the Expiration Time property in the Result Caching configuration on the business service or the cache-ttl element in the $transportMetaData using the proxy service message flow.

If Oracle Coherence finds that the TTL has expired, it flushes the cache, and the business service invokes the external service for a result. That result is then stored in the cache (if there is no error in the result), and the result is available in the cache so that it can be returned to the next request.

The following events illustrate how Oracle Service Bus/Coherence flush cache:

•Cache TTL has expired – Each cached result has its own TTL. When a TTL is reached, Oracle Coherence flushes that individual cached result.

•Disable result caching on a single business service – When you disable result caching on a business service, Oracle Service Bus triggers flushing of all cached results for that business service in Oracle Coherence.

•Update, Rename, or Delete a business service – If you update, rename, or delete a business services, Oracle Service Bus triggers flushing of all cached results for that business service from Oracle Coherence.

•Update dependent resource – When you update a dependent resource, such as a WSDL, Oracle Service Bus triggers flushing all cached results for that business service from Oracle Coherence. However, changes to the following dependent resources do not cause cache flushing: Service Provider, UDDI Registry, Alert Destination.

•Globally disable result caching – When you globally disable result caching, Oracle Service Bus triggers flushing the entire result cache (all cached results for all business services) from Oracle Coherence.

For details, please refer to below link:
http://download.oracle.com/docs/cd/E14571_01/doc.1111/e15867/configuringandusingservices.htm#OSBAG170

No comments: