开发者

Will memcache work in this scenario?

开发者 https://www.devze.com 2023-01-15 13:04 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消