Will memcache work in this scenario?
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 underst开发者_运维问答and 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 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.
精彩评论