[Real-time web series] Real-time web message propagation mode

Source: Internet
Author: User

All message transmission modes are similar. There are three communication modes in the current network: unicast, broadcast, and multicast.

1. unicast:


 One-to-one communication mode between hosts. vswitches and vrouters in the network only forward data and do not copy the data. If 10 clients need the same data, the server needs to transmit the data one by one and repeat the same work for 10 times. However, because it can respond to each customer in a timely manner, the current web browsing mode is all single-play, specifically IP Unicast protocol. Vrouters and vswitches in the network select a transmission path based on the target address, and transmit the IP Unicast data to the specified destination.
 Advantages of unicast:
 1) the server responds to client requests in a timely manner
 2) The server can easily implement personalized services by sending inaccessible data for requests from each customer.
   
 Disadvantages of unicast:
 1) the server sends data streams to each client. The server traffic is equal to the number of clients × client traffic. The server is overwhelmed in streaming media applications with a large number of customers and high traffic per client.
 2) the existing network bandwidth is a pyramid structure, and the inter-city backbone bandwidth is only equivalent to 5% of the total bandwidth of all its users. If all the unicast protocols are used, the network trunk will be overwhelmed. Now P2P applications have congested the trunk. It is almost impossible to expand the trunk by 20 times.

2. Broadcast:


 One-to-all communication modes between hosts. The network copies and forwards signals from each host unconditionally, and all hosts can receive all information (whether required or not ), because it does not need to select a path, its network cost can be very low. A cable TV network is a typical broadcast network. Our TV actually receives signals from all channels, but only restores signals from one channel to a screen. Broadcast is also allowed in the data network, but it is restricted within the LAN of a layer-2 switch. Broadcast Data is prohibited from passing through the router to prevent broadcast data from affecting hosts in a large area.
 Broadcast advantages:
 1) simple network equipment, simple maintenance, and low network deployment cost
 2) because the server does not need to send data to each client separately, the server traffic load is extremely low.
   
 Disadvantages of broadcast:
 1) unable to provide personalized services in a timely manner based on the requirements and time of each customer.
 2) The network allows the server to provide data with limited bandwidth. The maximum bandwidth of the client = the total bandwidth of the service. For example, the cable TV client line supports 100 channels (IF digital compression technology is used, 500 channels can be provided theoretically ), even if the service provider has more financial resources to configure more sending devices and change them to the fiber trunk, the limit cannot be exceeded. That is to say, it is impossible to provide more diversified and personalized services to many customers.
 3) broadcast is prohibited from being transmitted over the Internet.

 3. Multicast:


 One-to-one communication mode between hosts, that is, hosts added to the same group can accept all data in this group, vswitches and vrouters in the network only copy and forward the required data to the demanders. A host can send a request to a vro to join or exit a group. The vro and vswitch in the network can copy and transmit data, that is, only the data in the group is transmitted to those hosts in the group. In this way, data can be transmitted to multiple hosts that need to be added to the group at a time, and other communications between hosts that do not need to be added to the group are not affected.
 Advantages of Multicast:
 1) clients with the same data stream need to join the same group to share a data stream, saving the server load. It has the advantages of broadcast.
 2) because the multicast protocol replicates and forwards data streams based on the receiver's needs, the total bandwidth of the server is not limited by the bandwidth of the client access end. The IP protocol supports over 0.2 billion multicast packets, so it provides a wide range of services.
 3) this protocol and unicast protocol allow transmission over the internet broadband network.
 
 Disadvantages of Multicast:
 1) Compared with the unicast protocol, there is no error correction mechanism and it is difficult to make up for packet loss errors, but it can be compensated through a certain Fault Tolerance Mechanism and QoS.
 2) Although the current network supports multicast transmission, it still needs to be improved in terms of customer authentication and QoS. These shortcomings have mature solutions theoretically, it only needs to be gradually applied to existing networks.

I learned about the three transmission modes of the network to see how messages are transmitted on the Real-time web.

1. unicast one-to-one message push, that is, the queue type in JMS;

2. One-to-multiple message pushing is the topic type in JMS;

3. Implement multicast variants. To improve performance, you can use the polling cookie or flash connection method to share a persistent connection for multiple pages.

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.