简体   繁体   中英

Chat system implementation

I am required to implement a live chat system, somewhat similar to Facebook's in that it must:

  • Allow communication between 2 users
  • Store messages in an inbox/sent box
  • Store messages in inbox, marked unread if the user is offline when a message is sent
  • A language/spam filter must also be active, as needs to monitor communication involving minors.
  • Ideally, this will work on most devices/browsers including mobile access.

I pretty much have a blank canvas for this project in terms of what OS/software to use.

Having done a bit of research it seems like there's a few options / things to think about?

  • PHP/AJAX long polling (Comet-style) with a standard LAMP stack storing messages in a mysql DB
  • LEMP stack (nginx)using the HTTP Push Module, again Comet-style server with a php backend storing messages in a mysql DB
  • Node.js?
  • HTML5 interface to maintain browser/device support?
  • Best DB system for this? Some people suggested mongoDB?
  • Some people also suggested utilising MemCacheQ to boost performance.

What are your thoughts this? Any suggestions?

查看SignalR作为在客户端之间传递消息的方式,这是创建聊天应用程序的最简单方法。

This sounds like the sort of thing that the MEAN stack (MongoDB, Express.js, Angular.js, Node.js) combined with either socket.io, or lightstreamer would be good at. Lightstreamer is supposedly faster and more scalable than socket.io (and their live demo's don't make me doubt that), it also has a page in their documentation discussing PhoneGap (they handle phones that don't support WebSockets...which is useful, because, as I understand it, WebSockets aren't supported by most phones)

This isn't my area of expertise though, but it may be worth researching.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM