4 ms·
What you're probably looking for is continuations, combine them with serialisation and you can have stateless (in that the state is in a persistent store and ca
by ac2u 3y ago
What you're probably looking for is continuations, combine them with serialisation and you can have stateless (in that the state is in a persistent store and can be picked up by any application server) workflow processing.
You stumbled upon a drawback yourself though:
>And as long as the back-end servers were all running the same version of my code
the continuation could be serialised and then picked up later with business logic that has since changed in your application, whether through changing requirements or bugfixes.
Therefore personally, (I'm not saying there aren't successful business implementations of continuations, just my own observations), in the wild, I've mostly seen long running async workflows being put together by either state machine modelling in whatever language the programmers are using to let workers run through multi-stage processes, or use of workflow engines to hoist the orchestration to a tooling layer and the regular "programming" is in the building blocks.
- VikingCoder 3y agoCorrect; next up, I imagine the compiler and linker working together with annotated code, where you don't deprecate old versions of functions until no more of the your clients are in that callstack. I believe Erlang has some tricks like this? In my head, I call them Versioned Method Tables. A function signature, and a table of pointers that implement that function, as of different versions of your compiled code...