<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Clustering in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140122#M98147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have been having quite a lot of issues with clustering.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We have two servers in a cluster. On both of them we have job executor running. Very often we see optimistic locking exception and very often we see variable values that we are storing are getting lost. This typically happens during the same time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also see the execution happening on different servers at the same time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the scenario:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;gt;(Java Delegate)–&amp;gt;(Async Task)–&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These async tasks and java tasks are exclusive. But I guess that exclusive behavior is only limited in one server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;A href="http://bpmn20inaction.blogspot.com/2012/12/implement-parallel-execution-in-activiti.html" rel="nofollow noopener noreferrer"&gt;http://bpmn20inaction.blogspot.com/2012/12/implement-parallel-execution-in-activiti.html&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In java delegate we do setVariable() and very often we see values being lost after Async task. Is this how it is supposed to work? Does the Async Taks gets executed before the values are stored by (java Delegate) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 May 2014 18:59:29 GMT</pubDate>
    <dc:creator>schitale</dc:creator>
    <dc:date>2014-05-06T18:59:29Z</dc:date>
    <item>
      <title>Clustering</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140116#M98141</link>
      <description>I know that Activiti is "just a jar" but what happens if there are N instances (JVMs) running against the same Activiti db?What if I want to achieve some load-balancing and fault tolerance?Is there an easy way to achieve that? I think that everything except timerEvent-triggered processes can be clea</description>
      <pubDate>Wed, 20 Feb 2013 04:36:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140116#M98141</guid>
      <dc:creator>derikalov</dc:creator>
      <dc:date>2013-02-20T04:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Clustering</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140117#M98142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I know that Activiti is "just a jar" but what happens if there are N instances (JVMs) running against the same Activiti db?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Not much, than all those engines will operate on the same data&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What if I want to achieve some load-balancing and fault tolerance?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you'll need typical solution which are used to make Java webapps highly available: tomcat cluster, loadbalancer in front, etc. Nothing fancy there. The activiti API is stateless and any node can take over from each node.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Is there an easy way to achieve that? I think that everything except timerEvent-triggered processes can be cleanly split across N engines. But for timerEvent triggered jobs, can I have some hooks into the engine so it first does some kind of election of which engine picks up the process - and the other engines then ignore it.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;For timers you can even dedicate one specifc machine which only runs the job executor. (or more than one to make them fault tolerant). Both the job executor and Activiti in general is designed in a way that works clusterable out of the box.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 12:24:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140117#M98142</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-02-20T12:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Clustering</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140118#M98143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank Joram, but my question is HOW do I dedicate? At this point I don't know enough about Activiti internals. My impression is that as long as 2 instances share the same database, they will both pick up and run the timer job. But how do I make sure that only 1 of them picks up a job? And if that engine stops working how do I get the "standby" engine to start picking up timer jobs?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 21:13:40 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140118#M98143</guid>
      <dc:creator>derikalov</dc:creator>
      <dc:date>2013-02-20T21:13:40Z</dc:date>
    </item>
    <item>
      <title>Re: Clustering</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140119#M98144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;But how do I make sure that only 1 of them picks up a job?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;You don't. The job executor is written in such a way that it is clusterable. Only one job executor will pick up the jobs. Internally, this is done by first acquiring the job (locking it for a certain time) before it is actually executed. The locking happens using optimistic locking making sure no two jobs are picked up by different threads.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I meant it when I said Activiti is written with cluserability in mind &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;And if that engine stops working how do I get the "standby" engine to start picking up timer jobs?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;That will also happen automatically, as it will just keep picking and executing timers as before, but now the chance on optimistic locks is of course much smaller (or not existant).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Feb 2013 09:27:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140119#M98144</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-02-21T09:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Clustering</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140120#M98145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Joram, this is great! This is great information, I wish it was more prominently stated in the User Guide or a separate doc, perhaps, Admin guide?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One more question, how do "dedicate one specifc machine which only runs the job executor"? Could not find anything specific in the docs…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Feb 2013 20:11:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140120#M98145</guid>
      <dc:creator>derikalov</dc:creator>
      <dc:date>2013-02-25T20:11:14Z</dc:date>
    </item>
    <item>
      <title>Re: Clustering</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140121#M98146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Joram, this is great! This is great information, I wish it was more prominently stated in the User Guide or a separate doc, perhaps, Admin guide?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;That is certainly true. But to do that, we'd like to set up a clustered 'reference' architecture up first before writing it down. But point taken, indeed.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;One more question, how do "dedicate one specifc machine which only runs the job executor"? Could not find anything specific in the docs…&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;That is also pretty easy: simply have one activiti.cfg.xml with the job executor set to enabled, and all the rest to disabled. If you want two machines doing the jobs, simply enable it on the other machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;CODE&gt;&amp;lt;property name="jobExecutorActivate" value="false" /&amp;gt;&lt;/CODE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Feb 2013 10:01:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140121#M98146</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-02-26T10:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Clustering</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140122#M98147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have been having quite a lot of issues with clustering.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;We have two servers in a cluster. On both of them we have job executor running. Very often we see optimistic locking exception and very often we see variable values that we are storing are getting lost. This typically happens during the same time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also see the execution happening on different servers at the same time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is the scenario:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;–&amp;gt;(Java Delegate)–&amp;gt;(Async Task)–&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;These async tasks and java tasks are exclusive. But I guess that exclusive behavior is only limited in one server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;A href="http://bpmn20inaction.blogspot.com/2012/12/implement-parallel-execution-in-activiti.html" rel="nofollow noopener noreferrer"&gt;http://bpmn20inaction.blogspot.com/2012/12/implement-parallel-execution-in-activiti.html&lt;/A&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In java delegate we do setVariable() and very often we see values being lost after Async task. Is this how it is supposed to work? Does the Async Taks gets executed before the values are stored by (java Delegate) ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 May 2014 18:59:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/clustering/m-p/140122#M98147</guid>
      <dc:creator>schitale</dc:creator>
      <dc:date>2014-05-06T18:59:29Z</dc:date>
    </item>
  </channel>
</rss>

