AgileApps Support Wiki Pre Release

Configuring Ehcache

From AgileApps Support Wiki
Revision as of 06:36, 30 September 2016 by imported>Aeric

<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <meta name=ProgId content=Word.Document> <meta name=Generator content="Microsoft Word 14"> <meta name=Originator content="Microsoft Word 14"> <link rel=File-List href="Configuring%20Ehcache%20for%20AgileApps-updated_files/filelist.xml"> <link rel=dataStoreItem href="Configuring%20Ehcache%20for%20AgileApps-updated_files/item0001.xml" target="Configuring%20Ehcache%20for%20AgileApps-updated_files/props002.xml"> <link rel=themeData href="Configuring%20Ehcache%20for%20AgileApps-updated_files/themedata.thmx"> <link rel=colorSchemeMapping href="Configuring%20Ehcache%20for%20AgileApps-updated_files/colorschememapping.xml"> <style> </style> </head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>

Ehcache for AgileApps<o:p></o:p>

Ehcache is a high-performance and distributed-object caching system that minimizes user response time by storing metadata and application information required by programs running on an application server.<o:p></o:p>

The platform uses Ehcache to store metadata and metadata can be retrieved from the cache without accessing database. For example, object and field definitions, layout definitions, data policies, and so on. However, customer’s transaction data is not stored in Ehcache and it is retrieved from the database.<o:p></o:p>

The data is stored in Ehcache using lazy loading mechanism. For more information on lazy loading, see <a href="https://www.techopedia.com/definition/16379/lazy-loading">lazy loading</a>. When the metadata is required, the platform checks the availability in Ehcache. The information is retrieved if information is available in Ehcache. If the information is not available in Ehcache, a database read is performed. If the information is available from database, information is then loaded and stored in Ehcache for further uses, making the search easier and faster. When the metadata is modified due to configuration changes, the modified entry is removed from Ehcache.<o:p></o:p>

Configuring Ehcache<o:p></o:p>

Select Ehcache while installing AgileApps. Ehcache can be configured only after the AgileApps installation is complete. To configure Ehcache, use ehcache.xml file located in {install_dir}/tomcat/conf/RN directory.<o:p></o:p>

New custom cache can be configured with a unique name. Once the custom cache is configured, the CacheName parameter in {install_dir}/tomcat/conf/RN directory/networking.properties must be set to this custom name of the cache.<o:p></o:p>

For more information on Configuring Ehcache using Terracotta Server Array, see <a href="http://terracotta.org/documentation/3.7.4/enterprise-ehcache/configuration-guide">Distributed Ehcache Configuration Guide</a>.<o:p></o:p>

Note: It is mandatory to select Ehcache or Memcached during AgileApps installation.<o:p></o:p>

ehcache.xml<o:p></o:p>

ehcache.xml is the file used to configure Ehcache in AgileApps. It can be modified manually. In case of distributed environment:<o:p></o:p>

<![if !supportLists]>1.      <![endif]>Modification should be made to the ehcache.xml file for all servers.<o:p></o:p>

<![if !supportLists]>2.      <![endif]>Shut down all the servers before applying modifications.<o:p></o:p>

<![if !supportLists]>3.      <![endif]>Restart the servers.<o:p></o:p>

Important: <o:p></o:p>

<![if !supportLists]>·         <![endif]>Install all instances of AgileApps with same version if AgileApps is running on a distributed environment.<o:p></o:p>

<![if !supportLists]>·         <![endif]>Caches do not synchronize if Ehcache configuration is different for different instances. <o:p></o:p>

<![if !supportLists]>·         <![endif]>Changing the Ehcache configuration requires a restart of all application servers.<o:p></o:p>

<o:p> </o:p>

Frequently asked questions<o:p></o:p>

<![if !supportLists]>1.      <![endif]>How are the contents of the cache restored if AgileApps servers are intentionally shut down or the caches crash? <o:p></o:p>

If the AgileApps servers are shut down, the cached data is stored on a Terracotta Server Array provided the setup and cache is on a distributed environment.<o:p></o:p>

<![if !supportLists]>1.      <![endif]>How do I flush Ehcache to refresh the cached data?<o:p></o:p>

<![if !supportLists]>a.       <![endif]>Restart the application server if AgileApps is running on a stand-alone setup or on a non-distributed setup.<o:p></o:p>

<![if !supportLists]>b.      <![endif]>Restart the application server and the Terracotta Server Array if AgileApps is running on a distributed setup.<o:p></o:p>

<![if !supportLists]>2.      <![endif]>What are the use cases of Terracotta Server Array? <o:p></o:p>

<![if !supportLists]>a.       <![endif]>If AgileApps platform is on a distributed setup, metadata resides in the caches and the caches are backed by Terracotta Server Array. If the caches do not synchronize, then a particular node of AgileApps platform is working on stale data. <o:p></o:p>

<![if !supportLists]>b.      <![endif]>Terracotta Server Array provides distributed caching functionality to the Case Collision use case or an advanced use case as Case Collision use case requires cache shared with the application servers.<o:p></o:p>

<![if !supportLists]>c.       <![endif]>The session management for failovers depends on distributed cache. Terracotta Server Array provides support to the caching mechanism.<o:p></o:p>

<![if !supportLists]>3.      <![endif]>Does the cache contain metadata of applications and metadata of application’s business instance data?<o:p></o:p>

It is largely the metadata of applications and not any transaction data or application’s business instance data.<o:p></o:p>

<![if !supportLists]>4.      <![endif]>Are the cache managers using strong consistency or eventual consistency? Is there a custom eviction policy implemented?<o:p></o:p>

<![if !supportLists]>a.       <![endif]>Strong consistency is used, as application metadata and the user or team information does not change at a fast rate. <o:p></o:p>

<![if !supportLists]>b.      <![endif]>There is no custom eviction policy implemented. Least Recently Used is used. For more information on Least Recently Used, see <a href="http://mcicpc.cs.atu.edu/archives/2012/mcpc2012/lru/lru.html">Least Recently Used</a>. These are configurable through the configuration XMLs from terracotta.<o:p></o:p>

<![if !supportLists]>5.      <![endif]>Are there any off-heap requirements for EHCache in AgileApps?<o:p></o:p>

The Ehcache.xml provided during AgileApps installation does not have off-heap configuration and none are required.<o:p></o:p>

<o:p> </o:p>

                              <o:p></o:p>

<o:p> </o:p>

<o:p> </o:p>

<o:p> </o:p>

<o:p> </o:p>

<o:p> </o:p>

<o:p> </o:p>

<o:p> </o:p>

</body>

</html>