0

I am developing a queue that requires communication between a php page and a php script. What I am having a difficult time with is understanding what would be a good path to take. In my queue, a user will generate a task on a php page, and a php script has to obtain that task and process it in a queue type fashion. I have read up that the following methods exist:

  • Normal files: My understanding is that the php page would create a file in a directory, while the php script would search for files in that directory and then use the information in those files to execute tasks.

  • Sockets: still fuzzy understanding. Something to do with sending information to a port that a script would be listening to.

  • Pipes: still fuzzy.

  • Tcp Connections: very fuzzy understanding.

  • Shared memory: not sure how different files would share memory. This seems very interesting, though I have no idea how it is implemented!

QUESTION: Which of these options (or any other option I am missing in my list) would you appropriate for inter script communication in php for my particular case and why? Note: The queue would probably be very active, receiving 1 task every second.

All feedback is greatly appreciated!

Webeng
  • 7,050
  • 4
  • 31
  • 59
  • 1
    We use Beanstalk queues for this in our applications. The Beanstalk server hides all the details. – Barmar May 14 '16 at 05:21
  • 1
    Unfortunately, this is not a good question for the StackExchange model of Q/A. There are likely to be arguments for and against each method, and no definitive answer. That's why opinion-based questions are considered off-topic. – Barmar May 14 '16 at 05:23
  • @Barmar I have taken your advice and have been trying to install beanstalkd for a few days now with little success: http://stackoverflow.com/questions/37307756/installing-with-the-linux-terminal – Webeng May 18 '16 at 18:45
  • @Barmar I have managed to install beanstalkd on a LAMP stack I made on my computer, and am really close in getting it to work, could you possibly let me know what I have missing here?: http://stackoverflow.com/questions/37356427/unable-to-get-beanstalkd-queue-to-work – Webeng May 20 '16 at 22:00
  • @Barmar haha sorry If Im asking you too many questions dude. I'm like soo close to getting pheanstalk to work. I think this might be the last thing I'm having an issue with. Getting an error with the pheanstalk class: http://stackoverflow.com/questions/37368944/fatal-error-class-pheanstalk-pheanstalk-not-found – Webeng May 21 '16 at 23:33

0 Answers0