Wiki-defined chat room
Online chat rooms are often referred to as chat rooms, a web forum where people can talk online, and people in the same chat room talk in real time through broadcast messages.
Chat rooms can be built on instant messaging software (such as MSN Messenger, QQ), Peer-to-peer software, the World Wide Web (such as Halapo, Meebo) on the basis of the World Wide Web is more common and a wide variety of means of conversation is not limited to text, but also including voice, video. Usually the chat room is in accordance with the room or channel, in the same room or channel network people can broadcast and read the public information in real time. In general, unlike other web forums and instant messaging, chat rooms do not save chat records.
Basic function definition of chat room
Users can connect to a service in some form, send their own information to many people who share the same service, and see information sent by others who use the same service.
The behavior of the chat room
The general chat room behavior divides into two kinds
"Push" and "pull"
Push chat Room
The act of pushing a chat room is close to a transit point, or a radio station.
The chat room is simple and clear.
Because there is no need to save information, there is no critical data to be accessed by multiple threads, and it does not involve a lock and does not produce a corresponding performance loss.
The disadvantage is also obvious, it only supports connections that the server can push directly to the client (TCP, UDP, for example), and HTTP is not available for this connectionless protocol. If it is a temporary drop, then all the data before the connection is not received.
Variant variety point to point chat room
The server transfers the push obligation to the client.
This way to the user to send the content control 0, if not Tencent this Daniel in the Great Socialist stage of socialism in the harmonious society you have to do this kind of point-to-point chat room, suggest a good lawyer
Another kind of chat room is
Pull the chat room
Most HTTP based chat rooms are based on this mode of distortion.
Benefits: Support for connectionless disconnected support seamless disconnection
Disadvantage: Having public data can cause concurrent conflicts that can degrade performance because of locks.