Communication pre-system-Communication Service design

Source: Internet
Author: User

Let me introduce some of the issues that need attention when designing communication services.

1, the use of short-chain, or long-chain. The advantages of short-chain can be guaranteed to a certain extent the number of concurrent services, each communication is completed, the release of resources, the disadvantage is that each time the need to establish a link, waste of resources, communication time costs increased. Long-chain advantage for the first time need to establish a link, the next direct communication, reduce the short chain every time the establishment of link time; The disadvantage is that no matter whether there is data communication will occupy resources, such as more than 100 resources, perhaps the more than 100 links have no data communication time, also has been accounted for resources.

2, link to have a restart mechanism. Although TCP/IP is a reliable byte-stream protocol, who can guarantee that the link is constant. Who can guarantee that the link is normal?

3, communication module to be independent, support multiple link configuration.

4, communication module to each link between each other, can be designed as multi-threaded, multi-process, asynchronous Select.

5, the communication process can design time-out control, can also be designed to send test messages when the link is idle, for example, with UnionPay communication has test message 0000. The test message can avoid the communication zombie to some extent.

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.