{"id":3528,"date":"2012-12-03T09:00:12","date_gmt":"2012-12-03T17:00:12","guid":{"rendered":"http:\/\/localhost\/exoblog\/?p=3528"},"modified":"2023-06-05T16:22:14","modified_gmt":"2023-06-05T14:22:14","slug":"whats-new-in-exo-jcr-1-15","status":"publish","type":"post","link":"https:\/\/www.exoplatform.com\/blog\/whats-new-in-exo-jcr-1-15\/","title":{"rendered":"What&#8217;s new in eXo JCR 1.15?"},"content":{"rendered":"<p><!--no-bookmarkify--><br \/>\n<em>A little bit more than a year after eXo JCR 1.14.0-GA, we are now pleased to announce that eXo JCR 1.15.0-GA &#8211; our implementation of the JSR-170 spec &#8211; has just been released. For this version, we mainly focused on improving the user experience based on feedback from our customers and consultants. In the next sections, I will present the main new features and enhancements that you will be able to benefit starting from eXo Platform 4.<\/em><\/p>\n<p><!--more--><\/p>\n<h2>New Features<\/h2>\n<h3>Dedicated tables per workspace<\/h3>\n<p>In previous versions of eXo JCR, we proposed 2 storage modes:<\/p>\n<ul>\n<li>The single mode, where all the data of all the workspaces are stored into the same tables.<\/li>\n<li>The multiple mode, where each workspace has its own tables but in a dedicated DB schema.<\/li>\n<\/ul>\n<p>The first mode is easy to set up but is not very scalable and the second mode is much more scalable but much harder to set up, especially when you have a lot of workspaces and you use a database like Oracle. A new mode has been added, which provides the benefit of both previous modes without any drawback. This new mode, called <em>isolated<\/em>, stores the data of each workspace in dedicated tables within the same DB schema which means that it is as easy as the single mode to set up and as scalable as the multiple mode.<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/\/wp-content\/uploads\/2012\/11\/JCR-Modes-2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-3677\" title=\"JCR Storage Modes\" src=\"https:\/\/www.exoplatform.com\/blog\/\/wp-content\/uploads\/2012\/11\/JCR-Modes-2.jpg\" alt=\"JCR Storage Modes\" width=\"650\" height=\"816\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/JCR-Modes-2.jpg 650w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/JCR-Modes-2-239x300.jpg 239w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/JCR-Modes-2-377x473.jpg 377w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/JCR-Modes-2-261x328.jpg 261w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/JCR-Modes-2-188x236.jpg 188w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/JCR-Modes-2-104x131.jpg 104w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/JCR-Modes-2-72x90.jpg 72w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/JCR-Modes-2-24x30.jpg 24w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<h3>Lucene indexes re-synchronized thanks to rsync<\/h3>\n<p>As you may know, eXo JCR relies on Lucene anytime we execute a JCR query and lucene doesn\u2019t provide any clustering capabilities out of the box. In eXo JCR 1.14, we proposed 2 ways to manage the lucene indexes in a cluster environment:<\/p>\n<ul>\n<li>Shared index: The lucene indexes are stored into a shared file system, only the master has write access to the shared indexes.<\/li>\n<li>Local index: The lucene indexes are stored locally on each cluster node and each node is responsible for updating its own copy of indexes.<\/li>\n<\/ul>\n<p>The first approach easily ensures consistency as all nodes read the same indexes, but it relies on a shared file system which affects the performances in read and write accesses. The second approach gives much better performances in read and write accesses as the accesses are local but since each node is responsible for keeping up to date its own copy of lucene indexes, we can get differences in the indexes content from one cluster node to another.<\/p>\n<p>This new version proposes a new approach in which only the master is in read\/write mode, the other nodes are in read only, each node has its own copy of indexes that is resynchronized from the master thanks to the rsync command. This way we can guarantee good performances and consistency.<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-shared-index-3.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-3710\" title=\"Shared Index\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-shared-index-3.jpg\" alt=\"Shared Index\" width=\"650\" height=\"400\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-shared-index-3.jpg 650w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-shared-index-3-300x185.jpg 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-shared-index-3-500x308.jpg 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-shared-index-3-360x222.jpg 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-shared-index-3-200x123.jpg 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-shared-index-3-100x62.jpg 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-shared-index-3-49x30.jpg 49w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-local-index-2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-3679\" title=\"Local Index\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-local-index-2.jpg\" alt=\"Local Index\" width=\"650\" height=\"400\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-local-index-2.jpg 650w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-local-index-2-300x185.jpg 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-local-index-2-500x308.jpg 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-local-index-2-360x222.jpg 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-local-index-2-200x123.jpg 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-local-index-2-100x62.jpg 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-local-index-2-49x30.jpg 49w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-rsync-index-2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-3680\" title=\"RSync Index\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-rsync-index-2.jpg\" alt=\"RSync Index\" width=\"650\" height=\"400\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-rsync-index-2.jpg 650w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-rsync-index-2-300x185.jpg 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-rsync-index-2-500x308.jpg 500w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-rsync-index-2-360x222.jpg 360w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-rsync-index-2-200x123.jpg 200w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-rsync-index-2-100x62.jpg 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/diagram-rsync-index-2-49x30.jpg 49w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<h3>Features related to the extension mechanism<\/h3>\n<p>In versions prior to JCR 1.12, when we wanted to customize the portal, we had to modify directly the portal binaries which made it complex to upgrade and to support. Starting from JCR 1.12 \/ PLF 3.0, we added the extension mechanism, allowing us to customize our portal application without modifying the portal binaries which helped us to solve the initial problem but unfortunately brought new ones that we fixed thanks to the features described in the next subsections.<\/p>\n<h3>Use System properties to configure your workspace<\/h3>\n<p>One of the features of the extension mechanism allows you to add or redefine configuration files including the configuration files of your repository\/workspace from different war files. The direct consequence of it is the fact that we don&#8217;t have anymore one single file containing the whole JCR configuration but several small ones distributed over different war files. Thanks to this new feature, you can now change the configuration of one or all the registered workspaces whatever the location of their related configuration file. This can be done simply using System properties whose name matches with a specific syntax. For example let&#8217;s say that I want to set the max-buffer-size to 300k for all the registered workspaces. To do so, I just need to add the system property -Dexo.jcr.config.force.all.container.max-buffer-size=300k to my startup command.<\/p>\n<h3>The extension mechanism is re-loadable<\/h3>\n<p>Developing an extension can be tedious especially because of the extension mechanism that didn&#8217;t support hot reloading so far, meaning we would have to restart the server regularly. Starting from this version, in case you are in developing mode, the extension mechanism is able to detect a change and, according to what has been modified, it could decide to automatically reload only one portal container, a set of portal containers or all the containers.<\/p>\n<h3>Exclude nodes from query results<\/h3>\n<p>Up to now all nodes are indexed automatically but for some reason you may need to exclude some nodes from JCR query results. For example, if you have a folder representing the trash, you may want to prevent any JCR query from returning anything from it. It is now possible to exclude from indexing a subtree of nodes using a path or all nodes of a given node type or both.<\/p>\n<h3>CND file format support<\/h3>\n<p>You can now define your node type definition using the &#8220;Compact Node Definition&#8221; format that has been specified in JCR 2.0 spec. This new format has been designed to be much more natural and easier to read and write than the old XML format. This also helps to significantly reduce the size of your node type definition files.<\/p>\n<p>Here is how we define the node type <span class=\"navCode\">nt:base<\/span> with the old XML syntax:<\/p>\n<pre class=\"lang:xhtml decode:true \">&lt;nodeType name=\"nt:base\" isMixin=\"false\" hasOrderableChildNodes=\"false\" primaryItemName=\"\"&gt;\n\t&lt;propertyDefinitions&gt;\n\t\t&lt;propertyDefinition name=\"jcr:primaryType\" requiredType=\"Name\" autoCreated=\"true\" mandatory=\"true\" onParentVersion=\"COMPUTE\" protected=\"true\" multiple=\"false\"&gt;\n\t\t\t&lt;valueConstraints \/&gt;\n\t\t&lt;\/propertyDefinition&gt;\n\t\t&lt;propertyDefinition name=\"jcr:mixinTypes\" requiredType=\"Name\" autoCreated=\"false\" mandatory=\"false\" onParentVersion=\"COMPUTE\" protected=\"true\" multiple=\"true\"&gt;\n\t\t\t&lt;valueConstraints \/&gt;\n\t\t&lt;\/propertyDefinition&gt;\n\t&lt;\/propertyDefinitions&gt;\n&lt;\/nodeType&gt;<\/pre>\n<p>Here is how we define the same node type with CND:<\/p>\n<pre class=\"lang:default decode:true \">[nt:base] abstract\n- jcr:primaryType (NAME) mandatory autocreated protected COMPUTE\n- jcr:mixinTypes (NAME) protected multiple COMPUTE<\/pre>\n<h2>Enhancements<\/h2>\n<h3>Write operations optimizations<\/h3>\n<p>In term of performances, we mainly focused on improving write operations by optimizing the change log in order to ease its accessibility and also to get rid of useless operations. For example, if it detects that you asked to update several times the same property, only the last change will be taken into account, mostly to reduce the total amount of queries to be executed by the database. This will help to reduce I\/O (network and disc).<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-3711\" title=\"Write Operations Optimizations\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3.jpg\" alt=\"Write Operations Optimizations\" width=\"650\" height=\"480\" srcset=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3.jpg 650w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3-300x222.jpg 300w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3-641x473.jpg 641w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3-444x328.jpg 444w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3-320x236.jpg 320w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3-177x131.jpg 177w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3-100x74.jpg 100w, https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/write-operations-optimizations-3-41x30.jpg 41w\" sizes=\"(max-width: 650px) 100vw, 650px\" \/><\/a><\/p>\n<p>One other interesting improvement is the ability to enable update batching, which can really improve the performances, especially when you do a lot of operations of the same type (CREATE or UPDATE or DELETE) within the same transaction and you have a remote database. Our internal tests showed that we could reduce the first starting time of an eXo Platform by up to 40 % according to the configuration used.<\/p>\n<p><a href=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/first-startup-time-2.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-3682\" title=\"First Startup Time\" src=\"https:\/\/www.exoplatform.com\/blog\/wp-content\/uploads\/2012\/11\/first-startup-time-2.jpg\" alt=\"First Startup Time\" width=\"650\" height=\"500\" \/><\/a><\/p>\n<h3>Smaller memory footprint<\/h3>\n<p>To improve the scalability of a product it is important to reduce the memory footprint, we did it by reviewing our code in order to reuse as many existing objects as we could.<\/p>\n<h3>Use JCR Action as validator<\/h3>\n<p>The JCR actions allow you to perform actions before and after a JCR operation, but in previous versions when an action fails, the exception is logged but the JCR operation is performed normally. Now it is possible to raise an exception from your JCR action and decide yourself how the JCR should behave in case of an exception. This improvement can help you to implement a data validator that cannot be managed at NodeType definition level. A good example is when you need to validate the value of a property that depends on the value of another property, such as a start date and an end date, we don&#8217;t want that the end date to be before the start date and vise versa.<\/p>\n<h3>Shutdown your cluster easily<\/h3>\n<p>In previous versions, when you had a cluster under load and you wanted to stop it safely, you had to suspend all the running transactions on your cluster using JMX before stopping all your nodes. In this version, we improved the inter-node communication in order to suspend the transactions over the cluster automatically as soon as we detect that you are trying to shut down one or several nodes, this should ease administrator&#8217;s life.<\/p>\n<h3>Other Interesting Enhancements<\/h3>\n<ul>\n<li>The indexing process of a workspace can be long. So, to allow you to have a better idea of what&#8217;s left, we get, in a non blocking manner, the total amount of nodes to be indexed and we provide it once we have it.<\/li>\n<li>The result of a JCR query can now be sorted case insensitively.<\/li>\n<li>The code of the whole eXo JCR&#8217;s stack has been reviewed to be compatible with JBoss AS 7 and its new classloading strategy.<\/li>\n<li>eXo JCR supports Java 7.<\/li>\n<\/ul>\n<h2>Download<\/h2>\n<p><a title=\"eXo JCR 1.15 Download\" href=\"http:\/\/forge.ow2.org\/project\/showfiles.php?group_id=151\" target=\"_blank\" rel=\"noopener\" class=\"broken_link\">Download eXo JCR 1.15.0-GA<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"A little bit more than a year after eXo JCR 1.14.0-GA, we are now pleased to announce that eXo JCR 1.15.0-GA &#8211; our implementation of the JSR-170 spec &#8211; has just been released. For this version, we mainly focused on improving the user experience based on feedback from our customers and consultants. In the next [&hellip;]","protected":false},"author":7,"featured_media":12746,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":[],"categories":[699],"tags":[],"lang":"en","translations":{"en":3528},"pll_sync_post":[],"_links":{"self":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/3528"}],"collection":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/comments?post=3528"}],"version-history":[{"count":0,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/posts\/3528\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/media?parent=3528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/categories?post=3528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.exoplatform.com\/blog\/wp-json\/wp\/v2\/tags?post=3528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}