Closed mjavadhpour closed 6 years ago
Hi, it is still the old workflow. The new workflow is not 100% done yet, but I think I will finalize it between christmas and new year.
About you questions:
Where is the EventConsumer: You have to dedicate a single machine to run the consumers. There is the IEventConsumer interface and a EventConsumerGrain which handles the workflow and subscribes to events.
Did application completely follow the flow? Everything in the App
BoundedContext. See Squidex.Domain.Apps namespace.
PubSub is an implementation detail for MongoDB. As a command handler you do not have to care abou that. It is only used the wake up the event consumer, not to publish events.
The big change is basically reflected by this line:s https://github.com/Squidex/squidex/blob/00293d0f5eaba90104ab0eac0f0ca4a02c949729/src/Squidex.Infrastructure/Commands/DomainObjectBase.cs#L103
You see that each domain object (App, schema, content, asset, ...) also writes the snapshot directly, which is also used for querying data (over snapshots). But the infrastructure has not been changed. Events can still be used to subscribe to them or to do less important stuff (e.g. update statistics).
I just try to follow the CQRS Pattern in Squidex according to the documentation:
I have known that you remove CQRS principle for some reason. but I want to understand what is the old workflow and how you handle it. I follow the request from API Layer to find each part of the application.
The main question is:
Event Consumer
?App
?App
?Thank you.