The Talon Manual

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To actually achieve high availability storage must be configured for the application. The primary means of storage is for Talon apps is through clustered replication to a backup instance. Talon also logs state changes to a disk based transaction log as a fallback mechanism. Storage and persistence can be enabled in the application's configuration xml. 

 

Code Block
xml
xml
<app name= "processor" mainClass= "com.sample.Application" >
   ...
   <storage enabled= "true" >
     ....
     <clustering enabled= "true" />
     <persistence enabled= "true" >
       <!--
         When using Xbuf encoded entities,
         detached persist is not supported.
         -->
       <detachedPersist enabled= "false" />
     </persistence>
  </storage>
</app>

 

Enabling clustering allows 2 applications of the same name to discover one another and form an HA cluster. When one or more instances of an application connect to one another one instance is elected as the primary via a leadership election algorithm. The primary member will establish messaging connections and begin invoking message handlers in your application. 

Enabling persistence causes the replication stream that is sent to backup instances to also be logged locally on disk to a transaction log file. The transaction log file can be used to recover application state from a cold start, and is also used to initialize new cluster members that connect to it so when clustering is enabled, persistence must be enabled as well. 

...