SVG + JavaScript + ASP. NET + WebService development of building management system (6)

Source: Internet
Author: User
Last articleSVG + JavaScript + ASP. NET + WebService development of building management system (5)

This article continues with the previous topic and summarizes the problems encountered during the development process.
The current architecture is as follows:

After the user sets the status of a device on the Web screen, the background processing will save the request to the database (No. 1 ), the process that deals with hardware will monitor the database in real time and immediately process the request (not shown ). At the same time, the client on the Web screen executes a setinterval. after a certain period of time, it starts WebService (No. 2). WebService returns the status of the current device and the request processing status (No. 3 ). The request processing is complete. The latest status is displayed on the screen and clearinterval is enabled.

At first, there was only one request, indicating/setting/monitoring had no problems.
However, after a large number of requests, the problem occurred. Basically, there are the following two phenomena:
1. The request and result do not match
2. The request cannot end

After thinking about WebService calling through JavaScript, WebService does not return the result to JavaScript immediately. The two are not synchronous, but asynchronous.
Therefore, the WebService return value must indicate the request's return value. Otherwise, the request does not match the result, and the request cannot be terminated.

The next article introduces some tips for JavaScript operations on SVG.

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.