I am working on a fairly simple CGI with Python. I am going to put it in Django etc. The general setup is fairly standard server (i.e., the calculation is performed on the server):
- The user downloads the data files and clicks the "Run" button
- The server automatically starts tasks behind the scenes, using a lot of RAM and processor power. ~ 5-10 minutes later (average use case), the program terminates by creating its output file and some .png shape files.
- The server displays a web page with numbers and summary text.
I do not think that hundreds or thousands of people will use it right away; however, since the calculation takes place with sufficient RAM and processor power (each instance launches the most CPU-intensive task using the Python Pool ).
I was wondering if you know whether it is worth using a queuing system. I stumbled upon a Python module called beanstalkc , but on the page he said it was a "in-memory" system.
What does โin memoryโ mean in this context? I'm worried about memory, not just CPU time, so I want only one job to execute at a time (or it was stored in RAM, regardless of whether it gets CPU time).
In addition, I tried to decide
- the results page (served by CGI) should tell you its position in the queue (until it starts, and then displays the actual results page)
OR
- the user must send their email address to CGI, which will email them a link to the results page when it is complete.
What, in your opinion, is the appropriate design methodology for CGI light traffic for this kind of problem? Advice is greatly appreciated.
source share