TAILIEUCHUNG - Phát triển Javascript - part 35

Tham khảo tài liệu 'phát triển javascript - part 35', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Polling for Data 313 Next up Listing makes sure the url property is set on the poller. In order to make this assertion we need a reference to the poller object so the method will need to return it. Listing Expecting the url property to be set test should set url property on poller object function var poller url assertSame url Implementing this test requires two additional lines as in Listing . Listing Setting the URL function poll url options var poller url return poller The remaining tests will simply check that the headers callbacks and interval are set properly on the poller. Doing so closely resembles what we just did with the underlying poller interface so I ll leave writing the tests as an exercise. Listing shows the final version of . Listing Final version of function poll url options var poller url options options return poller poll Download from 314 Streaming Data with Ajax and Comet Comet Polling will definitely help move an application in the general direction of live by making a more continuous data stream from the server to the client possible. However this simple model has two major drawbacks Polling too infrequently yields high latency. Polling too frequently yields too much server load which may be unnecessary if few requests actually bring back data. In systems requiring very low latency such as instant messaging polling to keep a constant data flow could easily mean hammering servers frequently enough to make the constant requests a scalability issue. When the traditional polling strategy becomes a problem we need to consider alternative options. Comet Ajax Push and Reverse Ajax are .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.