A small task queue or message queue would serve the purpose of tying the webserver to the other external tasks: 1) Web server queues job; 2) polls via ajax for status or they could run syncronously. Python is not my forte but there are a number that look like they integrate very well with python. A couple that look like they might be suitable from a quick google are huey or celery.
John On Tue, Jul 7, 2015 at 6:13 AM, Bob Camp <kb...@n1k.org> wrote: > Hi > > Having done this on *very* small machines with cgi before, the lag has > never been > an issue. Yes, the things I do are “tweaks” to variables, or data > requests. I do not try > to spawn a piece of code to compute PI to 800 places and wait for the > result. > > Bob > > > On Jul 6, 2015, at 10:24 PM, Jim Lux <jim...@earthlink.net> wrote: > > > > On 7/6/15 3:19 PM, Tom Harris wrote: > >> Since you want simple just use a CGI script written in your language of > >> choice. Very easy technology to learn, Python has support libraries out > of > >> the box if you want. You have a webpge with carious simple controls on > it > >> like buttons etc, you click a special button that posts a request to a > URL, > >> the webserver runs a script that generates the response, the webserver > >> serves it out, your browser displays it. Why bother with learning a > >> framework? Messing about with mechanics is far more fun! > >> > >> > > > > > > > > The only hiccup with the cgi approach (and with "directly code the > action in the guts of the server" like with flask) is that the subprocess > that's spawned has to complete before control returns (e.g. to serve stdout > to the user). So if you want to fire off a task that will run in parallel > with the webserver's other stuff, you need to have some sort of > interprocess communication (e.g. a named pipe, socket, file, MPI > communicator, etc.). (or you do something like run "at" or "batch", which > is basically using a file as a interprocess communication, and the at > daemon watches the file) > > > > > > > > _______________________________________________ > > time-nuts mailing list -- time-nuts@febo.com > > To unsubscribe, go to > https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > > and follow the instructions there. > > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to > https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there. > _______________________________________________ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts and follow the instructions there.