PHP calls python: process vs threads

J

johnny

What I want to do is the following:

Web user uploads a word doc, and I need it to move the uploaded word
doc, on to another machine and conver it to pdf. Then update the
database and allow immediate pdf download. I am thinking of using ftp
from machine 1 -> machine 2, then convert doc to pdf on machine 2,
using process or thread. What is the best way to go about doing this,
process or threads or pyro? Pdf is created by calling commands on the
command line, through python script.

Thank you in advance.
John
 
G

Gabriel Genellina

What I want to do is the following:

Web user uploads a word doc, and I need it to move the uploaded word
doc, on to another machine and conver it to pdf. Then update the
database and allow immediate pdf download. I am thinking of using ftp
from machine 1 -> machine 2, then convert doc to pdf on machine 2,
using process or thread. What is the best way to go about doing this,
process or threads or pyro? Pdf is created by calling commands on the
command line, through python script.

So, your python script does not write the pdf, just invokes some
other commands to do the job, and waits for completion?
In this case, I doubt Python would be a bottleneck, so the easy way
is to launch a new process on each job.
If you get many requests per second and notice that it's the Python
startup which is slowing down the whole process, then you could
consider changing it.
But in that case I'd change the way the PDF are converted, not the
Python script which controls that.


--
Gabriel Genellina
Softlab SRL

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
¡Abrí tu cuenta ya! - http://correo.yahoo.com.ar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top