Ideas on IM/chat system for social network website
I'm creating a social network website, and I need a IM/chat solution for it.
The conversations are only one-on-one, with the users being able to chat only with their friends (ie Facebook chat - no channels, no rooms ...).
The website is made in CodeIgniter(PHP) with MySQL database. Probably will be put on VPS (Linux), so I might have control on the environment. Also, it is expected to have more than 100 000 users.
So, I need some ideas about how to make the chat.
My ideas so far:
Node.js
and socket.io
, and having it independent from the other part of the website After some research and reading some answers here on SO
https://stackoverflow.com/a/11362929/928540
https://stackoverflow.com/a/5654487/928540
I really like to go with the idea of Node.js
and socket.io
, so I would like to hear some opinions about it, and maybe some guidance, links, help, tutorial ...
Also, it is expected to have more than 100 000 users
I think the question also is how many active users/connections.
Ajax poll on every X seconds (not good solution for website this size).
True that. This is a bad idea.
Implementing Jabber/XMPP system (I have no info about this, nor is it possible)
Something like Ejabberd with BOSH is pretty popular. I played with prosody because it is very easy to install and strophe.js as BOSH client(javascript in browser).
Using 3rd party service (like Pusher.com)
The easiest to implement(no scaling problems), but could get expensive. 5000 simultaneous connections will cost you 199 dollar per month(too expensive) which I think you might need? Then again you have about 5000 active connections so it is profitable(?).
creating the chat in Node.js and socket.io, and having it independent from the other part of the website
Very popular solution, but right now I believe some users are experiencing memory leaks(but this might have been solved). It might be only problem with websockets transport. Also it might not really be a leak, but just high memory usage because of lazy GC. I would advice to profile before fully commiting.
Meteor might be a solution you could use. It's designed to create "live" applications and I bet building a one-on-one messaging system is a breeze.
I know it isn't PHP, but you mentioned using Node.js and I figured if you could use Node.js then you could use this.
链接地址: http://www.djcxy.com/p/94110.html上一篇: 与chatjs.net的朋友列表聊天SignalR MVC
下一篇: 社交网站上IM /聊天系统的想法