Page 1 of 1

need advice in comunication between perl and php scripts

Posted: Tue Mar 20, 2007 8:07 am
by rycka
Hallo,

i need your advice how to write such code.

now my program works in such way. User comes to php site, enter some data,(which need calculation), and press calculate. php scripts runs perl, code which calculates data, and writes to files, then php script takes that info and gives to user.

But i need to write this to work like deamon. like, user comes to website enter some data. php check if perl is calculating or not, and adds to queue, and gives to user some id, with this id user could check results later . that perl script run jobs from queue one by one.

maybe you can help how to easiest do in that way, save data in some files with unique names, or in one file. how to check perl script is runing or not...?


p.s. sry for my poor english
thx

Posted: Tue Mar 20, 2007 8:25 am
by feyd
When queues are involved, it's typically recommended to use a database to store the queue and status of the script. Often this will involve cron too.