-->
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.  [ 8 posts ] 
Author Message
 Post subject: Need some help to decide whether to use Hibernate.
PostPosted: Wed Jun 09, 2004 8:27 am 
Beginner
Beginner

Joined: Wed Jun 09, 2004 8:10 am
Posts: 28
Project:
1) EDM system.
2) Aproximately 10-40 concurrent users maximum.
3) Need to store a lot of history information and to achive desired performance need to use precalculated data which will be modified if entities connected to it were modified.
4) Also I need to use free databases (MySQL or PostgreSQL etc).
5) System shuld have 3 tiers (not neccessary distributed) clients (web, gui), business logic and db due to use of different clients.

I am not sure whether I can make such mappings using Hibernate. For example when I store record I need to delete cache data and later it will be regenerated during selection (or something like this). Changes happens quite seldom.

Thank you for your help!


Top
 Profile  
 
 Post subject: Re: Need some help to decide whether to use Hibernate.
PostPosted: Wed Jun 09, 2004 9:02 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
1) EDM system.
???

2) Aproximately 10-40 concurrent users maximum.

Hibernate is suitable.

3) Need to store a lot of history information and to achive desired performance need to use precalculated data which will be modified if entities connected to it were modified.

Second-level cache...
http://www.hibernate.org/hib_docs/reference/en/html/performance.html#performance-cache
Native SQL Queries...
http://www.hibernate.org/hib_docs/refer ... rysql.html


4) Also I need to use free databases (MySQL or PostgreSQL etc).

Yeah!!! PostgresSQL, MySQL supported both.

5) System shuld have 3 tiers (not neccessary distributed) clients (web, gui), business logic and db due to use of different clients.

It is your architecture decision, Hibernate does not limit you.
Quote:
No special interface has to be implemented for persistent classes nor do we have to subclass from a special root persistent class. Hibernate also doesn't use any build time processing, such as byte-code manipulation, it relies solely on Java reflection and runtime class enhancement (through CGLIB). So, without any dependency in the POJO class on Hibernate, we can map it to a database table.


The following app. server JBoss, Weblogic, ect are supported.

I am not sure whether I can make such mappings using Hibernate. For example when I store record I need to delete cache data and later it will be regenerated during selection (or something like this). Changes happens quite seldom.

The following second-level cache politics are supported
<!ATTLIST cache usage (read-only|read-write|nonstrict-read-write|transactional) #REQUIRED>

Quote:
If the application only occasionally needs to update data (ie. if it is extremely unlikely that two transactions would try to update the same item simultaneously) and strict transaction isolation is not required, a nonstrict-read-write cache might be appropriate.


A Comparison of Hibernate and Toplink http://www.calextech.com/articles.html can be helpful.

--
Regards,
Leonid


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 09, 2004 9:33 am 
Beginner
Beginner

Joined: Wed Jun 09, 2004 8:10 am
Posts: 28
Quote:
1) EDM system.

electronic document management system

Main problem (as I see) is: how (and who) will perfrom update of interim entities.

For example:
I have documents that calculated using data of others types of documents.
To increase performance I need to store precalculated data on specific dates.
To do calculation I need to take [precalculated data on date N] + [calculate data on dates range N+1...CurrentDate] (thus I don't need to recalculate whole history information).
If some documents in date range [0...N] changed I need to update precalculated data.
Calculations are quite complex and connot be implemented using materialized view in RDBMS (MS SQL Server, Oracle, but now I couldn't use these databases anyway :)).

Is it possible to implement this using Hibernate? As I understand hibernate manages objects persistance and I don't understand how to perform side effects.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 09, 2004 9:58 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
PavelKrupets wrote:
... I don't understand how to perform side effects.


For side effects:

1). you are still able to use database triggers with session.saveOrUpdate(obj); followed by session.refresh(object);

2) you can use hibernate's cascade save/update operations with configured Interceptors http://www.hibernate.org/hib_docs/reference/en/html/manipulatingdata.html#manipulatingdata-interceptors


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 09, 2004 10:23 am 
Beginner
Beginner

Joined: Wed Jun 09, 2004 8:10 am
Posts: 28
Thank you for your help! :)


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 09, 2004 10:27 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
PavelKrupets wrote:
Thank you for your help! :)

Nevermind, in addition it seems you are Russian :) Pavel...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 09, 2004 10:32 am 
Beginner
Beginner

Joined: Wed Jun 09, 2004 8:10 am
Posts: 28
Yep!

(About triggers: I think it's better not to use them. There are a lot of problems with them (errors handling, they are static, it's difficult to write and maintain complex triggers)).


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 09, 2004 10:38 am 
Expert
Expert

Joined: Fri Feb 06, 2004 7:49 am
Posts: 255
Location: Moscow, Russia
PavelKrupets wrote:
(About triggers: I think it's better not to use them. There are a lot of problems with them (errors handling, they are static, it's difficult to write and maintain complex triggers)).


In your case I would prefer Interceptor, maybe trigger solution would be faster, but more buggy (error handling, .... and trigger debugging) and not portable to other databases.

--
Regards,
Leonid


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.