Saturday, November 14, 2015

SOA 12.2.1 Quick look at Using In-Memory SOA to Improve System Performance

From this release SOA supports use of Coherence cache for persisting BPEL instances ,, as compared to database. This feature is controlled by using the property bpel.config.completionPersistPolicy for the process. The values for this property is immediate, deferred and faulted. This property specifies when the bpel instance can be moved to database from coherence cache. Immediate as the name suggests means the instance will not be stored in memory at all, deferred implies that the instance will be persisted later, by a background thread which runs at an interval of  5 minutes by default and faulted means only faulted instances will be persisted.
Read more here.Oracle Guide

Please note that in earlier releases we had a similar feature but the difference was when the instance was not saved in memory at all. We could decide when the instance details could be saved to database and how it could be saved. Also it was only applicable for transient process and was used in conjuction with inmemoryoptimization.

·         completionPersistLevel BPEL Property : This property controls the type and amount of data persisted after instance completion. By Default, all state (including variable values) are saved; this property can be set to save only instance metadata information. This property is valid only for Transient Processes.

Note: This property is used only when the inMemoryOptimization is set to true.

Values:

-          all (default): Oracle BPEL saves the complete instance, including the final variable values, work item data and audit data.
-          instanceheader: Oracle BPEL manager saves only the instance metadata.

Impact:

Ø  This property can greatly impact the database growth.
Ø  It can also impact the throughput (due to reduced I/O)

·         completionPersistPolicy BPEL Property :This property controls if and when to persist instances. If an instance is not saved, it does not appear in Oracle BPEL Control. This property is applicable to transient BPEL processes.

Note: This property is used only when the inMemoryOptimization is set to true.

Values:

-          on (default): Completed instances are saved normally.
-          deferred: Completed instances are saved in a difference thread and in a different transaction. If a server fails, some instances may not be saved.
-          Faulted:  Only faulted instances are saved.
-          Off: No instances (and their data) are saved.

Impact:

Ø  This property can greatly impact the database growth.

Ø  It can also impact the throughput (due to reduced I/O)


Following is an easy way to test the use of memory persistence in SOA Suite 12.2.1.


  1. Create a simple BPEL process. When creating the process choose the property deferred in the in memory SOA . 
  2. Notice that the source of composite.xml has the property listed under the bpel process.
  3. My bpel process just concats the input with hello and returns back the output.
  4. Before deploying this process we need to set the inMemoryEnvironment property to true from em console. Navigate to SOA-Infra->Administration->Common Properties->More SOA Infra advanced property.

  5. Deploy this BPEL process and Test it from SOAP-UI. Note that instance id is generated immediately but the instance is not available in the EM console. I fired the instance at approximately 9:00 PM. InstanceId is 30030.
  6. Checked the EM console and the instance was not available after two minutes.
  7. The instance was available after 5 minutes at 9:05 PM.

Hence we see that the process is being persisted in the DB after a five minutes of interval , helping to increase the performance.




No comments:

Post a Comment