spring-projects / spring-statemachine

Spring Statemachine is a framework for application developers to use state machine concepts with Spring.
1.54k stars 607 forks source link

Continue To Offer Blocking Methods Instead Of Deprecating/Removing Them #1092

Open mroeppis opened 1 year ago

mroeppis commented 1 year ago

While I can understand the basic motivation behind the new reactive approach for Spring Statemachine (as pointed out in the notes on M1 and RC1) I also believe we must acknowledge the progress achieved in the evolution of the Java language itself when it comes to concurrency (see JEP 444). It seems to me that we can reach the same goal with virtual threads (project Loom), i.e. not to block worker threads / keep the application throughput high, but also can we stick to a sequential programming style and don't have to switch over to a reactive world which is rather different (see this ETE 2021 video chapter for a brief comparison between Loom and Reactive).

I would like to propose not to deprecate/remove the current blocking methods (as opposed to the original announcement) for the sake of those not willing or being able to adopt to the reactive paradigm. This may be backed by the opinion that we have to follow a "Reactive all the way down the stack" application design to make meaningful use of it (see these Spring Blog notes on reactive programming).