What would it take to do calculations on demand, for instance having a form for users to provide parameters and get the result of a simulation in-page?
R-Tools does a nice job with a jQuery interface - apparently it passes the parameter values from the form to the R program by defining them on the R command line in some way.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We can do this in principle but there are unanswered design questions. We need to somehow:
make some kind of HTTP request when the form button is pushed, which includes the parameter names and values for whatever is being submitted.
This might be a special form of call to Special:GetProjectFile or might be to a different target URL
communicate the parameter names and values into the project before calling make
They could be exported as environment variables into the call
Or placed in a file of some name
Or something else?
Somehow make sure the computation will happen (i.e. make won't think everything is up to date) and will have access to the values submitted
Might there be a need to make sure the thing we just made doesn't show up later, in other places, without its context?
Or even a privacy issue where the result of someone's computation shouldn't be visible to anyone else?
I think that I like putting the request data into a file. This works well to trigger make to redo the computation, and there can easily be make rules to transform the request data file into various formats if needed.
Right now I think the things about hiding results are probably not important, but I could be wrong about that. If needed, maybe it could be done by creating special sessions, pretty much like preview sessions, which are similarly private.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
R-Tools does a nice job with a jQuery interface - apparently it passes the parameter values from the form to the R program by defining them on the R command line in some way.
We can do this in principle but there are unanswered design questions. We need to somehow:
I think that I like putting the request data into a file. This works well to trigger make to redo the computation, and there can easily be make rules to transform the request data file into various formats if needed.
Right now I think the things about hiding results are probably not important, but I could be wrong about that. If needed, maybe it could be done by creating special sessions, pretty much like preview sessions, which are similarly private.