문제

I am looking to develop an ASP.NET MVC app, which should have the capability to be run on Azure in the future. The app will be using the CQRS design pattern, which I am rather new to. The write model will use NHibernate with mappings. I am not sure what kind of database to use for the read model. The read model should have the following properties:

  • It doesn't need to be SQL based, but could be. NHibernate could be used there as well to create simple view model -> table type of mappings, with no foreign keys. SQL CE or SQLite in memory database could be used as the data provider. This also gives a little bit more flexibility when it comes to querying the data.

  • It could simply be an object serialized / deserializer which stores the view model objects as they are. It should make this easy to use and could utilize things like Azure Blob storage in the future. Are there any good frameworks that handle this in a good way?

I would love to get some feedback from some people who have built this kind of applications before.

도움이 되었습니까?

해결책

We are using Blob storage for CQRS Views backing up ASP.NET MVC 2 Web client (and desktop client as well). Some more details This is in production and is a great improvement over the previous version of views (NHibernate over SQL Azure)

It handles simple indexing and querying as well. For more complex scenarios I'm considering using subset of Table Storage functionality (only for really large sets that can't be partitioned).

다른 팁

For the Read Model, we use SQL Server 2008 R2 with WCF Data Services on top. The WCF Data Service is then configured to allow read only. The data in the SQL Server 2008 R2 database is one table per entity, with specialized Views created on top of those.

The ASP.NET MVC application doesn't access the entities directly, it only queries the views.

A scenario like this can be indexed nicely and the views give you ultimate flexibility.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top