AgileApps Support Wiki Pre Release

Difference between revisions of "Configuring Ehcache"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 17: Line 17:
   <o:LastAuthor>Teja K R, Pranay</o:LastAuthor>
   <o:LastAuthor>Teja K R, Pranay</o:LastAuthor>
   <o:Revision>2</o:Revision>
   <o:Revision>2</o:Revision>
   <o:TotalTime>21</o:TotalTime>
   <o:TotalTime>35</o:TotalTime>
   <o:Created>2016-09-30T05:44:00Z</o:Created>
   <o:Created>2016-09-30T06:35:00Z</o:Created>
   <o:LastSaved>2016-09-30T05:44:00Z</o:LastSaved>
   <o:LastSaved>2016-09-30T06:35:00Z</o:LastSaved>
   <o:Pages>3</o:Pages>
   <o:Pages>3</o:Pages>
   <o:Words>678</o:Words>
   <o:Words>698</o:Words>
   <o:Characters>3865</o:Characters>
   <o:Characters>3979</o:Characters>
   <o:Company>Software AG</o:Company>
   <o:Company>Software AG</o:Company>
   <o:Lines>32</o:Lines>
   <o:Lines>33</o:Lines>
   <o:Paragraphs>9</o:Paragraphs>
   <o:Paragraphs>9</o:Paragraphs>
   <o:CharactersWithSpaces>4534</o:CharactersWithSpaces>
   <o:CharactersWithSpaces>4668</o:CharactersWithSpaces>
   <o:Version>14.00</o:Version>
   <o:Version>14.00</o:Version>
  </o:DocumentProperties>
  </o:DocumentProperties>
Line 1,070: Line 1,070:
style='font-family:"Times New Roman","serif";mso-fareast-font-family:"Times New Roman";
style='font-family:"Times New Roman","serif";mso-fareast-font-family:"Times New Roman";
color:black;mso-ansi-language:EN-IN;mso-fareast-language:EN-IN'>The data is
color:black;mso-ansi-language:EN-IN;mso-fareast-language:EN-IN'>The data is
stored in Ehcache using </span><a
stored in Ehcache using </span><span lang=EN-IN style='font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-IN;mso-fareast-language:
EN-IN'>lazy loading<span style='color:black'> </span>mechanism. For more
information on lazy loading, see </span><a
href="https://www.techopedia.com/definition/16379/lazy-loading"><span
href="https://www.techopedia.com/definition/16379/lazy-loading"><span
lang=EN-IN style='font-family:"Times New Roman","serif";mso-fareast-font-family:
lang=EN-IN style='font-family:"Times New Roman","serif";mso-fareast-font-family:
"Times New Roman";mso-ansi-language:EN-IN;mso-fareast-language:EN-IN'>lazy
"Times New Roman";mso-ansi-language:EN-IN;mso-fareast-language:EN-IN'>lazy
loading</span></a><span lang=EN-IN style='font-family:"Times New Roman","serif";
loading</span></a><span lang=EN-IN style='font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";color:black;mso-ansi-language:EN-IN;
mso-fareast-language:EN-IN'> </span><span lang=EN-IN style='font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-IN;mso-fareast-language:
mso-fareast-font-family:"Times New Roman";mso-ansi-language:EN-IN;mso-fareast-language:
EN-IN'>mechanism.<span style='color:black'> When the metadata is required, the
EN-IN'>.<span style='color:black'> When the metadata is required, the platform
platform checks the availability in Ehcache. The information is retrieved if information
checks the availability in Ehcache. The information is retrieved if information
is available in Ehcache. If the information is not available in Ehcache, a
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
database read is performed. If the information is available from database, information
Line 1,107: Line 1,108:
<p class=MsoNormal><span lang=EN-IN style='font-family:"Times New Roman","serif";
<p class=MsoNormal><span lang=EN-IN style='font-family:"Times New Roman","serif";
mso-fareast-font-family:"Times New Roman";color:black;mso-ansi-language:EN-IN;
mso-fareast-font-family:"Times New Roman";color:black;mso-ansi-language:EN-IN;
mso-fareast-language:EN-IN'>To know more on Configuring Ehcache using
mso-fareast-language:EN-IN'>For more information on Configuring Ehcache using
Terracotta Server Array, see </span><a
Terracotta Server Array, see </span><a
href="http://terracotta.org/documentation/3.7.4/enterprise-ehcache/configuration-guide"><span
href="http://terracotta.org/documentation/3.7.4/enterprise-ehcache/configuration-guide"><span
Line 1,288: Line 1,289:
style='mso-list:Ignore'>b.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
style='mso-list:Ignore'>b.<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span></span><![endif]><span style='font-family:"Times New Roman","serif"'>There
</span></span></span><![endif]><span style='font-family:"Times New Roman","serif"'>There
is no custom eviction policy implemented. </span><a
is no custom eviction policy implemented. Least Recently Used is used. For more
information on Least Recently Used, see </span><a
href="http://mcicpc.cs.atu.edu/archives/2012/mcpc2012/lru/lru.html"><span
href="http://mcicpc.cs.atu.edu/archives/2012/mcpc2012/lru/lru.html"><span
style='font-family:"Times New Roman","serif"'>Lease Recently Used</span></a><span
style='font-family:"Times New Roman","serif"'>Least Recently Used</span></a><span
style='font-family:"Times New Roman","serif"'> is used. These are configurable
style='font-family:"Times New Roman","serif"'>. These are configurable through
through the configuration XMLs from terracotta.<o:p></o:p></span></p>
the configuration XMLs from terracotta.<o:p></o:p></span></p>


<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;mso-list:l6 level1 lfo6'><![if !supportLists]><span
<p class=MsoListParagraphCxSpMiddle style='text-indent:-.25in;mso-list:l6 level1 lfo6'><![if !supportLists]><span

Revision as of 06:36, 30 September 2016

<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>