Hi,
 
I've been interested in the NHibernate shading features for a while and 
spoke to Gerke a while ago about NHibernate.Shards. At the time he 
suggested that really the best option would be to port shading into the 
core NHibernate app, as is the case with Hibernate. I noticed this has been 
scheduled for v 5.0, which is good, but it's a little late for our project. 
To move this forward, I originally hoped to have the funding to contribute 
to this directly but this is no longer the case :(
 
Since then, Microsoft have just released the SQL Elastic Service (Azure 
only, but it's portable to on-prem I think) that works on providing 
IDbConnections to standard ADO.NET. Although it's SQL Server only, this 
seems to add a bunch of infrastructure support that it would make sense for 
any SQL Server/Azure based system make use of.
 
This is a prime candidate for a custom IConnectionProvider in NHibernate, I 
think.... except... it works like most multi-tenant based systems in 
that you provide the key and it will give you the correct ADO connection. 
With the current provider though:

   - I can't see how to pass a key when you get the connection (it's a 
   parameterles method)
   - Will this mess up 2nd level caching?

 What do you guys think? I'd like to provide this as a open source NuGet 
package but I can't see how to get past the GetConnection() method. Is 
Configure called only once per session factory or could I cheat and use 
this? Failing that, do you think it would be a major breaking change to 
create a GetConnection(object parm) overload that is then called by the 
rest of the NHibernate call stack?

Thanks for any advice

 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to