It gives me great pleasure to announce that NHibernate.Remote is at the stage where a community preview is possible. It is still very raw software and not intended for any production environments, however it may give you a few ideas.
NHibernate.Remote is a WCF client for the popular ORM mapper NHibernate . For a long time when a user of NHibernate wanted to cross domain boundaries there was a lot of work involved in getting the NHibernate data over whatever means of communication was chosen. A specific set of CRUD methods had to be set up for each persistent type, data types had to be serialized and don’t even think about using the awesome lazy loaders remotely. Well with the advent of WCF I started thinking that there had to be a better way to exchange NHibernate data in an all .net world. I realize what I am doing breaks all the rules of SOA but I’m only working with .net clients so I can justify it, right? The major hurdle involved getting open generics to pass over WCF. Anyone that has tried this out-of-the-box knows that the serializer throws a nasty error, but there is another way. I created a generic messaging system library that would allow me to pass generic messages back and forth over WCF. To that I added a method router that handled generic types to allow generic methods to reach their counterparts on the server. Thus armed with a communications method that supported generics, I was able to get a lot of the ISession functionality to transmit over the wire to a remote client including LazyLoaded entities. Not only are the lazy loaded entities transmitted, but they are also reattatched to the remote session so that their functionality is preserved. Now then, I have to say right here, don’t get your hopes too high because this technology is still in its infancy. Right now saving only supports objects that have Guid’s as their primary keys, criteria queries are not working, and the testing has been very minimal. However generic HQL queries are definitely work as well as a “Linq esq” DynamicQuery language I have been working on.
So how do you get ahold of this technology? At this point you will have to use Subversion, as I have no intention of releasing a binary until the technology becomes more mature. However if you are versed in subversion you can grab the source here.
http://slagd.com/svn/NHibernate.Remote/Trunk
I welcome any and all comments about my code and if you happen to want to help out with the project then by all means contact me.
If you want to take a look a the GenericMessaging system then you can grab the source for that here.
http://slagd.com/svn/GenericMessaging/Trunk
Keep in mind that this is preview code only and is still under heavy development. I hope to have more documentation available as the project matures in the coming months.
Comming Soon: A brief how-to get started