Closed johnmcdonnell closed 11 years ago
Another solution would be moving to the dispatching model discussed here: http://flask.pocoo.org/docs/patterns/appdispatch/#combining-applications
I like this model, but does it address our port management issue?
Well I think in this model there's only one server running both the dashboard and the experiment.
remind me again the downside of just having /dashboard be a part of the main server (with some authentication on it)? with that approach you always have access to dashboard when the experiment server is running (and vice versa). there's no real cost to offering the dashboard and not using it. so basically when you run 'psiturk' it starts up the whole system and if you kill or cntrl-c it the whole system goes down.
The dashboard server needs to be single threaded, and the psiTurk server needs to be multi-threaded. So they need to be separate processes. I also like stability the modularity provides.
When Werkzeug opens the port socket, it sets the close-on-exec flag to 0, this needs to be 1.