<p>I am developing a website that runs a simulation given a user-submitted script. I tried to follow some Online Judge architectures, but in my case, I need to send user input and receive the output in realtime, like a simulation.</p>
<p>I tried Kubernetes Jobs, but isn't seems so easy to communicate with the container, especially if I need a Kubernetes client on the language that I am working.</p>
<p>So, my question is: Given this scenario, what is the best approach to orchestrate multiple containers with interactive I/O programmatically?</p>
<p><img src="https://i.stack.imgur.com/QTAqr.png" alt="Diagram" /></p>
<p>*Obs.: I am not worrying about security yet.</p>

Ícaro Lima
<p>Please take a look at the design of the spark operator:</p>
<p><a href="https://github.com/GoogleCloudPlatform/spark-on-k8s-operator" rel="nofollow noreferrer">https://github.com/GoogleCloudPlatform/spark-on-k8s-operator</a></p>
<p>That has a somewhat similar design to what you’re targeting. Similarly, Argo Workflow is another example:</p>
<p><a href="https://github.com/argoproj/argo" rel="nofollow noreferrer">https://github.com/argoproj/argo</a></p>
