[music]
If you use business services that return results that do not change often
you can configure those business services to cache results,
it improves performance by reducing the network overhead
and also helps to improve scalability by reducing the load on the back-end servers,
you can define the time to live for the cached results.
Load balancing distributes workloads
across multiple computing resources,
it also aims to optimize resource use
and avoid overload of any single resource.
Here I am in Oracle JDeveloper and I am creating Service Bus application
with a Service Bus project.
This application will invoke a simple composite application
that returns a hello message.
First I add an HTTP adapter that requires a WSDL file
from the HelloBPEL1 composite.
The HelloBPEL1 endpoint returns a message that takes about six seconds to respond.
Here I am adding a pipeline with a proxy service to call the HTTP adapter.
This pipeline has to be exposed as a proxy service,
so I don't have to create the service by myself.
Once the components are wired,
I proceed to run the proxy service.
The Service Bus console opens,
I provide a name as a sample data
and wait for the response.
I confirm that a message is displayed.
I have to edit the external service to enable result caching.
I am setting a token expression based on the person's name
as the unique token for the cached entry.
Every time the request contains a name previously sent
within the time to live period, it has to return the cached result.
I am testing the result caching now.
The first request takes about six seconds to receive the response.
By running the proxy service again
including the same name in the request, it returns the cache result.
Now is time to add load balancing to the project.
Adding a second endpoint enables to balance the workload
on the external service.
I can choose from different load balancing algorithms.
I am running the service to test the load balancing by providing a name in the request.
This time I get a different message
because it used the second endpoint.
Once I send a new request, the result displays the first message
because it used the initial endpoint.
And that is how to configure caching and load balancing in Oracle Service Bus.
Thanks so much for watching.
[music]