need advice in comunication between perl and php scripts

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
rycka
Forum Newbie
Posts: 1
Joined: Tue Mar 20, 2007 5:20 am

need advice in comunication between perl and php scripts

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply