accelerating ibm websphere application server performance ... · pdf fileviii accelerating ibm...

126
ibm.com/redbooks Accelerating IBM WebSphere Application Server Performance with Versant enJin Sanjiv Chhabria Versant Solution Team Improve data access by more than 50 times Speed transaction throughput by 10 times Eliminate object-to-relational mapping code

Upload: hoanglien

Post on 31-Jan-2018

240 views

Category:

Documents


0 download

TRANSCRIPT

  • ibm.com/redbooks

    Accelerating IBM WebSphereApplication Server Performancewith Versant enJin

    Sanjiv ChhabriaVersant Solution Team

    Improve data access by more than 50 times

    Speed transaction throughput by 10 times

    Eliminate object-to-relational mapping code

    Front cover

  • Accelerating IBM WebSphere Application Server Performance with Versant enJin

    November 2002

    International Technical Support Organization

    SG24-6561-00

  • Copyright International Business Machines Corporation 2002. All rights reserved.Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADPSchedule Contract with IBM Corp.

    First Edition (November 2002)

    This edition applies to Versant enJin 2.1.0/2.2.3 and WebSphere Studio Application Developer 4.0.2 on Windows NT 4.0 (SP 6).

    Note: Before using this information and the product it supports, read the information in Notices on page v.

  • Contents

    Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vTrademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .vi

    Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiThe team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiBecome a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viiiComments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

    Part 1. Introduction to Versant enJin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

    Chapter 1. Overview of enJin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.3 Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

    1.3.1 Ease of development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.3.2 Time-to-market . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.3.3 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3.4 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3.5 Availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3.6 Transparent data distribution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    1.4 Key features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.4.1 Persistence for Java objects and EJBs. . . . . . . . . . . . . . . . . . . . . . . . 81.4.2 JavaServer pages and servlet support . . . . . . . . . . . . . . . . . . . . . . . . 91.4.3 Data replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.4.4 Active data management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.4.5 XML interchange . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101.4.6 Hot-standby for e-business transactions . . . . . . . . . . . . . . . . . . . . . . 101.4.7 Integration with existing technology . . . . . . . . . . . . . . . . . . . . . . . . . 101.4.8 GUI tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    Chapter 2. Key concepts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132.1 enJins transparent Java language interface. . . . . . . . . . . . . . . . . . . . . . . 14

    2.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.1.2 Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152.1.3 JVI operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    2.2 Class enhancement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.2.2 Running the enhancer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    2.3 Persistence categorization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

    Copyright IBM Corp. 2002. All rights reserved. iii

  • 2.3.1 Persistence categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412.3.2 How to choose a persistence category . . . . . . . . . . . . . . . . . . . . . . . 42

    2.4 Versant enterprise container . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432.4.1 Session manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 432.4.2 Transaction management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442.4.3 Helper classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    Part 2. Developing an enJin application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47

    Chapter 3. Developing applications with Versant enJin . . . . . . . . . . . . . . 493.1 Installation, configuration of Versant tools. . . . . . . . . . . . . . . . . . . . . . . . . 513.2 Introduction to the enJin tools and user interface . . . . . . . . . . . . . . . . . . . 51

    Chapter 4. Session managed persistence . . . . . . . . . . . . . . . . . . . . . . . . . 534.1 Outline of the example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 544.2 Running the example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54

    4.2.1 Import the jar file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 554.2.2 Implementation of enJin session managed persistence . . . . . . . . . . 614.2.3 Categorize the persistent class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644.2.4 Create the database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 684.2.5 Deploying and testing the application . . . . . . . . . . . . . . . . . . . . . . . . 704.2.6 View the results in the database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78

    Part 3. The benchmarking project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

    Chapter 5. Benchmark methodology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 835.1 Benchmark application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

    5.1.1 Business domain model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865.1.2 Interactions measured by the benchmark tests . . . . . . . . . . . . . . . . 88

    5.2 Performance metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 905.3 WebSphere deployment configurations . . . . . . . . . . . . . . . . . . . . . . . . . . 905.4 Other runtime parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 925.5 Hardware configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

    Chapter 6. Benchmark results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 956.1 Response time and application server throughput . . . . . . . . . . . . . . . . . . 976.2 Resource utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

    6.2.1 CPU utilization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1016.2.2 Memory utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

    6.3 Scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

    Appendix A. Versant WebSphere Consulting Practice . . . . . . . . . . . . . . 105

    Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

    iv Accelerating IBM WebSphere Application Server Performance with Versant enJin

  • Notices

    This information was developed for products and services offered in the U.S.A.

    IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

    IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A.

    The following paragraph does not apply to the United Kingdom or any other country where such pr