Use XMLSocket to monitor the production system in flash (1-2)

Source: Internet
Author: User
However, the structure of the B/S system is not omnipotent. due to the limitation of its working mechanism, in some categories, it is difficult to achieve the request efficiency by using the B/S system structure in the past. Under typical circumstances, Web pages and most Web applications use a work machine called a request/response, but the B/S system structure is not omnipotent. due to the limitation of its working mechanism, in some categories, it is difficult to achieve the request efficiency by using the B/S system structure. In typical cases, Web pages and most Web applications use a mechanism called request/response:

O the application clicks a hyperlink or submits a form.
O the browser sends a request to the server.
O the server starts a session.
The o server sends the data to the browser after processing.
O closed session on the server, and data is displayed in the browser.

We can see that when designing the B/S system structure software, two restrictions cannot be avoided: passive and lagging. First, the application must make a request through the browser, and the server can respond. in some areas, such as timely monitoring, the server must actively send data to the client under specific circumstances, the application of traditional B/S system structure skills makes it very difficult to achieve this goal. Second, each request from the server must start a session, and the time consumed by the server processing and network transmission naturally results in a lag of the customer.

Some readers may disagree that the chat room adopts the B/S system structure. Why can the server send the comments of every user in the chat room every few seconds? In fact, the chat room still adopts the B/S system structure's request/response mechanism, but the client sends a request every few seconds. curious readers can look at the source code of the chat room webpage, you can find such a statement in the source code header:
It sends a request every two seconds.

During software design, industrial production systems are often monitored in a timely manner to understand the operating status of production systems at any time. However, in the past, it was difficult to ensure timeliness if the Web method was used, requests are sent to the server every few seconds, which wastes network resources and brings additional burden to the system. If the B/S system structure is hard to be used, of course, there are methods to use the Applet. due to Java security restrictions, each client must be configured for security, but what is the difference between this and the C/S system structure? it has lost the advantages of the "thin customer" in the B/S system structure.

Since the announcement of Flash 5, the XML and XMLSocket techniques have effectively solved the limitations of the passive and lagging structure of the B/S system, without the Java security restrictions, the new Flash MX has been greatly enhanced. This article will first use XML and XMLSocket techniques to monitor the production system in a timely manner. at the same time, in order to facilitate the test, we first introduced a program that imitates the service. (All preferences in this article will be based on the latest Flash MX version of Falsh .)

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.