Menu

Ozone vs. Hibernate

tm4j-users
2003-03-21
2003-03-21
  • Thrazzle Throne

    Thrazzle Throne - 2003-03-21

    Greetings,

    Can you provide some info on a comparison between Hibernate and Ozone? 

    I want to implement a webapp that will capture form data and store it in a topic map.   I have been looking at apache.cocoon as a platform.  Would one of these backends offer significant advantages over another.

    Thanks for your time.

    Thrazzle

     
    • Kal Ahmed

      Kal Ahmed - 2003-03-21

      Hi,

      The major difference between the two back-ends is in the handling of large collections and especially the indexes.

      Hibernate is (in theory at least) as scalable as your RDBMS. All of the basic TM4J indexes are implemented using Hibernate's query language (which is translated to SQL queries). Right now, almost all objects are stored in a single table which might lead to performance impacts on very large topic maps - this is something which I am looking into for the next release.

      Ozone stores the collections which make up the indexes (and all other collections, such as the collection of all Topics in the TopicMap) as serialized Java Collections. As your collections get larger, the overhead of Ozone managing these objects (reading/writing from disk) becomes significant. Plus you need to have enough memory assigned to your JVM to hold the entire collection in memory.

      In the future, the Ozone limitations will be fixed by moving to the latest version of Ozone which provides Collection implementations which are not completely deserialized/serialized when they are accessed.

      Of the two backends, I would say that Ozone is probably easier to install and to run (because there is no dependency on another application), but right now, Hibernate is more scalable.

      I believe that Hibernate also has support for the database that ships with Cocoon - I don't know if that makes any difference to your decision.

      BTW, if you have the time to take a look at the new tm4web module in CVS you will find a first cut of a Cocoon transformer for TM4J - you might find it useful (or you might not...in which case I would like to hear what you would find useful ;-)

      Finally, one word of warning. My work on improving the scalability of both the Hibernate and RDBMS backends may require changes to the schemas used. In the worst case, upgrading to the next version of TM4J may require you to export the topic map(s) you have created and import them into the new version of the database. If possible, I will create a migration tool, but its only fair to warn you that it might require a bit of work to do that upgrade.

      Hope this helps,

      Kal

       
    • Thrazzle Throne

      Thrazzle Throne - 2003-03-21

      Thanks very much for your work and for taking the time to respond.

      It looks like the DB situation is still quite fluid so the decision left here seems to to be ease of installation vs. POTENTIAL future scalability.

      I'm excited to hear of a Cocoon transformer for tm4j and I will most certainly have a look.

      thanks again!

      Thrazzle

       

Log in to post a comment.