You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One option is to run them serially, as they are now, but on a separate thread so that the post-event method returns more quickly.
Another option is to run them in parallel on multiple threads, but this would require providing separate copies of the domain model state to avoid read collisions across multiple threads. This may be too expensive for complex domain data models. In terms of implementation, the projection handlers would probably change to take a reference to a domain data object instead of using the shared property. It is possible to make method calls thread safe but it's unreasonable to expect a library consumer to make all the various properties of a domain model thread safe (with lock everywhere, for example).
It may be useful to make this a configurable policy per domain model.
The text was updated successfully, but these errors were encountered:
Projections can run out-of-band.
One option is to run them serially, as they are now, but on a separate thread so that the post-event method returns more quickly.
Another option is to run them in parallel on multiple threads, but this would require providing separate copies of the domain model state to avoid read collisions across multiple threads. This may be too expensive for complex domain data models. In terms of implementation, the projection handlers would probably change to take a reference to a domain data object instead of using the shared property. It is possible to make method calls thread safe but it's unreasonable to expect a library consumer to make all the various properties of a domain model thread safe (with
lock
everywhere, for example).It may be useful to make this a configurable policy per domain model.
The text was updated successfully, but these errors were encountered: