New infra state machine
Introduce new state machine infra and related test infra, in order to improve the code organization around the FSM and commands.
The new infra uses StateMachineContext as entrypoint, and from there every command struct implements ApplicableCommand. ApplicableCommand applies the command by using the CommandContext, which contains storage and actions collector.
To facilitate the transition, I've introduced a MaybeApplicableCommand which is implemented for Command, and returns the command in case the new infra doesn't yet support that specific command.
The PR also shows two commands ported to the new infra.
Can you add a description for what the PR is about?
Do we still want to pursue this change, should we keep this open or close it? @tillrohrmann @slinkydeveloper
I think the approach is still valid, and I think it removes away a bit of complexity brought in by the Effects data structure...
Right now, I unfortunately don't have the capacity to migrate the existing state machine to the new abstractions. From a quick glance, it might help improve the codebase by removing the separate step of the EffectInterpreter. Since it is not a strictly required step for a distributed Restate, I would vote to pause this effort for until we have either more capacity or need to change the state machine of the partition processor in a substantial way.
I would vote to pause this effort for until we have either more capacity or need to change the state machine of the partition processor in a substantial way.
I can totally take this and port bit by bit the state machine when i have time, and/or when i touch it. Most likely i'll need to touch the state machine soon for some upcoming features.
I can totally take this and port bit by bit the state machine when i have time, and/or when i touch it. Most likely i'll need to touch the state machine soon for some upcoming features.
Before starting with this, I would like us to agree that this is the right approach or not. Right now, there are higher priority tasks that need to be done first, unfortunately.
Also, there is some inherent risk that we introduce bugs by porting the existing code incorrectly. That's why we need to review these changes. I fear that right now is not the best time for opening up this construction site.
this is not needed anymore