A friend asked about developing a multiplayer online chat system. After comparing some surveyed and open-source systems, the following conclusions were drawn:
- Server selection: smrtfoxserver 2.x. For server development, Java or Python can be chosen. Python can quickly develop prototype demos, and Java is also a good choice with many available open-source codes. The client supports Android, ActionScript, Unity 3D, Silverlight, etc., which basically covers mobile development.
There are successful cases and large companies also use it, so there is no need to worry about performance issues. The only drawback is that the cost is too high, but it is free for up to 100 users.
-
Server using openfire open-source server: The server is developed in Java and uses Mina internally to implement network interfaces. Mina is a non-blocking network protocol implementation similar to Netty and XSocket. Currently, only Android can be used as the client, using the asmack library. The XMPP protocol is used to implement message flow.
-
If mobile platforms are not considered, node.js + WebSocket can be used for implementation, which is also a good choice.
-
Tornado Python web server can be considered, which is also non-blocking and supports over 1K user connections.
-
It is recommended to use Amazon EC2 servers for easy scalability. The front-end can use Nginx + Tornado, developed in Python. The client technology uses HTML5 + native calls. Platforms: web, Android, iOS, WP7. Data exchange is done through REST APIs using JSON format. The database used is Amazon's MySQL.
-
Google GAE + Cloud SQL can be used. Advantages: no need to consider service scalability, as Google takes care of it for you.
Disadvantages: limited development languages and environments.
I have not used it personally, but I am planning to use the fifth solution to create a demo:
Goal: Build a platform for image communication, where users can easily communicate with each other through handwritten messages. It should be able to accommodate 100K users simultaneously.
Timeline: 1 year of part-time development.