Difference between revisions of "Configuring Ehcache"

From AgileApps Support Wiki
imported>Aeric
(Created page with "<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....")
 
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>6</o:TotalTime>
   <o:TotalTime>21</o:TotalTime>
   <o:Created>2016-09-30T04:22:00Z</o:Created>
   <o:Created>2016-09-30T05:44:00Z</o:Created>
   <o:LastSaved>2016-09-30T04:22:00Z</o:LastSaved>
   <o:LastSaved>2016-09-30T05:44:00Z</o:LastSaved>
   <o:Pages>3</o:Pages>
   <o:Pages>3</o:Pages>
   <o:Words>677</o:Words>
   <o:Words>678</o:Words>
   <o:Characters>3865</o:Characters>
   <o:Characters>3865</o:Characters>
   <o:Company>Software AG</o:Company>
   <o:Company>Software AG</o:Company>
   <o:Lines>32</o:Lines>
   <o:Lines>32</o:Lines>
   <o:Paragraphs>9</o:Paragraphs>
   <o:Paragraphs>9</o:Paragraphs>
   <o:CharactersWithSpaces>4533</o:CharactersWithSpaces>
   <o:CharactersWithSpaces>4534</o:CharactersWithSpaces>
   <o:Version>14.00</o:Version>
   <o:Version>14.00</o:Version>
  </o:DocumentProperties>
  </o:DocumentProperties>
Line 43: Line 43:
<!--[if gte mso 9]><xml>
<!--[if gte mso 9]><xml>
  <w:WordDocument>
  <w:WordDocument>
  <w:SpellingState>Clean</w:SpellingState>
  <w:GrammarState>Clean</w:GrammarState>
   <w:TrackMoves>false</w:TrackMoves>
   <w:TrackMoves>false</w:TrackMoves>
   <w:TrackFormatting/>
   <w:TrackFormatting/>
Line 354: Line 352:
mso-font-pitch:variable;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:Cambria;
panose-1:2 4 5 3 5 4 6 3 2 4;
mso-font-charset:0;
mso-generic-font-family:roman;
mso-font-pitch:variable;
mso-font-signature:-536870145 1073743103 0 0 415 0;}
@font-face
@font-face
{font-family:Calibri;
{font-family:Calibri;
Line 549: Line 554:
mso-themecolor:accent1;
mso-themecolor:accent1;
font-weight:bold;}
font-weight:bold;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
.MsoChpDefault
.MsoChpDefault
{mso-style-type:export-only;
{mso-style-type:export-only;
Line 1,042: Line 1,044:
<div class=WordSection1>
<div class=WordSection1>


<h1><span style='font-size:11.0pt;line-height:115%;font-family:"Times New Roman","serif";
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span
color:windowtext'>Ehcache for AgileApps<o:p></o:p></span></h1>
style='font-size:13.0pt;line-height:115%;font-family:"Cambria","serif";
mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin'>Ehcache for
AgileApps<o:p></o:p></span></b></p>


<p class=MsoNormal style='margin-top:4.8pt;margin-right:0in;margin-bottom:6.0pt;
<p class=MsoNormal style='margin-top:4.8pt;margin-right:0in;margin-bottom:6.0pt;
Line 1,071: Line 1,075:
"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'>mechanism.<span style='color:black'> When the metadata is required, the
platform checks the availability in Ehcache. The information is retrieved if information
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
is available in Ehcache. If the information is not available in Ehcache, a
Line 1,080: Line 1,086:
the modified entry is removed from Ehcache.<span style='color:black'><o:p></o:p></span></span></p>
the modified entry is removed from Ehcache.<span style='color:black'><o:p></o:p></span></span></p>


<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Times New Roman","serif";
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span
color:windowtext'>Configuring Ehcache<o:p></o:p></span></h2>
style='font-size:13.0pt;line-height:115%;font-family:"Cambria","serif";
mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin'>Configuring
Ehcache<o:p></o:p></span></b></p>


<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";
Line 1,113: Line 1,121:
installation.<o:p></o:p></span></p>
installation.<o:p></o:p></span></p>


<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Times New Roman","serif";
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span
color:windowtext'>ehcache.xml<o:p></o:p></span></h2>
style='font-size:13.0pt;line-height:115%;font-family:"Cambria","serif";
mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin'>ehcache.xml<o:p></o:p></span></b></p>


<p class=MsoNormal><span class=GramE><span style='font-family:"Times New Roman","serif"'>ehcache.xml</span></span><span
<p class=MsoNormal><span style='font-family:"Times New Roman","serif"'>ehcache.xml
style='font-family:"Times New Roman","serif"'> is the file used to configure
is the file used to configure Ehcache in AgileApps. It can be modified
Ehcache in AgileApps. It can be modified manually. In case of distributed
manually. In case of distributed environment:<o:p></o:p></span></p>
environment:<o:p></o:p></span></p>


<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l1 level1 lfo3'><![if !supportLists]><span
<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l1 level1 lfo3'><![if !supportLists]><span
Line 1,142: Line 1,150:


<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span
style='font-family:"Times New Roman","serif"'>Important: <o:p></o:p></span></b></p>
style='font-size:13.0pt;line-height:115%;font-family:"Cambria","serif";
mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin'>Important: <o:p></o:p></span></b></p>


<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l4 level1 lfo1'><![if !supportLists]><span
<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l4 level1 lfo1'><![if !supportLists]><span
Line 1,171: Line 1,180:
servers.<o:p></o:p></span></p>
servers.<o:p></o:p></span></p>


<h2><span style='font-size:11.0pt;line-height:115%;font-family:"Times New Roman","serif";
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span
color:windowtext'>Frequently asked questions<o:p></o:p></span></h2>
style='font-size:13.0pt;line-height:115%;font-family:"Cambria","serif";
mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin'><o:p>&nbsp;</o:p></span></b></p>
 
<p class=MsoNormal><b style='mso-bidi-font-weight:normal'><span
style='font-size:13.0pt;line-height:115%;font-family:"Cambria","serif";
mso-ascii-theme-font:major-latin;mso-hansi-theme-font:major-latin'>Frequently
asked questions<o:p></o:p></span></b></p>


<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l2 level1 lfo8'><![if !supportLists]><span
<p class=MsoListParagraphCxSpFirst style='text-indent:-.25in;mso-list:l2 level1 lfo8'><![if !supportLists]><span
Line 1,275: Line 1,290:
is no custom eviction policy implemented. </span><a
is no custom eviction policy implemented. </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"'>Least Recently Used</span></a><span
style='font-family:"Times New Roman","serif"'>Lease Recently Used</span></a><span
style='font-family:"Times New Roman","serif"'> is used. These are configurable
style='font-family:"Times New Roman","serif"'> is used. These are configurable
through the configuration XMLs from terracotta.<o:p></o:p></span></p>
through the configuration XMLs from terracotta.<o:p></o:p></span></p>

Revision as of 05:45, 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 <a href="https://www.techopedia.com/definition/16379/lazy-loading">lazy loading</a> mechanism. 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>

To know more 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. <a href="http://mcicpc.cs.atu.edu/archives/2012/mcpc2012/lru/lru.html">Lease Recently Used</a> is used. 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>