Search code examples
javahibernatejakarta-eecluster-computingterracotta

Terracotta + Compass = Hibernate + HSQLDB + JMS?


I am currently in need of a high performance java storage mechanism.

This means:

1) I have 10,000+ objects with 1 - Many Relationship.

2) The objects are updated every 5 seconds, with the most recent updates persistent in the case of system failure.

3) The objects need to be queryable in a reasonable time (1-5 seconds). (IE: Give me all of the objects with this timestamp or give me all of the objects within these location boundaries).

4) The objects need to be available across various Glassfish installs.

Currently:

I have been using JMS to distribute the objects, Hibernate as an ORM, and HSQLDB to provide the needed recoverablity.

I am not exactly happy with the performance. Especially the JMS part of this.

After doing some Stack Overflow research, I am wondering if this would be a better solution. Keep in mind that I have no experience with what Terracotta gives me.

I would use Terracotta to distribute objects around the system, and something else need to give the ability to "query" for attributes of those objects.

Does this sound reasonable? Would it meet these performance constraints? What other solutions should I consider?


Solution

  • At first, Lucene isn't your friend here. (read only)

    Terracotta is to scale around at the Logical layer! Your problem seems not to be related to the processing logic. It's more around the Storage/Communication point.

    1. Identify your bottleneck! Benchmark the Storage/Logic/JMS processing time and overhead!
    2. Kill JMS issues with a good JMS framework (eg. ActiveMQ) and a good/tuned configuration.
    3. Maybe a distributed key=>value store is your friend. Try Project Voldemort!
    4. If you like to stay at Hibernate and HSQL, check out the Hibernate 2nd level cache and connection pooling (c3po, container driven...)!