I have a Mathematica program that modifies images that I would like to make available for other people to use through the web. The input is only one parameter. So, for example, I could run it as a command line action which takes an argument, then returns the image which pops up as a download from the web page.
What is a way to structure this functionality?
So, just to be clear I could have a function like
makeDecloudedImage[ image_, x_ : 0 < RationalQ < 1 ]
or whatever which returns a PNG. I want to know how to hook up a function like this (or another equivalent mechanism) to a web page. In one approach Mathematica itself would run as the web server; another idea would be to have the web server call Mathematica somehow (through shared memory maybe?). This would probably be running on a Linux box.
One approach might be to use CGI. The web page makes a CGI call to Mathematica, executes the function to create the file, returns the path to the file and quits. The problem with this approach is that the whole program has to load which takes a relatively long time. It would be better to have mathematica in memory and just call it like a server somehow from the web server OR have Mathematica be the web server itself.
HTTPHandling`StartWebServer. If you just touch that symbol it'll load the necessary package. – b3m2a1 May 22 '17 at 18:47MQTTLinkStartBroker::startError: The broker failed to run exiting with : EndOfFile (exit code 1) MQTTLinkConnectClient::errno: A system error was encountered trying to connect to localhost; the connection failedAny suggestion on this getting to work on linux. I tried on Ubuntu 16.04 and 14.04. – PlatoManiac May 27 '17 at 14:25