8 Replies Latest reply on Nov 29, 2012 4:49 PM by salaboy21

    jBPM 5.3 clustering in an enterprise

    swaminathan.bhaskar

      Hello all,

       

      We want to use jBPM 5.3 in our enterprise and one of the enterprise reqs is to have clustering. I did not find any documentation or information in this regard. We want to be able to have multiple JVMs running in one box (h/w blade) forming a cluster. As new requests to start the jBPM business process are made, the load needs to be distributed among the JVMs in the cluster. Also, if one of the JVMs crashes (for whatever reason), the crashed jBPM business process needs to be automatically picked up and restarted by another JVM in the cluster.

       

      I am sure someone has already tried and solved this enterprise problem - any pointers or suggestions on how we can achieve this ?

        • 1. Re: jBPM 5.3 clustering in an enterprise
          jsher

          Hi,

           

          I am also interested in using jBPM in clustered environment, but as far as I can tell jBPM does not provide a solution for clustering. For example which nodes would ksessions and process instances be active in ? How to load balance/route requests and events (eg. start task, complete task, async, etc) to appropriate ksessions/process instances ? Which ksessions would timers expire in ? How to deal with concurrent branches (eg. all branches of parallel gateway for a process instance must be active in same ksession vs. can have multiple branches of same process instance active in different cluster nodes, etc). How to make the solution highly-available ?

           

          It would be good if experts could comment on this and provide a clear picture of how jBPM works in truly clustered and horizontally scaled environment.

           

          And perhaps if there are upcoming enhancements to address challenges in this area it would be good to get some visibility on this.

           

          Also, if there are some common approaches to addressing these challenges with current jBPM versions I would be extremely interested to hear of these.

           

          See also https://community.jboss.org/message/771731#771731

          • 2. Re: jBPM 5.3 clustering in an enterprise
            swaminathan.bhaskar

            Hello all;

             

            Can someone comment on this very important enterprise topic ?

            • 3. Re: jBPM 5.3 clustering in an enterprise
              swaminathan.bhaskar

              Hello all;

               

              Looks like there is no out-of-the-box clustering capability in jBPM 5.x ... Did some google searches and did not find anything useful in this area.

               

              Has anyone solved this problem ?

              • 4. Re: jBPM 5.3 clustering in an enterprise
                salaboy21

                There are several tecniques, depending on what do you want to achieve, for that reason, you need to be more specific on what your requirements are. We can solve them one at the time depending on your requirements for each of them. Remember that jBPM is pure java, so the same principles applies like in any other application that uses a Database and handle stateful data.

                 

                Cheers

                • 5. Re: jBPM 5.3 clustering in an enterprise
                  swaminathan.bhaskar

                  Mauricio, thanks for responding. Here is the scenario - we have a business app which has the business process (lets assume its a 10-step process with calls to web services etc) implemented using jBPM. This app is deployed in an appserver in JVM1 & JVM2 in Data center DC1. The both share the same Database DB1. We have the same setup in Datacenter DC2 with DB2 and JVM3 & JVM4. DB1 and DB2 are kept in sync through replication. A request comes in from the user and through standard enterprise load-balancer we routed to DC1 and the process is started in JVM1. It is in step 5 and the JVM1 crashes. We want the JVM2 to automatically pick the process and continue from step 6. This is one use-case. The other use-case would be when the Datacenter DC1 goes down and needs to be picked by either JVM3 or JVM4 in DC2. Any thoughts ?

                  • 6. Re: jBPM 5.3 clustering in an enterprise
                    salaboy21

                    If the database from both datacenters are in sync there should not be a problem. This also should be done by your infrastructure "We want the JVM2 to automatically pick the process and continue from step 6. " If the process state was saved it can be continued from a different JVM. But you need to make sure that that happen.

                     

                    Cheers

                    • 7. Re: jBPM 5.3 clustering in an enterprise
                      swaminathan.bhaskar

                      Is there anyway to know the difference between a crashed process vs a process waiting in timer or human-task or event ?

                      • 8. Re: jBPM 5.3 clustering in an enterprise
                        salaboy21

                        Your work item handler can implement a domain specific way to log in a table if the web service call failed or not.. That's domain specific. because you cannot define in a single way Failure.