1. Objective
         To check which flow pattern gives better performance for LOVs(list of values) interms of execution time and memory consumption.


2. Web pattern
Without Stateless Session Bean

Description:
Business scenario: When LOV(list of values) button is clicked on the View screen, List of Ids are displayed.

Technical Flow:
LOV button internally invokes a controller. The controller stores the search criteria in the value object. The controller then passes the value object to DAO object and DAO object connects to database to fetch the user requested information.

Classes and objects involved in this process are as follows:

    ETTManifestEnterId.jsp
      '
    ETAdvancedLOVController.java
      '
    ETManifestAdvVO.java
      '
    ETAdvancedLOVMasterDAO.java
      '
    ETManifestAdvDAO.java
      '
    Database

3. SLS Pattern

With Stateless Session Bean
 
Description:
Business scenario: When LOV button is clicked on the View screen, List of Ids are displayed.

Technical Flow:
LOV of PRQ Ids internally invokes a controller. The controller stores the search criteria in the value object. The controller then gets the reference of stateless session bean and SLS invokes the DAO object to connect to database to fetch user requested information.

Classes and objects involved in this process are as follows:

        ETTManifestEnterId.jsp
           '
        ETAdvancedLOVControllerSLS.java
           '
        ETManifestAdvVO.java
           '
        ETAUtilitiesSessionBean
           '
        ETAdvancedLOVMasterDAO.java
           '
        ETManifestAdvDAO.java
           '
         Database

4. Test Environment

          Data base Application Server
Software Oracle 9.2 Oracle 10g
Hardware Dell Rack Server Hp-Compaq machine


Data for testing:
1. Records in the database for the test: 108528
2. Records fetched by test query: 1712
 
5. Test Data

Sample -1 (Measurements taken on rac02,server system)
SL. No Host Name Web pattern SLS pattern
            Time Memory Time Memory
1 rac02 594 6489488 1469 6701512
2 rac02 375 6159344 922 1811848
3 rac02 390 6157200 922 1623528
4 rac02 375 6157176 906 1136200
5 rac02 375 6157176 1109 2902696
6 rac02 391 6157176 1015 1620640

Sample -2 (Measurements taken on rac02, server system)
SL. No Host Name Web pattern SLS Pattern
            Time Memory Time Memory
1 rac02 704 6489488 1937 6700536
2 rac02 453 6159376 1156 1819552
3 rac02 437 6157208 1110 1535921
4 rac02 453 6157168 1109 2087336
5 rac02 437 6157208 1188 1619488
6 rac02 453 6157208 1094 1187440
7 rac02 421 6165416 1109 1615200
8 rac02 406 6159304 1079 1620736
9 rac02 422 6157168 1078 1615488
10 rac02 407 6157200 1093 2089736

Sample -3 (Measurements taken on different work stations)
SL.No Host Web Pattern SLS Pattern
              Time Memory Time Memory
1 techno 563 6489688 1532 6700616
2 fs-sys-198 359 6159384 828 1810328
3 fs-sys-157 360 6159080 813 1315040
4 common 343 6159104 844 1614752
5 rac02 375 6158768 922 1032360
6 fs-sys-309 375 6157168 890 2990272


Summary
1. In either case initial request took more time to execute the scenario.
2. Measurements taken from different systems shown similar behavior as measurements taken from single system.
3. Observed web pattern execution time is less than 50 % of SLS pattern.
4. Observed memory consumption is constantly around 6MB in web pattern.
5. Initial Memory consumption in SLS pattern is same as Web pattern but subsequently it is reduced to 1/6 th of it.

Conclusion

1. Execution time point of view Web pattern is providing 50 % performance improvement compared to SLS pattern
2. Memory usage point of view SLS is pattern is providing 70% performance compared to Web pattern (this behavior might be due to some caching mechanism or performance improvements at container level).