-->
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.  [ 4 posts ] 
Author Message
 Post subject: Multiple Databases and Performance
PostPosted: Thu Jun 30, 2005 12:01 pm 
Newbie

Joined: Mon Jun 20, 2005 7:17 pm
Posts: 3
My data is partitioned is such a way that each "customer" has it's own database. I've read some general comments about using multiple session factories and understand how to implement such a system, but what I read also recommends watching for memory pressure due to the session factory being "a pig".

Of course you never know how a system will perform until it's tested, but is anybody willing to take a stand on how many session factories (databases) is unreasonable?

This is a web-based application running on hardware that will have one gig of memory, and hundreds, if not thousands of databases. I'm looking for opinions on whether it is worth testing or if what I'm proposing is out of the question.

If anybody is interested, the partitioning strategy that I'm using is based on the TerraServer Bricks implementation.

ftp://ftp.research.microsoft.com/pub/tr/TR-2004-107.pdf


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 30, 2005 12:30 pm 
Newbie

Joined: Wed Jun 29, 2005 11:00 am
Posts: 2
I will add to this question rather than answer any of it, sorry!

First, I have done some searching on the topic but hadn't come up with much information about using multiple databases. Could you provide some links?

My situation is somewhat different in that a single application may use multiple databases at the same time. I need to supply "transactions" somehow across databases, something I would think you would have to do for operations that span multiple clients in your case.

I would hope that neither the session or the session factory is too big of a pig, or use of either in a web app with many users would be problematic. If it's just session factory that you are worried about, couldn't you build up the factory per call? Does it support Cloneable?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 30, 2005 2:28 pm 
Newbie

Joined: Mon Jun 20, 2005 7:17 pm
Posts: 3
My understanding of NHibernate is that sessions/session factories do not support cross-database operations. I read recently that this is a feature of Hibernate 3 and has not been ported.

This is fine in my case, as all of my databases are islands that do not need to know about each other. As I said though, I'm concerned about the idea of having hundreds or thousands of session factories sitting around.

Here's a thread from the old sourceforge forum about multiple databases. This is where I got the idea that the session factory was "piggish".

http://sourceforge.net/forum/message.php?msg_id=3033974


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jun 30, 2005 10:19 pm 
Regular
Regular

Joined: Mon May 16, 2005 1:35 am
Posts: 67
Panmanphil,

For you to be able to work with multiple databases in a single transaction, you will need to make use of the MS DTC. The way to achieve this is either through Enterprise Services Serviced Components, or (my preferred way) to use the ServiceDomain class (only available in XP SP2 and W2k3).

Any NHibernate session created inside a MS DTC transactional context will be automatically enlisted in the distributed transaction.

Baggins


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