Improbable Icon


Long running command



I am considering whether to pick up SpatialOS as a primary platform for my development, but I have a couple of concerns. I haven’t delved into development with SpatialOS as of yet, however, when I read the documentation for creating workers it says you can not have multiple seconds between calls to the process ops method because the worker will get timed out and killed. Additionally, when a worker calls a command if the command is still running and the entity changes worker authority the command will cause an error on the worker.

So my question is how does one implement a command that would be long running and might take many seconds to run. Let’s just say I’m generating a procedural world and I want to generate parts of it while the game is running. I imagine I would want to spin up a dedicated worker to do the procedural generation call, but it’s likely the generation will take more than a few seconds. Additionally, I wouldn’t want the worker to lose authority of the generated world entity and suddenly error out and stop generating the world. What would be the approach in SpatialOS to achieve this? And is something like this even possible?