tags:

views:

57

answers:

1

I have an application which deals with real-time data. A lot a data is written and read simultaneously from a db e.g. something like a chat application. I understand the use of memcache but I am not sure if it would be best to use it in this scenario. If yes, then how can I use it?

Note, I cannot use technologies like Comet, Websockets etc.

Thank you for your time.

A: 

A message queue should be suited for this task. You can write your own using Memcached as a back end, but there are production ready alternatives for php, such as RabbitMQ. Using a third party MQ is a good idea because writing your own code to scale the queue over multiple machines, to handle synchronization, etc is difficult.

Dana the Sane