Fork me on GitHub
#onyx
<
2016-12-16
>
yonatanel23:12:54

@gardnervickers What you're saying is that aggregation init should be able to rely on external context? I'm not sure they are built for that though it would make my scenario more comfortable to implement. You asked what's preventing using aggregation init to load the external state as seed, and the answer is you don't have external context params in aggregation init (i should check this actually) and you don't know which group you are initializing (and group determines which state you need).

yonatanel23:12:27

This is one of the final things I need to figure out before I can use onyx for CQRS. How to initialize an aggregation with existing state when the first relevant segment arrives.

yonatanel23:12:11

@hugesandwich Are you creating a job for each configuration in your application? Perhaps my aggregations should be whole jobs instead.

yonatanel23:12:28

@michaeldrogalis @lucasbradstreet Can jobs be used for one-off things like constructing an initial state? Can I have thousands of throwaway jobs like these, triggered from time to time and shut down when finished? Or even act as a microservice/actor, e.g a job for each user of the application, a job per shopping cart etc.