Game Hall starting from Basics (5)--back to the chat room (above)

Source: Internet
Author: User
Tags function definition

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.