Comet and Reverse Ajax

At the end of Chapter 3, we discussed a number of performance issues with the naive version of the Magnetic Poetry application that we'd developed. Let's see how your Jetty and Cometd implementation addresses these. On the client side, we had found that most browsers will only run two...

Mô tả đầy đủ

Đã lưu trong:
Chi tiết về thư mục
Những tác giả chính: Crane, Dave, McCarthy, Phil
Định dạng: Sách
Ngôn ngữ:English
Được phát hành: Apress 2012
Những chủ đề:
Truy cập trực tuyến:http://scholar.dlu.edu.vn/thuvienso/handle/DLU123456789/30929
Các nhãn: Thêm thẻ
Không có thẻ, Là người đầu tiên thẻ bản ghi này!
Thư viện lưu trữ: Thư viện Trường Đại học Đà Lạt
Miêu tả
Tóm tắt:At the end of Chapter 3, we discussed a number of performance issues with the naive version of the Magnetic Poetry application that we'd developed. Let's see how your Jetty and Cometd implementation addresses these. On the client side, we had found that most browsers will only run two concurrent HTTP requests to a given server, which resulted in blocking of ordinary Ajax requests. In this chapter, however, you've used a single Cometd connection to establish a collaborative magnetic board and report on the progress of your online bakery, with a satisfactorily low degree of coupling between the two components. All the while, you've left the second HTTP connection allowed by the browser open for fetching images and for your conventional Ajax requests. On the server side, we suspended servlet threads but didn't release the servlet back to the pool. This limited the number of clients that we could support and increased the resource footprint of our application considerably. Here, our CRUD functionality is employing Jetty continuations to release servlets, as discussed in Chapter 5. Because the bakery is not pausing the servlet thread but a secondary thread that references very few resources, you've also reduced the load on your servlet pool considerably.