-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Researching Hibernate as an ORM, have questions not answered
PostPosted: Fri Feb 08, 2008 6:16 pm 
Newbie

Joined: Fri Feb 08, 2008 6:03 pm
Posts: 1
Greetings!

In researching ORM Solutions, I've come across Hibernate and have been researching it. Since installing it, I've developed a few tests to play around with it. However, I have some questions that so far have gone unanswered by the FAQ and would be extremely time intensive to implement for a simple test.

If anyone has experience in any of the following fields, I invite you to provide your experiences and appreciate any insight that you may provide.

1. With the cache methods available, is there a cache overflow to disk available should the memory cache allotment peak?

2. It appears that SQL queries will not have access to cache unless a flush is explicitly called before the SQL is executed. Do the SQL queries generate any sort of cache entries, which subsequent SQL queries may have access to?

3. The FAQ indicates that Hibernate is a High Performance ORM, designed around enabling cluster capability and speed. Does it support any bulk loading of data in an efficient method? For example, if a database system goes offline and the entries are cached; once the databases are available again will Hibernate be able to successfully and quickly load all cached entries into the databases?

4. "Debuggability". There is an option which enables you to view the SQL being generated by Hibernate. However, does it provide any sort of explanation plans as to why it may be generating the query it does? What is the suggested course of action if the query it generates via HQL statements is not the desired SQL query?

5. Stored Procedures. Previously, I read that a function must return a result set and that the first parameter of a procedure must be an OUT that returns a result set. By anyone's experience, is this true when using an Oracle database?

6. Has anyone had experiences where scalability has come into play? What are your experiences around needing to expand?

7. Change detection with cache. The FAQ briefly outlines what the cache methods are. Does anyone know if there is any sort of change detection available with the cache and stored values in the database? How does this pan out in a clustered environment?

8. Does the cache system support a time based expiration, so as to perform a synchronized flush/update on all cache systems?

And last, but not least 9: If databases become unavailable, what sort of survivability could be expected with Hibernate by means of it's caching system?

Again, I appreciate any insight, even if you may have partial information regarding a small section of these questions we have.

Thanks in advance,

Michael Martinek


Top
 Profile  
 
 Post subject: Re: Researching Hibernate as an ORM, have questions not answ
PostPosted: Fri Feb 08, 2008 6:34 pm 
Expert
Expert

Joined: Wed Apr 11, 2007 11:39 am
Posts: 735
Location: Montreal, QC
1- Yes. This is an option for the underlying cache technology. However, most caches have this feature.

2- SQL queries hit database unless their results are cached. Their results are invalidated if an involving entry is updated by hibernate or the cache is configured to throw away cached result every xxx seconds.

4- You have a wide range of option spanning writing you own kind of queries. Custom queries are a fashion in systems running on top of legacy databases.

6- I have an experience with hibernate in a game engine. It rocked. Scalability is usually a question of design, and with a proper distributed cache design you get very good results. In my game engine experience we were not even using the distributed cache solution and still hibernate was not on our way in any sense.

7- That's a very tricky part. Basically there is no change detection. You could instruct hibernate to load an entity before updating or have the cache to reload every xxx seconds but these solutions all depend on the nature of a software. You could also invalidate cache data if you know at points the data in cache is stale.

In addition, in a clustered environment you have the option to invalidate the data cached on other nodes or simply transfer data instances to them. The decision on which one to pick varies from system to system.

8- Yes but I am not sure if I understand what you mean by synchronizing updates...

9- Hibernate talks to database only when it has to. So if the data in question is available in cache hibernate is happy. This also includes connection checkouts. Hibernate will not check out a connection from pool unless it needs it and a cache is always first consulted before going to database.


I hope this helps.

Farzad-


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.