-->
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: Is Hibernate the rite tool for use in Legacy Aplications ?
PostPosted: Fri Dec 15, 2006 1:34 am 
Newbie

Joined: Thu Oct 12, 2006 6:29 am
Posts: 4
Hibernate version is 3.1.3.1.2
Database used is Oracle10g.
Appserver is JBoss.

Hi ,

We are planning to use Hibernate for Enterprise level solutions. Wherein there can be load of 1000 user or more at a time.

The semantics of the environment are :
We dont have relational tables, there are no foreign key or Primary keys in the tables.
Our queries dont fetch few records, the queries are range queries, they fetch upto 200 thousand records at a time.
And our POJO objects internally, have BigDecimal and String objects as there attributes.
All tables in the database are not static, any row in any table can be updated at any time.

The Problem statement :
When doing the performance run we are getting very low readings.
And after profiling we found that on call of .List() method it eats up lot of memory and lot of time. Almost 25 million objects are created for 10 user load.
We have tried Second Level Caching, Query caching , Pagination, Use of Iterate, Use of HQL, etc but nothing improved the performance.

Now my question is : Can Hibernate be used as an tool in Business problems like this ?, if so then how then to improve the performance ?

Also, in Hibernate in Action , I saw one line : If your application does bulk operation then ORM is not the tool . Does this line mean that Hibernate should not be used for Business problems like mine.

Thanks & Regards.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 15, 2006 4:29 am 
Expert
Expert

Joined: Tue Dec 28, 2004 7:02 am
Posts: 573
Location: Toulouse, France
I guess you should have a look here if not already done :
http://www.hibernate.org/hib_docs/v3/re ... batch.html

I think ORM tools are not the best tools to do loads of batch inserts, or generally batch operations. Batch can be done, but they must be handled with a lot of attention.

Moreover, it depends on what type of business operations you do. If you need to just send SQL queries, even complicated, but do not need to load your objects, maybe you don't need an ORM. But if you must do some objects code, because of your business code being quite complex, then ORM could be better than jdbc.

I never used it, but maybe you could try StatelessSession which is designed for handling batch (no first level cache) ops.

So it depends on what is your business constraints, I'd say. To sum up, IMO :
* lots of complex business operations => ORM can go, but with a lot of care about the cache size (flushing(), clearing() regularly, or using no cache with StatelessSession for example)
* Only sql queries are sent, and operations are quite feasible with SQL only, then forget about ORM.

HTH

_________________
Baptiste
PS : please don't forget to give credits below if you found this answer useful :)


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.