WCF + CQRS + Push Notifications

I need to design a system of clients connecting to WCF services to perform read and write operations in the database, as well as receive notifications.

I was told to use the CQRS pattern.

As an example, customers will connect to a service to perform operations such as Get Product List and Update Product . They will also be able to do something like Accept Shipment and Reject Shipment (which may lead to a race between customers who are the first to do this). Only one customer can โ€œacceptโ€ the goods or โ€œrejectโ€ the goods.

So I read a little about CQRS and realized that it separates reading from writing (using commands). However, I am not sure about some serious issues if I use CQRS:

  1. If I use the CQRS pattern in the WCF service, can I count on what is running synchronously in the database? I'm a little confused because I don't want the service to be single-threaded (to support future scalability), but on the other hand, how do I make sure that the write operations in the service are performed in the correct order? or even read operations? Does the CQRS template guarantee streamlined processing? (someone told me here that the CQRS template uses the 'update' queue to update requests for offline processing).

  2. Does using CQRS fix concurrency issues?

  3. - TransactionScope , ?

  4. , , , . : design

" " CQRS, . , X. . , , 15 , , , . , , 20 ? - , , , " ". . " , ". ??

+3
2

, , , (, , ) CQRS ?

: CQRS , , , .

CQRS (. , ).

, :

  • ?
  • BC: CRUD ?
  • CRUD
  • , ? ( ).
  • , , , ? (. " " , ).
  • , .

: . , . CQRS, BC .

, , CQRS.

+2
  • , , . .
  • , , , , , . . , , , . , CQRS . CQRS concurrency , DDD, concurrency - -. , , .
  • ; , ( )/ / , .
  • You want to use something like MassTransit + SignalR. Create a reading model (basically a DTO on the screen ) that subscribes to events and sends notifications to the browser through the SignalR hub.
0
source

All Articles