Building Scalable and High-Performance Java Web Applications Using J2EE Technology

  • View

  • Download

Embed Size (px)


  • Team -Sky

    By robots@Team-Sky

  • Team -Sky

    Building Scalable and High-Performance Java Web Applications Using J2EE Technology

    By Greg Barish

    Publisher: Addison Wesley

    Pub Date: December 27, 2001

    ISBN: 0-201-72956-3

    Pages: 416

    Slots: 1

    Building Scalable and High-Performance Java(TM) Web Applications Using J2EE(TM) Technology p

    Table of Contents


    rovides the concise roadmap Java developers and Web engineers need to build high-performance and scalable enterprise Web applications. It is unique in its focus on building efficient end-to-end solutions based on the widely adopted J2EE specification. Each of the relevant technologies is summarized and analyzed in terms of its scalability and performance implications. Special attention is


    ples for ctive

    sult, you nd easily be able to understand how to use J2EE technologies to build

    application systems that deliver scalability and high performance.

    is that e

    d extends the existing foundation of Java technology so that engineers can build Web

    d scalability. One of the most compelling features tform services such as transaction management,

    nam xpertise.

    Alth g J2EE is da tispec c eant to be a ey tend b of irrelemos f data se

    also given to those parts of Web application design that extend beyond the J2specification, including strategies for efficient networking and database design.

    Packed with general system architecture tips and balanced with succinct exameach technology, this book allows you to focus on practical strategies for effeapplication design without getting overwhelmed with useless detail. As a rewill quickly a

    Preface When it comes to building Web applications, there are two fundamental problems. One there are flat-out too many choices in terms of how to develop them. These days, one can choosfrom literally hundreds of languages and technologies that claim to make Web application development easier. The other problem is that there is a lack of common knowledge about how to deploy them in a way that yields high performance and scalabilitytraits essential to anythingaccessible over the Internet.

    Fortunately, there are now some unifying application infrastructures that not only simplify Web application development but also encourage efficient deployment. One of the most popular approaches is proposed by the Java 2 Enterprise Edition (J2EE) specification. The J2EE specleverages anapplications that encourage high performance anof J2EE is its built-in support for key low-level pla

    ing, and security, each of which normally requires substantial engineering time and e

    ou h it unifies much of Web application development and deployment, comprehendingh un ng. To understand it, you need to read either the spec itself or a lot of books on eac

    ifi J2EE technology (e.g., Servlets, EJBs, and JDBC). The spec itself is dry and not m practical resource. And the problem with reading books about each technology is that th to e overly longsome EJB-only books exceed 1000 pages. Such books also tend to be full

    vant details and appendices that you don't need or could have found easily online. Finally, them do not address tht o e unspoken parts of Web application designfor example,

    ba design and networking efficiency.

    By robots@Team-Sky

  • Team -Sky


    Building Scalable and High-Performance Java Web Applications Using J2EE Technologywas written to fill the need for an applied summary of how to build

    high-performance and scalable

    using J2EE technology. This called for a delicate balanceintroduce a set of and their relationships and provide enough examples so you can actually see

    how things work. The objective was not to go too far overboard to produce an overly long book

    , EJBs, messaging, JDBC, and more. Along the way, there will be plenty of examples. Many will be presented with


    ils. When you've decided which parts of J2EE are relevant to you, you might consult those books as a complement to this one.

    ose is to fill in the holes about Web application design that the J2EE specification simply does not address. Although the specification

    nterprise application atabase design. For

    example, even though the specification describes how HTTP is used to communicate with a J2EE it



    To define and identify the challenges associated with building scalable and high-

    gy roadmap for designing Web applications. ils related to high

    c leaves out, such as tabase designtwo of the most common J2EE-

    related technologies. the benefits of various specific J2EE design decisions, illustrating these

    al performance graphs and charts.

    , it

    chieve that goal.

    e and High-Performance Java Web Applications Using J2EE Technology is written for any engineer or architect who is proficient with Java and wants to build Java-based

    This book is also for those who want to see beyond the J2EE spec, in parti der current issues in efficient networking and database design in addition to future issues related to Web services technologies such as XML and SOAP.

    Web applicationsnew technologies

    that lacked focus (or one that could cause injury when lifted). Thus, the goal was to produce a concise but practical summary.

    We'll cover all the key elements of J2EEthe spec itself, servlets, JSP

    deliberate brevity, the idea being that it is better to cut to the chase of how to use a technolograther than to show so many gory details that the readers' eyes start to glaze over. As we alreadyknow, there are plenty of books that address such deta

    In addition to being a well-rounded summary, another purp

    shows how to connect different Java technologies and APIs to build an einfrastructure, it does not address related issues such as networking and d

    system and how JDBC can be used to communicate to a relational database from a J2EE system, contains no details about HTTP or relational databases. As any seasoned Web application deknows, understanding both is critical when designing your system for high performance and scalabili

    In summary, this book has the following goals:

    performance Web applications. To provide you with a J2EE technolo To describe concisely key J2EE technologies, emphasizing deta

    performance and scalability. To fill in the gaps of Web application design that the J2EE spe

    important details related to HTTP and da

    To demonstratedifferences with re

    This last item is targeted at making the suggestions in this book more compelling. For exampleis only somewhat comforting to say things like "connection pooling is good," which is the approach that many books take. It is more convincing and clear if real performance charts and graphs back up these claims. This book aims to a


    Building Scalabl

    Web applications for performance and scalability, but does not yet understand how J2EE can be used toward that goal or how all of its underlying technologies work.

    cular, to consi

    By robots@Team-Sky

  • Team -Sky

    Finally, this booServlets), but no

    k is for those already familiar with some parts of J2EE technology (e.g., Java t others (e.g., the Java Message Service).

    s sed for

    All tests were conducted on a Dell Latitude running a single 833 MHz Pentium III with 256 KB application software consisted of:


    details about the

    esides at the top-level directory. From this


    ed to copy the contents of the bout


    My hope is that this book acts as an ongoing reference for you as your J2EE application evolves. You wil s of how to provide application functionality to your con sinesses. You will have to address questions like, "Do I plac tabase or the application server?" and "Should our batch data tran or a messaging server?" Independent of the details associated with each of these choices, you will want to enable such features in a way that promote lability. This book will help you understand the tradeoffs, both general and specific, in Web application design that can help you achieve that goal.


    The folks at Addison-Wesley did a wonderful job of helping me publish this book. Mary O'Brien, my editor, was an excellent source of creativity, support, encouragement, and understanding right from the start. M s and, though I tried my best to disrupt the process more than once, ensured a smooth path for publication. Alicia Carey was a great

    A Note about Performance Measurements

    Throughout this book, there are various performance measurements and comparisons. Although the same general trends apply to nearly every architecture (because the performance trendillustrated are architecture-independent), it may be useful to list the details of the system utesting.

    RAM. The operating system and

    Windows 2000, Professional Edition Apache Web server, version 1.3.14 Java Runtime Environment and Development Kit, version 1.3 J2EE SDK and reference implementation, version 1.3 (Beta) Apache Jakarta/Tomcat servlet container, version 3.2.1 Oracle database system, version 8.1.6

    The CD

    The CD-ROM that accompanies this book contains most of the source code in this book. This supplement is intended for use on Windows 95/98/NT/2000 machines running Java 1.3, the Cygwin BASH shell and accompanying utilities, and Oracle 8.1.6. For moredesired reference system, see the preceding list.

    Using the CD-ROM is straightforward: Simply insert the disk into your CD-ROM drive and thenuse your Web browser to open the index.html file that rinitial file, you will be able to get to