cancel
Showing results for 
Search instead for 
Did you mean: 

Activity Clustering

dsagar1234
Champ in-the-making
Champ in-the-making
Hello guys,

After googling couple of weeks for open source workflow engine,finally we have decided to
use ACTIVITY over JBPM.The main reason behind this is clustering, since ACTIVITY is stateless it supports clustering .
I have couple of questions related to clustering approach.

1.For scalability reason we are going with EJB3 as compared to spring(Correct me if i am wrong). Our architecture will be as follows,
      a. We are having four nodes with load balancer
      b. Each node will be having pool of EJBs.
      c. Each node will have one instance of ProcessEngine by using singleton pattern that will be used by all EJB on particular node.

As per my understanding ProcessEngine is thread safe so there will be no problem if multiple threads access
ProcessEngine at same time but my concern is what about scalability.We have chosen EJB for scalable purpose
but if multiple call on single instance of  ProcessEngine,will it scale.

2.Can we have multiple instance of ProcessEngine per node.I mean whenever there is need to interact with processEngine can we create instance and
destroy it.create and destroy as per request basis like normal java classes. Will be there any performance overhead
in creating and destroying ProcessEngine multiple time.

3.Any suggestions on other architecture.
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
1. Each API call to the engine happens in the calling thread and very few synchronized resources are used in activiti. So the scalability of the engine depends on the number of threads available and the speed of the Database used.

2. Creating and destroying instances of the engine has a performance penalty since it builds up all classes needed for execution and holds some internal caches as well. Having to create a new one for each request is a bad idea…

jbarrez
Star Contributor
Star Contributor
Sounds good. Just put your process engine in jndi for example and let it boot/shutdown toigether with the container.

dsagar1234
Champ in-the-making
Champ in-the-making
Thanks a lot guys.