NHibernate on the cloud: SQL Azure
I just finished running the NHibernate test suite against SQL Azure. I am very happy to say that It Just Works*.
Hat tip for Microsoft for managing to create an environment so similar to that of SQL Server under a drastically different conditions.
* The only caveat is that some Schema Export scripts fails on SQL Azure, it seems like drop table has some slightly different behavior with SQL Azure, it does not drop the table immediately, but there seems to be some delay before it actually happens (especially if you use a different connection to check for the existence of the table).
Comments
It's a modified sqlserver 2008 DB, so any DML statements will work, as long as there are no catalog names in the query + the schema names mentioned have to be owned by the user executing the queries. So any o/r mapper who can do that, (which IMHO is pretty much all) will work on Azure.
Frans,
To be completely honest, I would have been shocked if that weren't the case.
The reason that I posted this is to make sure that people are aware that this is available, and not dismiss it out of hand.
I got a few questions about "when will you port NHibernate to SQL Azure", this is meant to solve them.
well Azure still is flawed with 10GB database limit, and any question how they want to solve that remains unanswered (in MS terms: "very easy to scale, just make another 10 or 20 databases following our amazing patterns&practices (unreleased) you'll be in paradise in a moment")...
simply put, the whole world is waiting for a genius from MS to come and show Azure folks what to do when they reach the limit, or how to __simply design an application to use twenty databases at once, gosh...
watching and listnening the interviews you'll get the picture of scalability (well, that was/is with the table storage thing, but this is not real relational database) but your 10GB database won't scale...
"your" DB will still run on one (and only one) server...
enough of rant
Apologies if what I propose is deemed either a) naive, or b) ridiculous. I've only just starting looking into nHibernate so my comments come from those of a beginner.
Anyway with that out of the way ... presumably you could have multiple nHibernate sessions configured and pick the relevant on at the start of the request. Of course it's not that simple and it would depend on the requirements of the site, but could be useful until M$ get their act together.
Just a thought ...
Cowgar,
Agreed, see my next post about NHibernate Shards
Chitty,
You could, but then you are doing sharding on your own.
Comment preview