Using memcached as a database buffer for chat messages

后端 未结 2 1251
不思量自难忘°
不思量自难忘° 2020-12-09 23:03

I am playing around with building a chat application using PHP and CodeIgniter.

For this, I am implementing a cache \'buffer\' with memcached to hold the most recent

相关标签:
2条回答
  • 2020-12-09 23:06

    Why don't use INSERT DELAYED ? It offers you almost the same functionality you are trying to achieve without the need of memcached.

    Anyway your solution looks good, too.

    0 讨论(0)
  • 2020-12-09 23:18

    Have you looked into HTML5 socket connections? With a socket server, you do not need to store anything. The server receives a message from one subscriber, and immediately sends it back out to the correct subscribers. I have not done this myself using HTML5, but I know the functionality now exists. I have done this before using Flash which also supports socket conenctions.

    0 讨论(0)
提交回复
热议问题