0

I have a scenario where I have drop message to queue and fetch this message from other process and do the stuff.

I have a website written on PHP, I am reading and writing to Redis while main database is MySQL.

I don't want to delay user response time, so i am using Redis. After writing to Redis i want to drop a message in queue and then other process running will read it and store the transaction in database. So sending a message to queue while writing to Redis is not a problem as this can be easily done in PHP, reading from queue can also be achieved by running a PHP script in domain (with open socket), cron etc.

I need to know if there is any opensource software available which can read the message from queue as soon as they arrive and trigger a PHP script with parameters. This mechanism will be fast.

I am not sure about the efficiency of PHP socket running as domain, but for cron there is certain delay.

Pawan
  • 517
  • 1
  • 9
  • 25
  • Have you looked at Node? http://howtonode.org/node-redis-fun – BenOfTheNorth Mar 02 '13 at 11:11
  • Hi Ben, Thanks looked into node-redis link. Not sure how this will apply in my case. – Pawan Mar 02 '13 at 11:21
  • 1
    Not the best link, but node.js (together with socket.io) is great at being a socket server, especially with pushing messages (and writing/reading mysql). I believe it's what SO use here when new comments/answers are left also. – BenOfTheNorth Mar 02 '13 at 11:39

0 Answers0