Open bwaidelich opened 10 months ago
A sequence diagram of the current flow for
ContentRepository::handle()
:
and ContentRepository::catchUpProjection()
that is triggered in a separate process:
Thanks for the write-up! I didn't think your suggestion through yet, but wanted to leave one thought already. Using the fork-approach might be tricky, as I assume that most hosting providers will now have the pctnl extension enabled. So, if that's a hard requirements, people will have trouble using Neos in at a vanilla hosting provider.
Thanks for the write-up! I didn't think your suggestion through yet, but wanted to leave one thought already. Using the fork-approach might be tricky, as I assume that most hosting providers will now have the pctnl extension enabled. So, if that's a hard requirements, people will have trouble using Neos in at a vanilla hosting provider.
Funnily we do have it :D But yes, this is a separate issue and in the end doesn't really fix much for now, so we can probably think about it later.
From todays Weekly:
The
CatchUp
mechanism was overhauled with #4289 but the current implementation still has some issues:By default we use
Scripts::executeCommandAsync()
(using the SubprocessProjectionCatchUpTrigger) to trigger catch ups. This can lead to many sub requests if there are a lot of commands (e.g. multiple editors creating content simultaneously).Apart from the eminent performance issue this can bring, those sub requests might be killed if the parent request ends (or due to process limits).
Update: After going back and forth I now suggest:
ContentRepository::handle()
will always be blocking until all projections are up to dateEventPersister
will simply triggerProjectionInterface::apply()
for every new published eventConsiderations
ProjectionCatchUpTriggerInterface
could interact with a background worker (e.g. via socket) but the catch up would still be blockingContentRepository::handleAsync()
later if we find that we really need it (but my feeling is that this only makes sense when we introduce a proper write side model for constraint checks etc)Current architecture
Suggested architecture
The original ideas I wrote down in November 2023 when creating this issue:
Related: #4388