I recently read several articles on CQRS and Event Sourcing. While the former seemed to me a very complex and risky decision to fix poorly executed business processes and poorly designed levels of access to data and a data model, the latter seemed like a solution to many problems.
Problems encountered while using Event Sourcing:
Get rid of relational databases and object relational mappers such as NHibernate and Entity Framework. It is unlikely that anyone in the field of programming wants to pay attention to such things as indexes, table / index fragmentation or normalization, how to create relational data and how to code / tune ORM (science in itself).
Combining a business model and a “database” in memory is an entity / aggregate service that stores all the important elements in memory, maintaining integrity, simply dropping CUD events somewhere without much trouble. Old objects can be evicted from memory and dumped into NoSQL storage (or something else) and are used for aggregated calculations, reports, searches and, if necessary, for reactivation. If I understand correctly, databases such as VoltDB use event dumping in a similar fashion, but are still relational databases that are separate from business logic.
It will also simplify concurrency: instead of locking (with possible full system deadlocks) or optimistic locking with a common success or failure logic depending on whether the data has changed in the meantime (or rather a complex DB), merge rules can be implemented in code.
History: There are no more problems with implementing audit functions, memory tables, or “deleted” marker columns or possibly deleted data that is still required.
//: , , , , , , , .
: , , , ORM. , ( - NoSQL, JSON XML). ( , ).
- N-/Relational DB/ORM mess
n- - . , , , -: , , - , " ": , SQL Server Access. , ( "Foreign Key", , "ReferenceSource" ), - ( ), , . ORM , . ( / ) .
, , , , , ( ), - , ORM. , , .
CQRS n-?
, SQL-, , , - . - CQRS - (, , ORM, " " " Google Stackoverflow" , .
- , ?
, CQRS, , "CQRS", , : , OR, . , - "", , - / . : , , , , Ford T , .
?
( CQRS)? ? - , , , !