-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Return real result in Web API /code/run
#1426
Comments
Perhaps this: For each When the game process receives the request, it shall populate a game-internal Map of these integers to their execution statuses (which can be one of two possible constructors: The web process then uses a different web API endpoint to poll the state of the game-internal execution-status Map. A web UI would use this to display "progress spinners", updating at intervals of, say, 1 second. Alternatively (and probably less usefully), "blocking" could be done within the web process until the command- |
@kostmo there is a type in Servant for sending values as they are produced - I played with it and it's not too bad - just do the blocking IO in I think this would be more efficient, AFAIK we do not allow running other commands while the last one is not finished. If that is so, should we really have a |
Correct, and in fact now we could indicate this circumstance to the caller, by providing a
The more I think about it, the less appealing it seems to do blocking in the web server. I'm not sure I fully understand |
@kostmo I don't understand how that would happen as in that case we would just reject it. Anyway I like the datatype suggestions and agree it would be nice to keep the state readonly if possible. I have to read more Servant docs to determine which path is better, but I hope one |
I would go further and say we must keep the state read-only at all costs! There should be a single code path for updating the game state --- the event handler. Anything else would just be asking for trouble. |
* send InProgress or Rejected * once REPLDone send Complete * closes #1426
Currently we don't wait for the evaluation to finish:
Getting back the result would make it possible to control Swarm remotely... or at least from different window.
The text was updated successfully, but these errors were encountered: