cancel
Showing results for 
Search instead for 
Did you mean: 

In memory database

snowch1
Champ in-the-making
Champ in-the-making
I need a lightweight workflow solution for short lived sessions (< 10 mins).  I don't want to persist the workflow sessions in a database. 

Is Activiti suitable for this type of solution, perhaps using hsql?

Many thanks in advance,

Chris
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
Hi,

Default database used by activiti is H2. If you use the org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration to configure activiti, it uses an in-memory database ( JDBC-url: jdbc:h2:mem:activiti).

The same configuration is used when we run our engine JUnit test-suites, which run very fast so Activiti is no doubt suitable for your needs.

wbenass
Champ in-the-making
Champ in-the-making
Reading that H2 is not prod ready due to table locking but then later read that can be changed.  Is there an option with Activiti to have the DB in memory in a production scenerio with lots of concurrency?  H2?  Other?

jbarrez
Star Contributor
Star Contributor
production and in-memory are two things that don't go well together ….

wbenass
Champ in-the-making
Champ in-the-making
Thanks for the reply.  I would not jump to conclusions with respect to that.  I can think of more than 1 instance where use of an in-memory database is superior to the alternative.  We have a need for a **lightweight** process orchestration whose state dies along with the runtime, minimal maintenance, etc.  So I would ask my question again…is there an Activiti configuration that is suitable for production using the in-memory database?

jbarrez
Star Contributor
Star Contributor
Activiti is only tested with H2. But as far as I know, any of the popular in memory databases (Derby, HSQL, …) use table locking.