690 likes | 786 Views
Computer Networks Webcommerce by Linnea Reppa Douglas Martindale Lev Shalevich. Part I. The E-Boutique Commerce Site:. Three tier architecture using Java Server technologies. JSP Pages. Java Servlet. Web Client (HTML). HTTP Request. Java Beans. HTTP Response. CGI Script.
E N D
Computer NetworksWebcommerce byLinnea ReppaDouglas MartindaleLev Shalevich
The E-Boutique Commerce Site: • Three tier architecture using Java Server technologies JSP Pages Java Servlet Web Client (HTML) HTTP Request Java Beans HTTP Response CGIScript
Java Server Technologies • Java Servlets • JavaServer Pages • JavaBeans • Need a Web server that supports the Java Servlet and JavaServer Pages APIs. The E-Boutique site uses the Apache Tomcat server (available at http://jakarta.apache.org). • Run over standard HTTP
Java Servlet Technology • Servlets are standard, server-side Java application components that act as a middle layer between Web clients and enterprise applications and/or databases. • Purpose is to accept an HTTP request, perform any necessary processing, which may involve invoking other applications and/or objects, and format an HTML reply. • All processing occurs in the server. • Analogous to Common Gateway Interface (CGI) programs, but provide superior scalability, portability, and convenience.
Java Servlet Technology(Continue) • With traditional CGI, the operating system creates a new process for every HTTP request. A Servlet gets loaded into the Web server's memory the first time it is requested, and subsequent requests call the servlet instance already in memory with threads dispatched to handle individual requests. Because the compiled servlet is stored in memory, fewer system resources are needed at run-time and system response is very fast. • Servlets come with an infrastructure for automatically parsing HTML form data, reading and setting HTTP headers, and tracking sessions.
Java Servlet Technology(Continue) • The HttpServletRequest object automatically created by the Servlet represents a session object. The session object can be used to store any type of object, including beans, and is identified by a unique session key. This feature allows for the persistence of data throughout the session. • The HttpServletRequest also contains the form data of the most recently submitted HTTP form. The servlet engine takes care of all form field parsing.
Java Server Pages (JSP) • JSP technology was developed as a method to separate dynamic content, specific to the processing of a user request, from static HTML page design. • JSP pages mix HTML and JSP-specific syntax. JSP pages are composed of HTML written in the normal manner, and Java code enclosed in special tags for the dynamic content. • A JSP page is in fact a servlet: JSP class files extend the HttpJspBase class, which in turn implements the Servlet interface.
Java Server Pages (JSP)(Continue) • The advantage of this architecture is that there is very little processing logic within the presentation page itself; it is simply responsible for retrieving the JavaBean objects previously created by the servlet controller, extracting the bean information for dynamic content, and inserting the content within standard HTML components. • Like servlets, provide a very efficient solution because they're only loaded once as an operating system process and individual requests are handled via threads.
JavaBeans • JavaBeans provide an architecture for building and using Java components. • JavaBean components are nothing but Java classes that follow a well-defined design/naming pattern. A bean encapsulates its properties by declaring them private and provides public access (get/set) methods for reading and modifying their values. • Persistence, a key feature of JavaBeans,enables a bean to save its state. • The use of JavaBeans with Servlet and JSP technology is especially advantageous because beans can act as data encapsulators to allow data to persist, enabling collaboration between servlets JSP pages.
Results of WebStress on E-boutique's OrderProc Servlet (before server maintenance)
Simultaneous Users Median of All Responses Mean of All Responses Median of Positive Responces Mean of Positive Responces Error Rates 5 230 225 230 225 0% 10 526 537 526 537 0% 15 762 777 762 777 0% 20 1012 1344 831 1349 15% 25 1242 2063 891 1091 20% 30 1272 1253 961 1232 30% 35 1242 1141 961 1082 34% 40 1352 2325 1221 2182 40% 45 1432 2841 1322 2393 56% 50 1452 1711 1512 1883 58% 55 1552 2325 3184 3233 65% 60 1532 2346 3315 3384 68% 65 1752 2774 3375 3681 66% 70 1542 2500 3502 2453 54% 75 1732 3113 3445 3826 60% 80 1782 3470 4016 3986 68% 85 1902 3603 3785 4031 58% 90 1882 3223 3415 3347 58% 95 1993 3962 3765 3981 59% 100 2194 4038 3855 4016 63%
Median Response Time Related to Simultaneous Users (Order Processing Servlet before Server Maintenance)
Mean Response Time Related to Simultaneous Users (Order Processing Servlet before Server Maintenance
Median Response Time Related to Simultaneous Users (Order Processing Servlet before Server Maintenance)-Filtered Responses
Mean Response Time Related to Simultaneous Users (Order Processing Servlet before Server Maintenance)-Filtered Responses
Error Rates for Order Processing Servlet Before Server Maintenance
Comparison of Median Responses vs. Filtered Median Response (Order Processing Servlet before Server Maintenance)
Comparison of Mean Responses vs. Filtered Mean Responses (Order Processing Servlet before Server Maintenance)
Results of WebStress on E-boutique's OrderProc Servlet (after server maintenance)
Simultaneous Users Median of All Responses Mean of All Responses Median of Positive Responces Mean of Positive Responces Error Rates 5 110 114 110 114 0% 10 260 293 260 293 0% 15 280 451 280 451 0% 20 321 569 321 569 0% 25 671 655 671 655 0% 30 591 686 591 686 0% 35 520 748 520 748 0% 40 631 720 621 697 8% 45 781 857 741 819 16% 50 751 831 721 804 10% 55 891 949 801 918 18% 60 1001 914 821 869 23% 65 1021 948 882 914 22% 70 1071 1244 1041 1342 38% 75 1091 1658 1121 1879 28% 80 1482 1397 1142 1534 29% 85 1131 2263 1131 2285 23% 90 1202 1952 1222 2200 36% 95 1172 2174 1232 2058 33% 100 1162 1782 1322 1887 44%
Median Response Time Related to Simultaneous Users (Order Processing Servlet after Server Maintenance)
Mean Response Time Related to Simultaneous Users (Order Processing Servlet after Server Maintenance)
Median Response Time Related to Simultaneous Users (Order Processing Servlet after Server Maintenance)-Filtered Responses
Mean Response Time Related to Simultaneous Users (Order Processing Script after Server Maintenance)-Filtered Errors
Error Rates for Order Processing Servlet after Server Maintenance
Comparison of Median Responses vs. Filtered Median Responses (Order Processing Servlet after Server Maintenance)
Comparision of Mean Responses vs. Filtered Mean Responses (Order Processing Script after Server Maintenance)
Results of WebStress on E-boutique's HTML(before server maintenance)
Simultaneous Users Median of All Responses Mean of All Responses Median of Positive Responces Mean of Positive Responces Error Rates 5 641 641 641 641 0% 10 1172 1694 1172 1694 0% 15 1287 1834 1287 1834 0% 20 1452 2196 1452 2196 0% 25 1332 1593 1663 1706 28% 30 1342 1685 1492 1842 30% 35 1492 2248 1693 2754 37% 40 1522 2186 2023 2514 30% 45 1758 3078 2253 3450 38% 50 1552 2618 2083 3879 52% 55 1923 3151 2394 3294 53% 60 1812 3089 2934 3723 47% 65 1673 3346 3455 3946 60% 70 1973 4070 3795 4935 59% 75 2032 3764 4707 4982 64% 80 2303 4255 4216 5237 68% 85 2183 3814 4056 4806 67% 90 1973 3869 3796 4681 62% 95 2193 4271 4316 4418 72% 100 2203 3999 4406 4829 71%
Median Response Time Related to Simultaneous Users (E-Boutique HTML before Server Maintenance)
Mean Response Time Related to Simultaneous Users (E-Boutique HTML before Server Maintenance)
Median Response Time Related to Simultaneous Users (E-Boutique HTML before Server Maintenance)-Filtered Responses
Mean Response Time Related to Simultaneous Users (E-Boutique HTML before Server Maintenance)-Filtered Responses
Comparison of Median Responses vs. Filtered Median Responses (E-Boutique HTML before Server Maintenance)
Comparison of Mean Responses vs. Filtered Mean Responses (E-Boutique HTML before Server Maintenance)
Results of WebStress on E-boutique's home page(after server maintenance)
Simultaneous Users Median of All Responses Mean of All Responses Median of Positive Responses Mean of Positive Responses Error Rates 5 510 508 510 508 0% 10 911 848 911 848 0% 15 1042 1273 1042 1273 0% 20 1052 1248 1052 1248 0% 25 1102 1292 1302 1504 4% 30 1142 1319 1492 1758 19% 35 1203 1458 1693 1713 37% 40 1214 1412 2023 1983 30% 45 1302 1687 2253 2202 38% 50 1412 1746 2083 2318 48% 55 1323 1802 2394 2594 46% 60 1458 1856 2934 2723 47% 65 1542 2103 2743 2677 46% 70 1432 1890 2963 2651 54% 75 1502 1948 3012 2759 53% 80 1472 2483 3765 3478 54% 85 1572 2070 3998 3838 53% 90 1852 2596 4176 3801 46% 95 1893 3762 4556 4943 46% 100 1693 2950 4506 4385 55%
Median Response Time Related to Simultaneous Users (E-Boutique HTML after Server Maintenance)
Mean Response Time Related to Simultaneous Users (E-Boutique HTML after Server Maintenance)
Median Response Time Related to Simultaneous Users (E-Boutique HTML after Server Maintenance)-Filtered Responses
Mean Response Time Related to Simultaneous Users (E-Boutique HTML after Server Maintenance)-Filtered Responses
Comparison of Median Responses vs. Filtered Median Responses (E-Boutique HTML after Server Maintenance)
Comparison of Mean Responses vs. Filtered Median Responses (E-Boutique HTML after Server Maintenance)
Results of WebStress on E-boutique's Streaming Media (RealServer)
Simultaneous Users Median of All Responses Mean of All Responses Median of Positive Responces Mean of Positive Responces Error Rates 5 70 76 70 76 0% 10 110 109 110 109 0% 15 141 147 141 147 0% 20 180 178 180 178 0% 25 231 221 231 221 0% 30 291 534 291 534 0% 35 350 1095 350 1095 0% 40 420 1340 420 1340 0% 45 471 1473 471 1473 0% 50 531 1714 531 1714 0% 55 581 2407 581 2407 0% 60 3104 2861 3104 2861 0% 65 3084 3289 3084 3289 0% 70 3165 4190 3165 4190 0% 75 3355 4650 3355 4650 0% 80 3585 6096 3585 6096 0% 85 3405 9366 3405 9366 0% 90 3585 10172 3585 10172 0% 95 3525 10325 3525 10325 0% 100 3745 11961 3745 11961 0%