Splitting Projections and Aggregates Across Applications #480
-
I'm considering ways to optimize our event sourcing setup with spatie/laravel-event-sourcing and have a question about splitting components:
The goal is to allow for more targeted scaling and resource allocation. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I have done this or something similar using composer and dependencies and service providers. You can put for instance an aggregate in one package, then put an aggregate partial and/or a projector that "subscribes" to certain events handled by the aggregate in another package, and register the projector in the package's service provider. Simply install both packages into your Laravel app. If you want them truly running entirely separate (as in possible on another app server or droplet, container etc) then that would require a lot of additional set up on your part, with no help from the package. |
Beta Was this translation helpful? Give feedback.
I have done this or something similar using composer and dependencies and service providers. You can put for instance an aggregate in one package, then put an aggregate partial and/or a projector that "subscribes" to certain events handled by the aggregate in another package, and register the projector in the package's service provider. Simply install both packages into your Laravel app.
If you want them truly running entirely separate (as in possible on another app server or droplet, container etc) then that would require a lot of additional set up on your part, with no help from the package.