Friday, February 27, 2015

What is unit of work and relationship with CQRS/Event Sourcing?

See
http://martinfowler.com/eaaCatalog/unitOfWork.html



But I think this pattern is not applicable for CQRS/Event Sourcing, because SAGA is the way to deal with transaction in CQRS/Event Sourcing.
Reference:
https://msdn.microsoft.com/en-us/library/jj591569.aspx

Wednesday, February 25, 2015

What is Aggregate in DDD?

From Eric Evans book DDD Page 90
An AGGREGATE is a cluster of associated objects that we treat as a unit for the purpose of data changes. Each AGGREGATE has a root and a boundary. The boundary defines what is inside the AGGREGATE. The root is a single specific ENTITY contained in the AGGREGATE. The root is the only member of the AGGREGATE that outside objects are allowed to hold references to, although objects within the boundary may hold references to each other. ENTITIES other than the root have local identity, but it only needs to be unique within the aggregate, since no outside object can ever see it out of the context of the root ENTITY.

By Martin Fowler
a cluster of domain objects that can be treated as a single unit.
http://martinfowler.com/bliki/DDD_Aggregate.html

Monday, February 23, 2015

How to enable intellisense in Visual Studio after remove reSharper?

My Visual Studio inellisense stopped working after removed ReSharper(ReSharper is so slow).

The solution:
Tools->Options->Text Editor->All Languages->General
Turn off "Auto list members", and "Parameter information"
And turn on again.

Friday, February 20, 2015

How to get stream name list from Event Store?

Better idea from Greg Young

Greg Young gregoryyoung1@gmail.com 

Feb 20 (3 days ago)
to event-store 
What will happe  to your projection with 100m streams?




Original test code:

fromAll().
    when({
        $init: function(s,e) { return {streanList:"", count:0} },
        $any : function(s,e) {
            if (!s.streanList){
                s.streanList =" ";
            }
            if (s.streanList.indexOf(e.streamId) < 0){
               s.streanList = s.streanList + e.streamId +",";
               s.count++;
            }
        }
    })

Reference:
http://dbs-are-fn.com/2013/interview_greg_young_event_store/