-->
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.  [ 6 posts ] 
Author Message
 Post subject: connection pool
PostPosted: Tue Jun 01, 2004 11:56 am 
Newbie

Joined: Fri May 07, 2004 6:05 am
Posts: 17
I'm trying to evaluate the pooling options that I will use for my project, comparing each one's possibilities.

At a first look, c3p0 seemed to fullfill all my needs.

One of my test consist in importing client account from a former database, and these accounts are represented by 5 hibernate objects : Client, a List of Addresses, a Set of Telecom - address and telecom both are constituated by a generic object and a derivated object

Client -> AddressClient (inherits Address)
-> TelecomClient (inhertits Telecom)

The client database I'm importing has more than 200 000 clients, each of them has at least 1 address and 2 telecoms. I think this should stress the system ;-)


With c3p0, the connection pool stopped responding after 300 records added.
The integrated pool - the one that should not be used in a production environment -, I was able to treat 4000 record

Both imports ended when hibernate could not get any new connection.

I tried DBCP, but was not able to make it work. I've still got to investigate to find why

At a second test, which is still running, I have added more than 1300 clients - without any chance since the first test which crashed after only 300.


I was looking forward using proxool, but I'm very surprised to see that a new version was to be released in december - announced made late november - and that nothing has been changed since on the project.
Is it dead ?

Does anyone use it in a prod environment, and is it stable enough. Is the lack of DataSource support not too disturbing ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 3:21 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Why do you think the problem is in pool, but not in your code ?
BTW why do you write code to import data ? you can do it with DB provided tools or automate it with something like this:
" dbclient -f export.sql myDb1 | awk -f transform.awk | dbclient myDb2"


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 4:33 am 
Newbie

Joined: Fri May 07, 2004 6:05 am
Posts: 17
There are plenty of ways I could import thoses datas, and this one is by far not the most optimal.

But the point was to stress test my infrastructure to see what I could get from hibernate and my database, from one side, and see which conn pooling would be the most efficient to me.

I assumed I had a pool problem, because c3p0 crashed after 300 records, when the reference pool (hibernate pooling with only one connection) worked 10 times longer.
If both crash nearly at the same time, I'd guess I had reached some kind of limitation and investigate this way (eg cache size limitation, database space, whatever...)


But this leads me to another question : what worth is a O/R mapping if you use half the time a different mean to access the datas, and, which is far more dangerous, to modify the datas in the base ?

This is a question that split apart the developpment team here. And I'm not sure we've comed to an end.

We admitted that some reading with complicated requests will be far more efficient if directly made in SQL - ie all the research fonctionnalities, but not the readings of full objects.
Plus one of the thing we expect hibernate to do for us is to manage the security of datas, and not delegate this to the database.
This is why we decided to forbid your application to write anything to the storage outside of hibernate.

Is it a reasonable way of thinking the application ?

What if I we have to develop an import fonctionnality ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 5:00 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
The only good reason to use O/R mapping tool is to use it for object to relation mapping. If you do not need objects (like import) then you do not need this tool too. To test tool you need to use something more realistic, problem is not in tool, but in the way you use it.
BTW I am sure all pools you have tested will work without problems if you will not do something wrong. Sometimes it is possible to have better results without pool too (a few of my applications work better without pool), it depends on how you use it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 6:09 am 
Newbie

Joined: Fri May 07, 2004 6:05 am
Posts: 17
That's a good point.

What we agreed here was to use hibernate also as a unique entry point to the DB storage.

Are we completely wrong ?

How to deal with false cache readings that would be caused by a direct modification of the datas ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 02, 2004 6:28 am 
CGLIB Developer
CGLIB Developer

Joined: Thu Aug 28, 2003 1:44 pm
Posts: 1217
Location: Vilnius, Lithuania
Niavlys wrote:
How to deal with false cache readings that would be caused by a direct modification of the datas ?

There is no good ansver to this question, the same problem is with any tool and cache. It depends on data, sometimes you can use some workaround (expire time, notifcation from trigger), sometimes you just can not cache it. But if we are talking about web applications then it is almost always possible to use cache ( content cache works better for most cases).


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