I have a system of stochastic differential equations implemented in MATLAB. Just 4 variables integrated with Euler-Maruyama, so nothing too fancy… the technical details aren’t important for this question though.
How would you recommend I go about building a web interface (i.e., let people change the parameters and initial conditions in their web browser and then display the results)?
The first step should be translating the code to numpy/matplotlib, right?
Should I be saving the output as an image or doing some fancy HTML5 plotting stuff?
Are there any publicly available tools/frameworks that will make it easy to build a nice web UI for this kind of thing?
Any tips on where to host this kind of thing, or am I basically limited to setting up my own server?
If there are no constraints on the target language, I’d simply translate to
Rand useRApache. There are plenty of libraries to support this. In fact, you may not need to reimplement much code, given what’s available in R libraries.The reason I suggest R is that I’ve ported a lot of Matlab code to make it reusable or open, and R has usually been the easiest target for me, due to the libraries already developed.
EDIT/UPDATE: I overlooked using RStudio as a server. That might be the easiest way to go. See this page: http://www.rstudio.org/docs/server/getting_started.
Regarding where to set this up, you could look at using Amazon’s “micro instances”, if the amount of computation is very limited. There are also some new startups doing cloud stuff. One choice might be http://cloudnumbers.com/.
So, I’d recommend:
I would not recommend saving stuff to disk and re-loading it. It’s best to have things as smoothly coupled as possible, so that you don’t have to code stuff to maintain a state on the server or browser side.