Which dataccess technology is best for CQRS web services?

What tools do people use to query their Read database and populate the DTO?

Currently, we use our Read model in the Sql2008 database and fulfill all our requests through the WCF service. We use Fluent NHibernate to populate data contracts using automatic matching, but maybe it's just overkill?

Our requirements are really ...

  • No Sql Code in Webservice
  • There is no matching code in the Webservice, we ideally want to display by agreement, the Read database fields have the same names as our Data contract properties. We do not want to write and maintain the mapping code manually.
  • Minimal use of resources on the web server.
+3
source share
3 answers

I have used WCF data services with great success on the read side. I wrote a blog post about this. Check it out at http://blog.fossmo.net/post/WCF-Data-Services-A-perfect-fit-for-our-CQRS-implementation.aspx

+1
source

IMHO Overkill.

I use only a flat file system with JSON / ProtoBuf serialization. Web services are simple, and the scheme can be anything. The stack moves easily to the cloud (using Azure Storage Blobs) for almost infinite scalability as needed.

Details: http://abdullin.com/journal/2011/1/19/scalable-and-simple-cqrs-views-in-the-cloud.html

+3
source

​​ADO.NET . , , , Dtos.

CodeGen

, WCF, DataReader, Dto, DTO. , 3 . , , "DataReader-Wrapper", ( ).

- DataReader DataReaders. , DataReader Wrappers - TypeSafe

, ( ), , WCF. , , , . DataAccess ( ADO.NET Core - ), - WCF - " ", , .

  • .
  • .
  • A stored procedure can have control flow statements and can call other stored procedures (so you get a reuse procedure like sorting a rectoring in such a way that you can call it from several other methods).
  • It is much easier to optimize the stored procedure, since the tools work very well with them.
0
source

Source: https://habr.com/ru/post/1794681/


All Articles