Expert one-on-one J2EE Design and Development phần 4

Chỉ khi chúng ta có một trang web trạng thái đối tượng kinh doanh tầng nhưng không quốc tịch (EJB phiên họp không quốc tịch trong một ứng dụng J2EE) một kiến trúc phân tán có khả năng để chứng minh mạnh mẽ hơn (và khả năng mở rộng) so với một kiến trúc ứng dụng web collocated. | Applying J2EE Technologies Only if we have a stateful web tier but stateless business objects stateless session EJBs in a J2EE application if a distributed architecture likely to prove more robust and scalable than a collocated web application architecture. If the business objects can potentially cause serious failures getting them out of process may greater resilience especially if the J2EE server offers sophisticated routing of stateless session bean calls. WebLogic for example can retry failed calls on stateless session beans to another server running the same EJB if the failed method is marked as idempotent not causing an update . A distributed architecture is not necessarily more robust than a collocated architecture. An architecture using stateless business objects is the only way to ensure that a distributed architecture is more robust - and more scalable - than a collocated architecture. Scalable and Robust Architectures The key determinant of the scalability and reliability of an architecture is whether it requires server-side state rather than whether it is distributed. The following three architectures are likely to prove outstandingly robust and scalable in descending order o Stateless architecture whether distributed or collocated This offers unmatched scalability performance and reliability. Scalability can be delivered by hardware routing devices and does not depend on sophisticated application server functionality. New servers can be added at will with no additional performance overhead. Resources outside the J2EE application such as databases will usually limit scalability. A surprisingly large proportion of web applications can be made to be stateless especially if it s possible to use cookies. o Distributed architecture with stateless business objects If the web container doesn t need to maintain session state adding a stateless out-of-process business object layer such as layer of remote EJBs usually won t increase scalability despite impairing

Không thể tạo bản xem trước, hãy bấm tải xuống
TÀI LIỆU MỚI ĐĂNG
37    71    1    24-05-2024
Đã 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.