Fork me on GitHub
#missionary
<
2023-08-07
>
Petrus Theron07:08:39

Are missionary flows/tasks suitable for long-running tasks? If yes, can state be persisted?

leonoel07:08:28

you mean survive a JVM crash+reboot ?

Petrus Theron08:08:32

Let's assume graceful shutdown. I am considering if I can use Missionary to model some async parallel Tasks that represents jobs in the real-world. I guess would need to be able to query the graph? Concrete case: three real-world tasks T1, T2 & T3 are assigned to two people/workers (P1 & P2). P1 gets T1 & T2, P2 gets T3. I want something to happen when both P1 & P2 have marked all their tasks as complete or cancelled. Basically use Missionary for Workflows.

leonoel08:08:30

you can model a workflow with missionary as long as its lifecycle is bound to the JVM process

Petrus Theron08:08:32

Right. And if I need to shut down the JVM, I can remember task states, cancel all those task and on restart, I could recreate them as a fresh flow on startup?

Petrus Theron08:08:52

do tasks have IDs internally or is it closures all the way down?

leonoel08:08:02

It is closures all the way down, I don't see a clear path to serialize and persist automagically

👍 2