We have a fairly robust system using NHibernate, we're in the middle of migrating from a single database server to having two servers, one for administration and one for our public facing web site. This is mainly so that we can do things like content management with workflow that won’t affect the current site. As of today, they are two databases in the same server, but over time I can see using two physical machines with a web service call to push data.
So as an example, one of our marketing guys decides to introduce a new promotion through the admin , and schedule it for 2 weeks from now. We are working on a scheduling system that would push the new promotion to our production server when it’s kicked off. The intent was to use the same NHibernate providers for the data pushes, but we need to maintain referential integrity.
We’re using fluent nhibernate, and I can see writing two different class maps, and then using a some form of dependency injection ( IE structure map) of choosing which map to load. I was hoping for a better answer as that seems impossible to maintain as the system grows. Any suggestions?