Home > Store

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

Register your product to gain access to bonus material or receive a coupon.

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

Premium Website

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 2002
  • Edition: 1st
  • Premium Website
  • ISBN-10: 0-201-72956-3
  • ISBN-13: 978-0-201-72956-6

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology provides 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 also given to those parts of Web application design that extend beyond the J2EE specification, including strategies for efficient networking and database design.

Packed with general system architecture tips and balanced with succinct examples for each technology, this book allows you to focus on practical strategies for effective application design without getting overwhelmed with useless detail. As a result, you will quickly and easily be able to understand how to use J2EE technologies to build application systems that deliver scalability and high performance.

Coverage includes:

  • Essentials of Web application architecture
  • The J2EE standard
  • General techniques for building scalable and high-performance systems
  • The HTTP protocol, with special focus on features that maximize performance
  • Java™ Servlets and JavaServer Pages™ (JSP)
  • Enterprise JavaBeans™ (EJB)
  • Java™ Message Service (JMS)
  • Effective database design techniques
  • Efficient database management with JDBC™ and SQL
  • Essentials of Web Services, including XML, SOAP, WSDL, and UDDI

A CD-ROM with relevant source code from various chapters accompanies this book.



0201729563B12172001

Sample Content

Online Sample Chapter

Scalable and High-Performance Web Applications

Downloadable Sample Chapter

Click below for Sample Chapter related to this title:
barishch01.pdf

Table of Contents



Preface.


1. Scalable and High-Performance Web Applications.

The Emergence of Web Applications.

Some Basic Definitions.

The Nature of the Web and Its Challenges.

Performance and Scalability.

Performance.

Scalability.

The Internet Medium.

Wide Audience.

Interactive.

Dynamic.

Always On.

Integrated.

Lack of Complete Control.

Measuring Performance and Scalability.

Measuring Performance Other Types of Measurements.

Measuring Scalability.

Throughput and Price/Performance.

Scalability and Performance Hints.

Think End-to-End.

Scalability Does Not Equal Performance.

Measure Scalability by Comparison.

Summary.



2. Web Application Architecture.

Web Application Terminology.

Application Requirements.

Business Logic Requirements.

Data Management Requirements.

Interface Requirements.

Web Requirements.

Network Connectivity Requirements.

Abstract Web Application Architecture.

From Client to Server: Thin-Clients and Fat-Clients.

Persistent Data Management.

N-tier Application Architecture.

The Client.

The Network.

The Server.

Tier-Based Designs.

Challenge: Efficient Middleware.

Scalability and Performance Hints.

Don't Always Starve Thin Clients.

Use or Build Multithreaded Application Servers.

Find the Right Granularity.

Summary.



3. The J2EE Specification.

An Overview of the Specification.

Deployment Issues.

Packaging.

Deployment Descriptor Files.

Platform Technologies and Services.

Component Communication via the RMI-IIOP Protocol.

Transaction Management Using the Java Transaction API.

JNDI for Resource Location.

J2EE and Your Architecture.

Summary.



4. General Scalability and Performance Techniques.

Caching/Replication.

Parallelism.

Redundancy.

Asynchrony.

Resource Pooling.

Summary.



5. HTTP Client/Server Communication.

The HTTP Protocol.

Deployment Paradigms.

Applications with Browsers as Clients.

Applications without Browsers as Clients.

Efficiency of the HTTP Protocol.

HTTP Protocol Details.

Detailed Protocol Semantics.

HTTP Requests.

The GET Method.

The POST Method.

HTTP 1.1 Caching Details.

Connection Management.

Performance and Scalability Hints.

Use HTTP GET and POST Judiciously.

Consider Using HTTP for Non-Browser Clients.

Promote HTTP Response Caching.

Support Persistent Connections.

Summary.



6. Request Processing: Concepts and Strategies.

The General Problem.

Specific Challenges.

Connection Management.

Data Marshalling.

Request Servicing.

Modes of Request Processing.

Synchronous.

Asynchronous Communication.

Scalability and Performance Implications.

The Role of J2EE in Request Processing.

Web Serving.

Synchronous Processing with Java Servlets and Java Server Pages.

Asynchronous Processing with the Java Message Service.

Scalability and Performance Hints.

Prefer Asynchronous Communication.

Stream Data between Threads.

Develop Remote Methods That Encourage Efficiency.

Summary.



7. Session Management with Java Servlets.

Generating Dynamic Responses.

Common Gateway Interface.

Extending the Web Server through Its API.

Redirecting the Web Server Request.

Using Servlets.

Servlets and Servlet Containers.

Interacting with a Servlet.

Web Server and Servlet Container Integration Details.

Developing Servlets.

Designing the Servlet Interface.

Coding the Servlet.

Servlet Execution.

How a Servlet Container Works.

Servlets and Multithreading.

Servlets and Session Management.

What Is Session Management?

Session Identification.

Using HTTP User Authentication.

Using Hidden Form Fields.

Using Rewritten URLs.

Using HTTP Persistent Cookies.

Using the Java Servlet Session Tracking API.

Deploying Servlets.

Session Management with Multiple Containers.

Developing Servlets with Java Server Pages.

Sample JSP Page.

The Structure of a JSP Page.

How JSP Works.

JSP Directives.

So, what is JSP... really?

Performance and Scalability Hints.

Prefer Fine-Grain Serialization.

Prefer Hardware-Based Load Balancing.

Use Servlets for Session Management, not Business Logic.

Think Twice about Using JSP.

Summary.



8. Building Application Servers with Enterprise Java Beans.

The Need for Application Servers.

Application Logic and Where to Deploy It.

Enterprise Java Beans: The J2EE Solution.

How EJBs Work.

Types of EJBs.

Example Application.

EJB Design.

Session Beans.

Entity Beans.

Message-Driven Beans.

EJB Implementation.

Bean Development Responsibilities.

Session Beans.

Entity Beans.

Message-Driven Beans.

Client/EJB Integration.

Client/EJB Communication: Behind the Scenes.

Performance and Scalability Hints.

Prefer Message-Driven Beans over Session Beans.

When You Use Session Beans, Use Stateless Session Beans.

Strive for Coarse-Grain EJB Methods.

Use BMP Well or Don't Use It at All.

Know Your Vendor.

Summary.



9. Messaging for Efficient Enterprise Application Integration.

A B2B-Style Working Example.

The Java Message Service.

JMS Concepts.

Providers.

Clients.

Messages.

Administrative Objects.

JMS Programming Models.

Model-Specific Administrative Object Interfaces.

The Synchrony of Message Consumption.

JMS Reliability versus Performance.

Client Acknowledgment.

Message Persistence.

Timing Dependencies and JMS Publishing Models.

Using JMS: An Example Pub/Sub Application.

Developing the Message Publisher.

Developing the Message Subscriber.

Towards Deployment.

Scalability and Performance Hints.

Prefer Messaging—Both Inside and Out.

Understand the JMS Efficiency versus Reliability Tradeoff.

Summary.



10. Effective Database Design.

Database Technology and the Relational Model.

Relational Databases.

Logical Database Design.

Entities, Attributes, and Relationships.

Physical Database Design.

Tables and Rows.

Constraints.

Querying a Database.

Querying Data.

Nested Queries.

Join Queries.

Other Important Database Objects.

Views.

Stored Procedures.

Triggers.

Indexes.

Sequences.

Other Objects.

Query Processing.

Scalability and Performance Hints.

Understand How to Use the Database.

Understand When to Use the Database.

Understand How Your Data Will Be Accessed.

Normalize Your Data Model.

Selectively Denormalize Your Model.

Use Stored Procedures.

Avoid Triggers and Other Implicit Execution.

Know Your Vendor.

Summary.



11. Using JDBC and SQL to Efficiently Query Databases.

How JDBC Fits In.

JDBC Concepts and Objects.

An Overview of Querying with JDBC.

Relevant JDBC Classes and Their Relationships.

Connecting to a Database.

Writing JDBC Queries.

Processing a Statement.

Iterating through Results.

Executing Single Updates.

Other Kinds of Updates: Creating Tables and Stored Procedures.

Beyond the Basics.

Prepared Statements.

Dynamic SQL.

Transaction Management.

Bidirectional Results Iteration.

Updateable Results.

Executing Batch Updates.

Scalability and Performance Hints.

Use Prepared Statement When Possible.

Use Batch Updates with a Remote Database.

Don't Overcommit.

Use Multithreading to Query in Parallel.

Summary.



12. Web Services: The Future of Web Applications.

What Exactly Is a Web Service?

Surveying Web Service Technologies.

A Quick Tour of the Technologies.

Putting It All Together.

XML: Self-describing Data.

DTDs and Schema Languages.

Parsing XML.

XML-Related Technologies.

Coding Web Services.

Describing Web Services with WSDL.

WSDL Definitions.

WSDL Example.

Invoking Web Services with SOAP.

How SOAP Works.

Using SOAP over HTTP.

Registering Web Services with UDDI.

UDDI Standards.

The UDDI APIs.

The Big Picture.

The Provider Perspective.

The Consumer Perspective.

Scalability and Performance Challenges.

Replicating and Load Balancing Remote Functions.

XML Parsing Performance.

Summary.



Bibliography.


Index.

Preface

When it comes to building Web applications, there are two fundamental problems. One is that there are flat-out too many choices in terms of how to develop them. These days, one can choose from 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 scalability--traits essential to anything accessible 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 spec leverages and extends the existing foundation of Java technology so that engineers can build Web applications that encourage high performance and scalability. One of the most compelling features of J2EE is its built-in support for key low-level platform services such as transaction management, naming, and security, each of which normally requires substantial engineering time and expertise.

Although it unifies much of Web application development and deployment, comprehending J2EE is daunting. To understand it, you need to read either the spec itself or a lot of books on each specific J2EE technology (e.g., Servlets, EJBs, and JDBC). The spec itself is dry and not meant to be a practical resource. And the problem with reading books about each technology is that they tend to be overly long--some EJB-only books exceed 1000 pages. Such books also tend to be full of irrelevant details and appendices that you don't need or could have found easily online. Finally, most of them do not address the unspoken parts of Web application design--for example, database design and networking efficiency.

Goals

Building Scalable and High-Performance Java™ Web Applications Using J2EE™ Technology was written to fill the need for an applied summary of how to build high-performance and scalable Web applications using J2EE technology. This called for a delicate balance--introduce a set of new technologies 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 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 J2EE--the spec itself, servlets, JSP, EJBs, messaging, JDBC, and more. Along the way, there will be plenty of examples. Many will be presented with deliberate brevity, the idea being that it is better to cut to the chase of how to use a technology rather than to show so many gory details that the readers' eyes start to glaze over. As we already know, there are plenty of books that address such details. When you've decided which parts of J2EE are relevant to you, you might consult those books as a complement to this one.

In addition to being a well-rounded summary, another purpose is to fill in the holes about Web application design that the J2EE specification simply does not address. Although the specification shows how to connect different Java technologies and APIs to build an enterprise application infrastructure, it does not address related issues such as networking and database design. For example, even though the specification describes how HTTP is used to communicate with a J2EE system and how JDBC can be used to communicate to a relational database from a J2EE system, it contains no details about HTTP or relational databases. As any seasoned Web application designer knows, understanding both is critical when designing your system for high performance and scalability.

In summary, this book has the following goals:

  • To define and identify the challenges associated with building scalable and high-performance Web applications.
  • To provide you with a J2EE technology roadmap for designing Web applications.
  • To describe concisely key J2EE technologies, emphasizing details related to high performance and scalability.
  • To fill in the gaps of Web application design that the J2EE spec leaves out, such as important details related to HTTP and database design--two of the most common J2EE-related technologies.
  • To demonstrate the benefits of various specific J2EE design decisions, illustrating these differences with real performance graphs and charts.

This last item is targeted at making the suggestions in this book more compelling. For example, it is 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 achieve that goal.

Audience

Building Scalable 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 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.

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

Finally, this book is for those already familiar with some parts of J2EE technology (e.g., Java Servlets), but not others (e.g., the Java Message Service).

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 trends illustrated are architecture-independent), it may be useful to list the details of the system used for testing.All tests were conducted on a Dell Latitude running a single 833 MHz Pentium III with 256 KB RAM. The operating system and application software consisted of:

  • 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-ROM

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 more details about the desired reference system, see the preceding list.

Using the CD-ROM is straightforward: Simply insert the disk into your CD-ROM drive and then use your Web browser to open the index.html file that resides at the top-level directory. From this initial file, you will be able to get to other parts of the included documentation, as well as the source code.

Note that to compile and run some of the source code, first you need to copy the contents of the desired directories to your local hard drive and then compile everything there. More detail about this and the requirements for compilation can be found in the top-level index.html file.

Onward!

My hope is that this book acts as an ongoing reference for you as your J2EE application evolves. You will need to continually make choices in terms of how to provide application functionality to your consumers, both individuals and other businesses. You will have to address questions like, "Do I place the business logic in the database or the application server?" and "Should our batch data transfer go through a Web server 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 promotes performance and scalability. This book will help you understand the tradeoffs, both general and specific, in Web application design that can help you achieve that goal.



0201729563P12182001

Index

Abstract application architecture, 30, 47
Abstract endpoints, 350
Abstract messaging models, 243
Abstract query plan, 287, 288
Abstract Web application architecture, 29-32
Access, programmatic, with Web services, 336
Access control, with views, 279
Access counts, city/county cache with, 69
Accessibility, 27
Access time
of cache, 69, 70
caching for reduction of, 71
AccountProcessing object, 259, 260
Activation method type, and bean instances, 194
"Active" database features, 306
Active Server Pages, 151, 175
addMember() method, 161, 166
Administered objects, 244, 253
Java Message Service, 243, 246
Administrative object interfaces, model-specific, 247
Administrators, 285
Age
and date-based validation, 107
header field, 107
Age calculation algorithm, summary of, 107
Aggregate functions, 215
Airline ticket buying
application operations associated with, 7
and performance measuring, 14
Akamai, 36, 69
Algorithms, efficiency of, 125
Almeida,V., 16
AND operator, 275
ANSI SQL/PSM standard, 280
AOL/Netscape Navigator, 4, 27
Apache, 151
Apache Server, 135
integration of, with Jakarta Tomcat servlet container, 154-156
Apache Tomcat server, 152, 154
Apache Web server, 151, 173, 184
Apache Xerces 2.0, XML parsing with, 345-348
APIs
database interfacing and choice of, 293
J2EE services and, 51, 52
servlet session tracking, 171-172
support for, by J2EE containers, 52, 54
UDDI, 360362
Apparent age, of document, 107
Applet containers, 50, 51, 191
Applets, 98, 121
Application client container, 191
Application containers, 50, 51
Application-level state, 163
Application logic, 32, 161
for counting page hits, 178
deployment of, 190-191
Application metadata, 32
Application object, 181
Application operations, 6
with airline ticket buying, 7
and performance measurement, 14
Application programming interfaces. See APIs
Application requirements, 25-27
business logic, 25-26
data management, 26
interface, 26-27
Application response
linearly scalable, 18
sample, 17
time, 20
Applications
components of, 265
employer benefits-processing sytem, 195-196
intermediate messaging services between two, 242-243
linearly scalable, 18
Application servers, 37, 189, 240
Application system, messaging opportunities within, 259-261
Architectural strategies, and application development, 21
Architecture, abstract Web application, 29-32
Argument marshalling, and local objects, 200
Ariba, 338
ASPs. See Active Server Pages
Assertions, UDDI, 361
Asynchronous client postprocessing, 258
Asynchronous communication, 128, 129-131, 147-148
caching, data locality and, 133-134
and connection management, 133
and data marshalling, 134
and highly dynamic Web page generation, 138-139
and messaging systems, 132
Asynchronous delivery of messages, 247
Asynchronous logging, 259
Asynchronous message processing, 254, 256-257
Asynchronous middleware technology, 43
Asynchronous processing
with Java Message Service, 136-137
price updates, 131
of requests, 262
Asynchronous solutions
good performance with, 261
for request processing, 137
Asynchrony, 8082, 89
AT&T, 36
ATM AAL-5, 93
Attribute accessors, 212, 214, 217
Attributes, 269
Attributes, in tables, 271
Attribute values, 215
Auctions, online, 9, 11
Authentication, 167-168. See also Security
Authentication tokens, UDDI, 362
AUTO_ACKNOWLEDGE, 250
AutoFlush page directive attribute, 182, 183
Automatic report generation, 306
Bandwidth, and network connectivity, 28-29
Banking, online, 16
Banking applications, 25, 249
BankingSession
session bean remote interface (course-grained), 237
session bean remote interface (fine-grained), 236-237
Barrier.java, 82, 83, 86-87
BatchBenefitEnroller, 196
BatchBenefitEnrollerBean, 225, 226-228
Batch processing, 234
Batch updates
executing, 324-325
with remote database, 328-329
BEA
WebLogic Server, 174, 175
WebLogic suite, 49
Bean class, 204, 212
coding, 208211
BeanEnroller entity class, coding using bean-managed persistence, 219-224
Bean instances
activation of, 194
creation of, 194
destruction of, 194
passivation of, 194
relationship between clients, EJB container, and, 192, 193
Bean instantiation, 208, 210
Bean-managed persistence, 199, 202
BeanEnroller entity class coded with, 219-224
and coding entity bean class, 217
and coding home interface, 216
and coding remote interface, 215
good use of, 238-239
Bean passivation, 240
Bean persistence, methods of, 199
Benchmarking, beyond, 15-16
Benchmarks
testing of, 15
TPC-style, 20, 21
Benefit bean, 217
BenefitEnroller, 196
BenefitEnroller bean, 229, 230
BenefitEnrollerBean instance, 208
BenefitEnroller client class, 229-230
Benefit Enroller entity bean class, coding using container-managed persistence, 218-219
BenefitEnrollerHome object, 229, 230
BenefitEnroller object, 229
BenefitEnroller remote interface, 206
BenefitEnrollerRemote object, 210
BenefitEnroller session bean class, 208-211
BenefitEnroller session bean home interface, 207-208
BenefitEnroller session bean remote interface, 206-207
Benefit entity bean, 196
BenefitEntity bean home interface, 217
BenefitEntity bean remote interface, 214-215
Benefit object, 211
BenefitSession, JAR file for, 54
BenefitsManager object, 230
BENEFIT table, 214
BETWEEN operator, 275
Bidirectional communication, synchronous communication versus, 245
Bidirectional results iteration, 323-324
Binary protocols, message-based protocols versus, 92
Binary types, 271
Binding, and services, 353
Binding, in WSDL document, 351
Binding information and UDDI, 358
Bindings, with price-quoting service, 352
Blocking mode, 249
BMP. See Bean-managed persistence
Body
in HTTP requests/replies, 99
JMS message, 244, 245
Bonus histories, stored procedures for, 280-281
Boolean logic, 274
Bots, 9
Bottlenecks, 40
Bottlenecks, and triggers, 307
Boyce-Codd normal form, 294
Broadcast-based application integration models, 241
Browser cache, 33
Browser clients, Web applications with, 93-94
B2B applications. See Business-to-business applications
B2C applications. See Business-to-consumer applications
Buffer caches, sizing, 291
Buffer page directive attribute, 182, 183, 186
Bulka, D., 126
Bulk processing, and remote methods, 145
Business information, and UDDI, 358
Business logic, 25-26, 49, 190, 265
language choice for writing of, 282
replication of, 45
servlets not used for, 185-186, 187
Business rules, 265
Business-to-business applications, 28, 190, 325
Business-to-business processing, future of, 333
Business-to-business style working example, Red Planet Electronics, 241-243
Business-to-consumer applications, 28
C, 136, 282, 294
C+, 335
C++, 57, 294, 335, 340, 344
Cable modems, 28
Cache consistency, 71
problem of, 74
Cache-Control
directives, 116
fields, 114
header fields, 109-110
Caches and caching, 13, 65, 72, 88, 95, 99
Cache-control headers, 109-110
with city/county access counts, 69
for database systems, 318
data locality, 133
date-based validation, 107-108
defined, 67
dynamic GET requests, 103-105
flush policy, 68
HTTP 1.1, 106-110
I/O-bound dilemmas addressed by, 126
for reducing access time, 71
redundant, 79
and reliability, 73
and replication, 67-73
sample California city/county, 68
static GET requests, 101-103
tag-based validation, 108-109
Caching benefit equation, tradeoff in, 70
calculateNewSalary() method, 62
CallableStatement, 314
CallableStatement objects, 311
Capable applications, 27
Cardinality, 270
Carnegie Mellon University, 36
Cascading Style Sheets, 26, 27
Cell phones, 26, 27
Centralization, and database design/optimization, 266
CGI programs. See Common Gateway Interface programs
Character-based types, 271
Check constraints, 272
Children, with DOM, 343
Cisco, LocalDirector, 34, 173, 184
CLIENT_ACKNOWLEDGE, 250
Client acknowledgment, 263
and JMS reliability versus performance, 249-250
Client data, relationship between server side entity beans, 200
Client/EJB communication, behind the scenes, 230-232
Client/EJB integration, 228-230
Client hardware, 3
Clients, 47, 121. See also Servers
automated, 33
and caching, 106-107
human, 32
IDs, 256
Java Message Service, 243, 244
network, server, and, 3
relationship between EJB container, bean instances, and, 192, 193
synchrony of, 247-249
Client/server application, 31
Client/server architecture, hybrid design, 31
Client-side data validation, 44
Client-side network elements, 33-34
Client-side network infrastructure, 34
Client software, 3
Clock synchronization, 15-16
Clustered computing systems, 75
CMP. See Container-managed persistence
CNET.COM, 5
Coarse granularity, 47
COBOL, 57
Codd, E. F., 267, 294
Code/Coding. See also Examples
bean class, 208-211
entity bean class, 217
home interface, 207-208
message producer, 252-254
remote interface, 206-207
replicating, 161
servlets, 158-162
stub/skeleton, 57
thread-safe, 46, 163, 184
Columns, in relational databases, 267
COMMIT, impact of, on performance, 329-330
Commit operation, 60, 61
Commits, cautionary note about, 329-330
Common Gateway Interface programs, and dynamic response generation, 149, 150
Common Object Request Broker Architecture, 43, 45, 47, 57, 92, 121, 187, 231, 338, 358
driver integration with, 294
IDL in, 339
integrating objects in, 58
Components
categories of, with J2EE, 49-50
management of, 65
tier-based design, and reusability of, 38-40
Concert/event seating availability, 138
Concrete endpoints, 350
Concurrency
efficient management of connections, 120, 123
fine-grained serialization and maximizing, 184
Concurrent fetching
CPU-bound activity, 77
I/O-bound activity, 78
Concurrent request processing, with HTTP 1.1, 95
Confirmation operation, 6
Confirmation process, 14
confirmEnrollment() method, 211, 229
Connection.commit call, 323
Connection.createStatement() call, 324
Connection factories, 246, 252, 253, 254
Connection management, 121, 147
with HTTP 1.1, 95
and request processing, 123, 133
Connections, 24, 246, 252
object, 310, 312
pooling, 82, 83, 87, 331
Connection.setAutoCommit() call, 323
Connection.setAutoCommit(false), 329
ConnPool.java, 82, 8486
Consistency, cache, 74
Constraints, 267, 272-273
Consumer performance, and nondurable subscriptions, 262
Consumers, and Web services, 363
Consuming applications, 242
Container-managed persistence, 199-201, 202, 238, 239, 240
and BenefitBean coding, 218
and coding entity bean class, 217
and coding home interface, 216, 217
and coding remote interface, 215
Container-managed relationships, 201
Containers, 50, 65
engines versus, 162
interoperability with J2EE, 53
J2EE, and support for APIs, 54
in J2EE Web application, 191
relationships among J2EE, 51
Content distribution, 13, 36, 99
Contention, reducing, 125
Content-Length header field, 112, 113, 116
Context, 62
Contract, 204
Contract agreements, 50
Cookies, 10, 235
and deterministic load balancing, 173
HTTP persistent, 169170
session management implemented with, 170-171
values, 170, 171
"Cookie Sticky" feature, 173
CORBA. See Common Object Request Broker Architecture
Core logic, and JavaServer Pages, 178
Cormen, T., 125
Corporate intranets, 1
Corrected initial age, 107
Corrected received age, 107
Cost, and scalability, 16
Coarse-grained EJB methods, 236, 237-238
CPU-bound servicing, 125-126
Crashes, 175, 185
create() API call, 216
create() method, 204, 207, 208, 217
Creation method type, and bean instances, 194
Credit cards
approval, 190
checking, 40
CSS. See Cascading Style Sheets
Current age, 107, 108
Customizable business logic, 26
Custom servers, 95
Data
copying, 79
encoding in XML, 362
feeds, 9
portability, 338, 348
querying, 273-275
self-describing, 333, 338, 340-341, 368
streaming of, between threads, 139-144
XML and portablity of, 348
Database definition language, 273
Database design, 265-307
importance of, 265-266
logical, 268-270
physical, 268, 270-273
scalability and performance hints for, 290-307
Database independence, with JDBC, 309
Database indexes, 283-284
Database management system, 73, 267, 291
Database manipulation language, 273, 274, 275
Database objects
administrators, 285
constraints, 272-273, 278
indexes, 283-284
rows, 271-272, 278
sequences, 284-285
stored procedures, 280-282
tables, 271-272, 278
triggers, 282-283
views, 278-280
Databases, 37
classifying usage of, 293
criteria for storing data in, 292-293
how to use, 290-291
JNDI for location of, 63
querying, 273-278, 331
relational, 267-268
when to use, 291-293
Database systems, aspects of, 267
Database technology, and relational model, 267-268
Database URL, 311, 312
Data denormalization, selective, 299-302
Data dependencies, and granularity, 261
Data filtering, with WHERE clause, 275
Dataflow graph, 286
Data locality, and caching, 127, 133
Data management, 26
and data access, 293
persistent, 30, 32
Data marshalling, 122, 124, 134, 147
Data modeling, 268, 280
Data model normalizing, 294-299
first normal form (1NF), 294-296
second normal form (2NF), 296-298
third normal form (3NF), 298-299
Data-producing process, 103
Date-based types, 271
Date-based validation, 107-108
Date response header field, 107
DBMS. See Database management system
DB2, 290
DCOM, 129
DDL. See Database definition language
Debugging, of SOAP over HTTP, 356
Decentralization, 13
Declarations, JSP, 177, 182
"Delayed write-through" policy, 73
delete_xx methods, 361, 362
Delivery, of message to client, 247
Demarshalling, 231
Denormalization tips, 302
Denormalizing data model, 299-302
DEPARTMENT entity, 269
DEPARTMENT table, 271
and denormalizing data model, 300
in first normal form, 294, 295
in third normal form, 298, 299
Dependent objects, 201
Deployment descriptor, 53
files, 54-57
sample, 55-56
Deployment of J2EE, 53-57
deployment descriptor files, 54-57
packaging, 53-54
Deployment paradigms, 93-95
applications with browser clients, 93-94
applications with nonbrowser clients, 94-95
deselectBenefit() method, 229
Design. See also Database design
importance of, 21
and scalability, 8
Destinations, 246, 253
destroy() method, 162
Destruction method type, and bean instances, 194
Deterministic load balancing, 173
DHTML. See Dynamic HTML
Digital subscriber lines, 28
Directives, JSP, 177, 182, 183
"Direct" programming, 186
Dispatchers, and request redirection, 152
Distance, caching to reduce latencies caused by, 70
Distributed multitier applications, 189
Distributed object technologies, 207, 231
Distributed systems, 88
Distributed Web functionality, abstraction and integration of, 334
DML. See Database manipulation language
Document Object Model, 343
efficiency differences between SAX and, 364
Levels 1, 2, and 3, 343
SML parsing using, 345-347
Document Type Description
sample, 342
and schema languages, 341-343
XML document referencing of, 342
XML document with embedding of, 342-343
doGet() method, 159, 164
DOM. See Document Object Model
Domains, 247
DOMParser.parse(), 365
doPost() method, 154, 159, 161, 164
DriverManager object, 310
DSL. See Digital subscriber lines
DTD. See Document Type Description
DUPS_OK_ACKNOWLEDGE, 250
Durable subscribers/subscriptions, 251, 254, 256, 262
Dynamically created tables, and join queries, 277
Dynamic business logic, 26
Dynamic content, and Expires field, 115
Dynamic GET requests, caching, 103-105
Dynamic HTML, 26, 27
Dynamic page data, JSPs, 177
Dynamic requests, 24
Dynamic response generation, 149-152
with CGI programs, 149, 150
extending Web server through API, 150
redirecting Web server request, 151-152
Dynamic responses, 149
Dynamic SQL, 320-321
Dynamic Web applications, 10-11
EAR file, 53
eBay, 9, 11, 12
EDI. See Electronic Data Interchange
Efficiency, 163, 263. See also Performance; Scalability
with BMP, 238-239
of browser-to-server communication, 94
in computation, 125
and denormalization, 302
HTTP, 95-96
with normal forms of data modeling, 294, 299
and remote interface development, 144-147
and SOAP over HTTP, 356
Efficiency methods, selective writing of, 147
Efficient middleware, challenge of, 43
EJBs. See Enterprise JavaBeans
ejbActivate() method, 205
EJB containers, 50, 51, 191
and bean instance management, 204
relationships among clients, bean instances, and, 192, 193
ejbCreate() method, 204, 207, 208, 210, 219
ejbLoad() method, 217
EJBObject, 121, 192, 193
ejbPassivate() method, 205
EJB query language (EJB-QL), 216
ejbRemove() method, 205, 210
ejbStore() method, 224, 239
EJB 2.0 specification, 194, 202, 238, 240
Electronic Data Interchange, 38, 92, 132, 349, 356
Electronic shopping carts, 190
Ellis Island Web site, 119-120, 123
EMPLOYEE entity, 269
Employee entity bean, 200
Employee queries, iterative, 320-321
Employees, triggers for maintaining accounts on, 283
EMPLOYEE table, 271, 273, 315
Employer benefits-processing system, 195196
Endpoints, 350
End-to-end interactions, with Web site, 2
End-to-end performance, 6, 7
Engine, container versus, 162
Enrollment class, 226
Enterprise JavaBeans, 37, 50, 135, 152, 162, 185, 186, 187, 240, 268, 303, 338
client integration with, 228-232
design of, 196-203
driver integration with, 294
implementation of, 203-228
and Java Message Service, 243
as J2EE solution, 191-192
requesting member and employee information from, 201
sample application with, 195-196
scalability and performance hints for, 232-240
types, general role of, and interbean relationships, 195
types of, 194-195
workings of, 192-194
Entities, 269
relationships among, 269-270
Entity bean class, coding, 217
Entity beans, 61, 64, 194, 197, 203, 211-224, 240
and client interaction, 198
and CMP, 238
and coding entity bean class, 217-224
coding home interface for, 216-217
and EJB 2.0, 212
life cycle of, 212-213
local model for, 200
methods found in, 212
relationships, 198
remote interface coding for, 214-216
Entity integrity, 197, 198, 272
Entity-relationship (E-R) notation, 269, 270
Entity tags, 115
Envelopes, SOAP, 353, 354
Equipment requesting, 233, 234
ETag field, 114
header, 108
ETag() validation method, 115
Ethical issues, and caching, 72
Examples
DDL query for database table creation, 274
employer benefits-processing system, 195-196
generated servlet code, 179-181
JSP, 175-177
join queries, 276-278
membership processing, 159-161
online art company, 291-292
price-quoting service, 351-353
Red Planet Electronics, 241-243
session management implemented with cookies, 170
unsafe membership processing, 164-165
Exception handling, 281
executeQuery() method, 319
executeUpdate() method, 316, 322, 324, 325, 329
EXECUTIVE table, 273
Exodus Communications, 36
Expires fields, 108, 114, 115
header, 105, 107
Expires tag, 107, 115
Explicit control, implicit control versus, 318
Explicit filtering, and indexes, 284
Explicit style, of executing storing procedures, 283
Explicit submission, 10
Expressions, JSP, 177, 182
Extensible Markup Language, 27, 337, 368
counting nodes in document in, SAX versus DOM, 364
document referencing DTD, 342
document with embedded DTD, 342-343
DOM representation of document in, 344
DTD, for J2EE deployment descriptors, 55
encoding data in, 362
encoding requests in, 363
parsing, 343
parsing performance, 364-365
parsing/querying replies with, 363
parsing using DOM approach, 345-347
parsing using SAX approach, 347-348
parsing versus querying, 365-367
parsing with Apache Xerces 2.0, 345-348
sample document, 341
technologies related to, 348-349
and Web service technology, 338
External procedures, 280
Failover, 174, 175
FastCGI, 150
Fat client, 30, 31
"Fat client" solutions, 190
Fault tolerance, 232
FILTER operation, 288
findByPrimaryKey() method, 216, 217
Finder methods, 216
find_xx methods, 360
Fine-grained approach, 235, 238
for BankSession session bean remote interface, 236-237
Fine-grained serialization, 184
Firewall compliance, and Web service, 336
Firewalls, 132. See also Security
First normal form (1NF), 294-296
Flight status information, 138
Flushing caches, 68
Foreign keys, 273
and entity integrity, 198
and first normal form, 295
and third normal form, 298
FORM element, 103, 168, 169
action attribute of, 159
Freshness lifetime, of document, 107
games.xml, 364
Gartner Group, 27
GenericServlet class, 158
GetBulkDiscountPriceQuote, 350
getInt(), 321
GET method, 96, 97, 99-105, 117, 157
caching dynamic GET requests, 103-105
caching static GET requests, 101-103
judicious use of, 113-114
getObject() method, 141
GET operations, 288
GetPriceQuote, 350, 352
getRemainingSlots() method, 217, 219
GET requests, 101
caching dynamic, 103-105
caching static, 101-103
get_xx methods, 360
GIF files, 53
GIF images, 148
Global resource caches, 126
Google, 28, 69
Granularity, 48
and data dependencies, 261
selection of, 4647
Green pages, 358
Handshakes, 245
Hardware
and parallelism, 7475
and redundancy, 78, 79
Hardware-based load balancing, 184-185
Hash join, 289
HAVING clause, 275
Headers
in HTTP requests/replies, 99
Java Message Service, 245
SOAP, 354
Hidden form fields, 235
for session identification, 168-169
Hierarchical model database, 267
Highly dynamic Web pages, generating, 138-139
High-performance Web applications, 1
Home interface, 193, 203, 204
coding, 207-208
coding for entity beans, 216-217
for entity beans, 212
Horizontal access to information, 279
HTML, 27, 338
XML distinct from, 340
HTML code
generation of, 186
for membership-processing example, 157
HTTP. See Hypertext Transfer Protocol
HTTP 1.0, 93, 106, 116
persistent connections support with, 112
HTTP 1.1, 93, 94, 95, 104, 116
and persistent connections, 336
Transfer-Encoding supported by, 113
HttpRequest descriptor, 163
HttpResponse descriptor, 163
HttpServlet methods, commonly overridden, and original purpose of, 158
HttpSession class, 163
HTTP session management, 235
HttpSession object, 172
HTTP user authentication, 167168
Hyperlinks, 24
Hypertext Transfer Protocol, 5, 333
automatic authentication, 336
connection management, 110-113
cookies, 235
deployment paradigms, 93-95
description of, 91-93
details about, 96-113
efficiency with, 95-96
GET method, 99-105
and message-based schemes, 132
for nonbrowser clients, 114
persistent cookies, 169-170
POST method, 105-106
programmatic access to remote Internet-based functionality via, 353
reducing connections, 98
remote object functionality invoked via, 337
requests, 99, 148
sample request and reply, 92
scalability and performance hints, 113-116
semantics, 97-99
SOAP usage over, 356-357
version 1.1 caching, 106-110
Web services access via, 334, 335, 336
IBM
DB2, version 7, 280
and UDDI standards, 359
WebSphere, 49
IDL. See Internet Definition Language
IETF. See Internet Engineering Task Force
If-Match header field, 101, 102, 108, 109
If-Modified-Since, 115
header field, 101, 102, 106
requests, 115
If-None-Match header field, 101, 102, 108, 109
If-Range header field, 101
If-Unmodified-Since header field, 101, 102
IIOP. See Internet Inter-ORB Protocol
IIS. See Microsoft Internet Information Server
ILP. See Instruction-level parallelism
Images, 103
and content distribution, 36
and persistent connections, 110-111
storage of, in databases, 291-292
transferring for Web page, 98
Implicit control, explicit control versus, 318
Implicit execution, avoiding, 306-307
Implicit filtering, and indexes, 284
Implicit style, of executing stored procedures, 283
Implicit submission, 10
include directive, 182
Independent caches, consistency of, 127
Indexes, 270, 283-284, 289, 307, 321
query plan using, 290
of results, 314
"Indirect" programming, 186
Information agents, 9, 10
Information consumers and providers, 1, 2
init() method, 158, 159, 162
IN operator, 275
Inquiry API, UDDI, 360
Instruction-level parallelism, 75
Integrated voice response, 94
Integration, with Web applications, 12
Integrity constraints, 267, 273
Intelligent agents, 336
Interactivity, 10, 11
Interface Definition Language, 207
Interfaces, 265, 293
Interface technologies, 26-27
Intermediate network support, with HTTP 1.1, 95
Internal product IDs, 241
Internet, 1, 33, 91
always-on characteristic of, 8, 11-12
attributes of, as medium, 8-13
dynamic, 8, 10-11
and future of Web services, 333
integration and, 9, 12
interactivity of, 8, 10
lack of complete control with, 9, 12-13
nature of and challenges with, 35
wide audience for, 4, 8, 9-10
Internet Definition Language, 57
Internet Engineering Task Force, 93, 95
Internet Inter-ORB Protocol, 43, 57, 129
between ORBs, 59
Internet Protocol, 33
Internet service provider, 33
Internet technologies, 2
Interoperability, and request redirection, 152
I/O-bound servicing, 126
IONA, 58
IP. See Internet Protocol
ISAPI, 150
ISP. See Internet service provider
isThreadSafe page directive attribute, 182, 183, 186
IVR. See Integrated voice response
Jakarta 3.2.1, JSP example generated by, 179
Jakarta Tomcat servlet container, Apache server integrated with, 154-156
JAR file, 53
for BenefitSession, 54
Java (programming language), 91, 92, 282, 335, 340
DOM interfaces and bindings for, 344
servlets in, 158
synchronization with, 42, 43
Java applets, 49
Java applications, 49
Java code, efficiency of, 125
Java Collections classes, 46
Java Database Connectivity, 238, 331
API, 309
appending order with use of (multiple queries), 303-304
appending order with use of (stored procedure), 304-305
class hierarchy, 311
concepts and objects, 310-312
database connection, 311-312
database URL, 311-312
driver, 294
key features with, 309
prepared statements with, 318-319
queries, browsing, 315-316
scalability and performance hints for, 325-331
Java Database Connectivity query writing, 312-318
executing single updates, 316
iterating through results, 314-316
statement processing, 312-314
table and stored procedures creation, 317-318
java.io.Serializable class, 231
JavaMail, 65
Java Message Service, 63, 82, 138, 203, 241, 243
administrative objects, 246
asynchronous processing with, 136-137
body types and content, 246
clients, 244
concepts behind, 243-244
concepts, mapping to model-specific interfaces, 248
efficiency-reliability tradeoff with, 261-262, 263
EJB contacted by, 191
mapping concepts to model-specific interfaces, 248
message architecture, 137
message headers, 245
messages, 244-246
messaging models provided by, 262
programming models, 246-249
providers, 244
reliability versus performance, 249-251
sample pub/sub application, 251-258
timing dependencies and publishing models, 251
Java Name and Directory Interface, 126, 224
API, 61
properties file, 253
for resource location, 62-64
Java Remote Method Invocation, 43, 58, 124, 129, 333-334
JavaScript, 26, 27, 44, 98
Java serialization, 124
JavaServer Pages, 50, 64, 135, 136, 152, 162, 187
considerations with, 186
declarations, 177, 182
as development methodology, 183
directives, 177, 182, 183
example page, 175-177
expressions, 177, 182
generated servlet code example, 179-181
life-cycle flowchart, 179
page directive attributes, 182, 183
scriptlets, 177, 182
servlets developed with, 175-183
structure of a page, 177-182
synchronous processing with, 135-136
workings of, 178-182
Java servlets, 50, 60, 67, 135, 150
synchronous processing with, 135-136
thread pooling in, 136
Web server request redirection to, 152
Java Servlet Specification 2.3, SRV 2.2.1 of, 166
Java Statement object, 312
Java threads, for parallelism, 76
Java Transaction API, 243
transaction management using, 59-61
Java 2 Enterprise Edition, 1, 23, 47, 48, 65, 67, 89, 152
container interoperability, 53
deployment descriptor XML DTD, 56
EJB query language (EJB-QL), 216
and Enterprise JavaBeans, 191-192
and JDBC, 309
and JMS provider, 244
and replicating/load-balancing remote functions, 363-364
and request processing, 135-137
services, and APIs, 52
and session persistence, 174, 175
Java 2 Enterprise Edition specification, 49-65
and architecture, 64
deployment issues with, 51-57
overview of, 49-52
platform technologies and services, 57-64
Java 2 Standard Edition, 58
java.util.ArrayList class, 225
java.util.Collection, 216
java.util.Serializable, 226
Java Virtual Machine (JVM), 126, 152
Java Web Server, 135
javax.jms.MessageListener, 225
javax.jms.MessageListener.onMessage() method, 225
javax.transaction package, 60
javax.transaction.UserTransaction interface, 61
JDBC. See Java Database Connectivity
JDBC 2.0 API
batch updates feature with, 325
result management with, 323
updateable results with, 324
JDBC driver. See Java Database Connectivity, driver
JDBC/ODBC bridge, 312
J2EE. See Java 2 Enterprise Edition
j2eeadmin tool (Sun), 252-253
J2EE1.3+, 243
JMS. See Java Message Service
JMS API, 244
calls, 253
execution of modes for message consumers with, 249
relationship among providers, clients, messages and, 244
JMS client, sample remote, 255
JMSDeliveryMode, 245
JMS efficiency-reliability tradeoff, 261-262
JMSExpiration, 245
JMSMessageListener object, 256
JMS 1.0.2 specification, header fields defined by, 245
JMSPriority, 245
JNDI. See Java Name and Directory Interface
Join condition, 276
JOIN operation, 288, 289
Join queries, 276-278, 287, 300
JPEG images, 148, 291, 292
J2SE. See Java 2 Standard Edition
JSPs. See JavaServer Pages
JTA. See Java Transaction API
Keep-Alive header, 112
Keys
in caches, 68
foreign, 273
primary, 272
Language neutrality, and Web service, 335
Last-modified approach, 105
Last-Modified field, 114, 115
Last-Modified header, 106, 107
Latency, 20
and batch updates, 329
caches and reduction of, 70
and data marshalling, 124
and node distances, 75
and transfer of static content, 103
LDAP, 62
Lea, D., 43
Least-recently-used policy, 68, 69
Legacy systems, 38
Life cycle
and bean instances, 192, 193
entity bean, 212, 213
message-driven beans, 225
session bean, 204-206
stateful session bean, 206
stateless session bean, 205
Linearly scalable application response/throughput times, 18
Little's law, 16, 17
Load balancing, 34, 99, 127, 147
deterministic, 173
hardware-based, 184-185
remote functions, 363-364
scalability, 72, 73
software-style, 184, 185
Loan rate checks, 336
LocalDirector (Cisco), 173, 184
Local model, for entity beans, 200
Local objects, advantages with, 200-201
Local (or remote) interface, 193
LOCATION table
and denormalizing data model, 300
in third normal form, 298
Location transparency, and EJB, 192
Logging, asynchronous, 259
Logical database design, 268, 307
entities, attributes, and relationships, 269-270
Logic types, mixing, 161
Loose coupling, with Web services, 336
LRU policy. See Least-recently-used
Mail servers, JNDI for location of, 63
Many-to-many relationships
bean, 198
among entities, 270
MapMessage body type, 254
MapMessage category, 246
Marshalling, 124, 147, 231
Massively parallel processors, 74
Matrix multiplication, and parallelism, 76
Max-Age field, 107, 108
Max-age response, 109
MemberBenefit entity beans, 196, 198, 228
MemberBenefitHome object, 211
MemberBenefit instances, 211
MemberBenefit object, 230
MEMBER_BENEFITS table, 198
Member entity bean, 196, 198, 200
MEMBER_ID, 198
Membership processing sample servlet, 159-161
MEMBER table, 198
Menasce, D., 16
Merge join, 289
Message-based protocols, binary protocols versus, 92
Message beans, 61
Message consumer, 246
Message consumption, synchrony of, 247-249
Message delivery reliability options, 261
Message-driven beans, 194, 203, 224-228, 240
coding bean class, 225-228
life cycle, 225
preference over session beans, 232-234
Message header, JMS message, 244, 245
MessageListener interface, 256
Message processing, asynchronous, 256-257
Message producer, 246
coding, 252-254
Message properties, JMS, 244, 245
Message publisher development, 252-254
coding message producer, 253-254
topic creation, 252-253
Message queues, JNDI for location of, 63
Messages
Java Message Service, 243, 244-246
with price-quoting service, 351-352
in WSDL document, 350
Messages persistence, and JMS reliability versus performance, 250-251
Messaging, 232, 233, 234
services, 65
styles, 247
systems, 38, 132
Microsoft, 338
and UDDI standards, 359
Microsoft Internet Explorer, 27, 93
Microsoft Internet Information Server, 135, 150, 151
MIME. See Multipurpose Internet Mail Extension
mod_cgi module, 151
mod_rewrite module, 173
Modularization
and performance, 40
and reusability, 46
with tier-based design, 38-39
Money transfers, and rollbacks, 321-322
MPP. See Massively parallel processors
Multiple containers, session management with, 172-175
Multiple issue technique, 75
Multipurpose Internet Mail Extension, 93
Multirow functions, 216
Multithreaded application servers, 41, 42
using/building, 4546
Multithreading, 75, 147
for querying in parallel, 330-331
and servlets, 163-166
must-revalidate response, 109
MyDb data source, 312
Names, of tables, 271
NAPs (network access points), 35
Nested loops algorithm, 289
Nested queries, 275-276, 300, 327
NetRatings, 4
Netscape Web servers, 150
Network, 33-36, 47
access points, 35
and client hardware/server hardware, 3
between client side and server side, 35-36
client-side network elements, 33-34
server-side network elements, 34-35
Network connectivity requirements, 28-29
Networking infrastructure, 3
Network model database, 267
Network service provider, 35
Newspapers, 4
Newswire stories, 138
Nielsen, H., 116
no-cache response, 109
Nonblocking mode, 249
Nonbrowser clients
HTTP for, 114
Web applications with, 94-95
Nondurable subscribers/subscriptions, 254, 256, 262
Nonpersistent delivery, 246, 261, 262
Nonpersistent messages, 250, 251
Nontransaction, of messages, 249, 250
Normal forms, of data modeling, 294-299
no-store response, 109
notify() mechanism, 126
NOT operator, 275
NSAPI, 150
NSP. See Network service provider
n-tier application architecture, 32-43, 47
clients, 32-33
efficient middleware challenges, 43
multithreaded application servers, 41-43
network, 33-36
server, 36-37
tier-based designs, 38-41
n-tier applications, 38, 43, 49, 64, 65, 119, 148
NULL designation, 271-272
Numeric types, 271
ObjectMessage type, 254
Object orientation, 268
Object-oriented databases, 268
Object persistence, and EJBs, 192
Object request broker, 57
IIOP between, 59
Objects, 285
dependent, 201
persistent, 211
Object-technology neutrality, and Web service, 336
OCI. See Oracle Call Interface
ODBC, 294, 311
and JDBC, 309
On-chip parallelism, 75
One-to-many relationship, 198
between DEPARTMENT and EMPLOYEE, 269
among entities, 270
One-to-one relationship, entity bean, 198
Online art company example, 291-292
Online auctions, 9, 11
Online banking, 16
Online brokerage applications, 23
Online retail applications, 197
OnMessage() bean function, 203
onMessage() method, 228, 256
OODBMS. See Object-oriented databases
Opaque tags, 108
Opera browser, 27
Operation, in WSDL document, 350
Operator, 286
Optimizers, 289
Oracle, 191, 290
8i database architecture, 267
8i thin JDBC driver, 312
high-performance DBMS, 73
index creation with, 284
JDBC drivers supported by, 294
Procedural Language, 280, 281, 282
sequences supported by, 284
SQL statements cached by, 318
and UDDI standards, 359
Oracle Call Interface, 294
Oracle PL/SQL, appending order with use of (stored procedure), 305
Oracle query optimizer, 288
Oracle query plan dataflow graph, 289
ORB. See Object request broker
ORDER_ITEMS table, 300, 303
Orders
appending, using JDBC (multiple queries), 303-304
appending, using JDBC (stored procedure), 304-305
appending 1,000 items to, 306
appending, using Oracle PL/SQL, 305
batch processing of, 325
ORDERS table, 300, 301, 303
OR operator, 275
OSI model, of network programming, 93
Outages, 11, 12, 13
Out-of-process servlet container model, 153, 154
Packaging, J2EE applications, 53-54
Packets, 33
page directive, 182
Page hits, 4
Page hits counts
application logic for, 178
sample JSP for, 176-177
Parallel flows, 287
Parallelism, 40, 74-78, 88, 232, 259
and asynchrony, 80, 82, 137
interapplication, 139
with JMS-based solutions, 263
maximizing, 144
and request redirection, 152
and resource pooling, 82
Parsing, XQuery versus, 367
Partially ordered query dataflow graphs, 287
Passivation method type, and bean instances, 194
Passwords, 72
PDAs. See Personal digital assistants
Peer-to-peer models, 132
Performance, 23, 87. See also Scalability; Scalability and performance challenges; Scalability and performance hints; Scalability and performance techniques
and asynchrony, 80
and bean-managed persistence, 202
and cache-control headers, 110
caching and improvement in, 71
callback methods for, 205
and coarse-grained methods, 238
and database, 265
and data normalization, 299, 302
and distributed, multitier applications, 189
and efficient remote interfaces, 144-147
and future of Web services, 368
impact of COMMIT on, 329-330
with Java Message Service, 261-262, 263
and join queries, 278
measuring, 7, 13, 14-16
and message persistence, 250
and multithreading, 330
and nested queries, 275
and optimization of application, 266
and persistent connections, 110
with PTP and pub/sub, 262
and query processing, 286
and request processing modes, 133
request processor and, 119
and scalability, 58
and server-side application logic, 191
and stored procedures, 303
trends, 18
and versions of HTTP, 94.
Perl, 136, 151
Persistence, 263
automatic, 174-175
bean-managed, 202
container-managed, 216, 239, 240
Persistent application objects, 197
Persistent connections, 99, 110, 114, 123, 132
advantages with, 112
and embedded images, 111
HTTP 1.1, 336
support for, 116
Persistent cookies, 172
HTTP, 169170
Persistent data, 265
Persistent data management, 30, 32
Persistent delivery mode, 246
Persistent message delivery/messages, 250, 261
Persistent objects, 211
Personal digital assistants, 26-27, 94
Personalization information, 32
Physical database design, 268, 270-273, 307
constraints, 272-273
tables and rows, 271-272
Pipelining, 75, 116
Plan execution, within query processing, 286
Platform-independent application objects, 207
Platform neutrality, and Web service, 335
PL/SQL, 191
PointCast, 121
Point-to-point messaging model, 243, 246, 247, 261, 262
Point-to-point programming model, 251, 257
Polymorphism, 124
Pooling, 46, 88
PoolTest.java, 82, 83
Portal services, 23
Ports
with price-quoting service, 353
in WSDL document, 351
Port types
with price-quoting service, 352
in WSDL document, 350
POST method, 96, 97, 101, 105-106, 113-114, 117, 157
POST requests, 362
PreparedStatement calls, 314, 325-328, 329
PreparedStatement object, 311, 318-319, 320, 321
Prepared statements, with JDBC, 318-319
Presentation logic, 161, 178
PRICE_HISTORY table, 300, 301, 303
Price/performance, indexes and throughput, 19-21
PriceQuoteSoapBinding, 350
Price-quoting function, 349, 350
Price-quoting service, 351-353
messages and types, 351-352
port types and bindings, 352-353
and SOAP, 354-357
Price updates, 249, 252
Primary keys, 272, 285
and first normal form, 295
and second normal form, 296, 297
and third normal form, 298
PrintWriter object, 182
PRIORITY_LEVEL table, in 2NF, 297, 298
private response, 109
Privileges, 285
Proactive application servers, 138
Procedural Language (Oracle), 280, 281, 282
ProcessMembership servlet, 158
Processor nodes, distance between, 75
Producer performance, and nonpersistent message delivery, 262
Producing application, 242
Product IDs, 241, 246
Productivity, 19-20
ProductPriceRequest, 350, 351
ProductPriceResponse, 350, 351
Profile updating, 40
PROJECT table
in 1NF, 295
in 2NF, 296, 297, 298
Properties, JMS message, 244
Providers
Java Message Service, 243, 244
and Web services, 362
Proxy cache, 34
Proxy compliance, and Web service, 336
proxy-revalidate response, 110
Proxy servers, and caching of static GET requests, 102, 103
PTP model. See Point-to-point programming model
public response, 109
Publishers, 247
Publishing API, UDDI, 360-362
Publish/subscribe (pub/sub) messaging model, 243, 246, 247, 248, 251, 261, 262
benefits with, 257
with Red Planet, 252
topic creation with, 252-253
putObject() method, 141
Quality of service (QoS), 12, 13
Queries/querying, 10, 331
data, 273-275
and JDBC, 316
join, 276-278
meaning of, 273
nested, 275-276
and normalization, 299, 300
in parallel, multithreading for, 330-331
parsing, 286, 318, 327
simplification of, with views, 279-280
writing JDBC, 312-318
Query language, 273
Query plans
generation/optimization of, 286
using index, 290
Query processing, 286-290, 307, 327
phases of, 287
Queue class, 139, 142
QueueConsumer class, 142-143
QueueMain class, 142
QueueMain program, 143
QueueProducer class, 142
Queue reader, 141
Queues/queuing, 246, 247
and asynchronous communication, 131
for communication among threads, 139-141
managing with JMS, 252
Quilt technology, 366
Radio, 5
RAID, 78
raise_multiple value, 62, 63, 64
Reactive Web page delivery, 138
receive() method, 257, 258
Red Planet Electronics, 241
relationship between resellers and, 242
reseller price update flowchart, 242
Red Planet example, 244, 246, 249, 250, 251-258
deploying pub/sub application, 258
message publisher development, 252
message subscriber development, 254-258
price updates, listener for, 256-257
Redundancy, 34, 65, 78, 89, 266, 267
replication contrasted with, 79
and Web servers, 79
Referential integrity, 201, 272-273
Regeneration of content, 115
Relational databases, 67, 267, 309
constraints supported by, 272-273
and stored procedures, 280
Relational database management system (RBMS), 268
Relational model database, 267
Relational operators, 275
Relations, 271
Relationships, 269
Reliability, 12. See also Efficiency; Performance
cache, 73
with JMS, 261-262, 263
with JMS distribution models, 251
Remote client, sample JMS, 255
Remote database, batch updates with, 328-329
Remote functions, replicating and load balancing, 363-364
Remote interface, 203, 212
coding, 206-207
coding for entity bean, 214-216
efficient, 144147
Remote (or home) interface, 193
Remote procedure call, 43, 129, 338
Remote Web functions, publication of, 333-334
Replication, 88
and caching, 67-73
and performance, 302
redundancy contrasted with, 79
value-added, 301
Reply, 24
Report data, 32
Request, 24
fulfillment, with HTTP, 97
pipelining, 113
Request-level state, 163
Request processing, 119-148, 147
and connection management, 123
and CPU-bound servicing, 125-126
and data locality in caching environments, 127
and data marshalling, 124
general problem, 120-121
with highly dynamic Web pages, 138
importance of, 120
and I/O-bound servicing, 126
and J2EE, 135-137
modes, 128-134
pretty picture and ugly details of, 122
and remote interface design, 144
and request servicing, 124
specific challenges with, 121-122
Request-processing modes, 128-134
asynchronous communication, 129-131
caching and data locality, 133-134
connection management, 133
data marshalling, 134
messaging systems, 132
scalability and performance, 133
synchronous communication, 128-129
Request processors, 36, 147, 119
RequestRunnable.java, 82, 83, 84
Request servicing, 122, 124-125
Reseller update processing, 241
Resident time, 107
Resource location, JNDI for, 62-64
Resource pooling, 82-87, 89
Resource references, caching, 126
Resource usage, and scalability, 16
Response caching, HTTP, 114-116
Response delay, 107
Results, bidirectional iteration and updateable, 323-324
ResultSetMetadata object, 314
ResultSet object, 311, 314, 324
ResultSet.previous() method, 323
ResultsSet.afterLast() method, 323
Reusability, 11
and modularization, 46
with tier-based design, 38-40
Reverse proxy cache, 35
RMI. See Java Remote Method Invocation
RMI-IIOP, 129
component communication via, 57-59
and integration of Java and C++ CORBA objects, 58, 59
Roll back
operation, 60, 61
of transactions, 321-322, 323
Round-robin
distribution policy, 127
thread scheduling, 41
Routers, 35
Routing tables, 13
Rows
and entity integrity, 272
inserting into tables, 274
inserting with JDBC, 316
in physical database design, 271-272
in relational databases, 267
RPC. See Remote procedure call
Safety, and performance, 262
save_xx methods, 361, 362
SAX. See Simple API for XML Parsing
Scalability, 1, 23, 87. See also Efficiency; Performance
caching and improvement in, 71
callback methods for, 205
and connection management, 123
and database, 265
and distributed, multitier applications, 189
and efficient remote interfaces, 144-147
EJBs and enhancement of, 192
and future of Web services, 368
load balancing for, 72, 73
measuring, 13, 1621, 22
and message persistence, 251
and modularization, 39
and multithreaded servers, 163
optimizing of application, 266
and performance, 58
with PTP and pub/sub, 262
and request-processing modes, 133
request processor and, 119
and server-side application logic, 191
servlet, 185
and servlet deployment, 172
and stateless session beans, 197
targeted, 186
and versions of HTTP, 94
and Web server request redirection, 151, 152
Scalability and performance challenges, 363-367
parsing versus querying XML, 365-367
replicating/load balancing remote functions, 363-364
XML parsing performance, 364-365
Scalability and performance hints
avoiding triggers and other implicit execution, 306-307
batch updates with remote database, 328-329
cautions about commits, 329-330
data access, 293-294
database usage, how and when, 290-293
data model normalization, 294-299
fine-grained serialization usage, 184
hardware-based load balancing, 184-185
JMS efficiency-reliability tradeoff, 261-262
message-driven beans preferred over session beans, 232-234
messaging opportunities within application system, 259-261
multithreading used to query in parallel, 330-331
PreparedStatement usage, 325-328
selective denormalization of model, 299-302
stored procedures usage, 303-306
use messaging, 258-259
vendor knowledge, 307
Scalability and performance techniques, 67-89
asynchrony, 80-82
caching and replication, 67-73
parallelism, 74-78
redundancy, 78-79
resource pooling, 82-87
SCAN operator, 286
Scenario, 15
Schema definition, 341
Schema languages, and DTDs, 341-343
Screen savers, 121
"Screen scraping," 335
Scriptlets, JSP, 177, 182
Script processor, Web server request redirection to, 151-152
Scrollable result set, 324
Search engines, 9
Search operation, 6
Second normal form (2NF), 296-298
Secure data transactions, 1
Security, 51, 168
and cache-control headers, 110
and caching, 72
and deployment descriptors, 55-56
and local objects, 201
and messaging systems, 132
and SOAP over HTTP, 356
selectBenefit() method, 229
Selection operation, 6
SELECT operator, 286
SELECT statement, 274
Self-describing data, 338, 368
need for, 333
and XML, 340-341
Semantics
HTTP, 97-99
integrity of, 273
Sequences, 284-285
Serialization, 124, 175
of data access, 126
fine-grained, 184
request, 166
of request execution, 163-164
for unsafe membership processing example, 164-165
Server hardware, 3
Servers, 47, 121, 127. See also Clients
application, 189
and caching, 106
content regeneration by, 115
HTTP and scalability issues for, 98-99
Server-side application architecture, 36-38
Server-side application logic, disadvantages to, 191
Server-side drivers, 294
Server-side entity beans, relationship between client data and, 200
Server-side network elements, 34-35
Server-side network infrastructure, 35
Server-side organization, 37
Server software, 3
Service information, and UDDI, 358
service() method, 61, 158, 162, 163
Service replication, with tier-based design, 40-41
Services
and endpoints, 350
with price-quoting service, 353
in WSDL document, 351
Servlet-based session management, 235
Servlet containers, 37
integration options, 153
and servlet execution, 162-163
and servlets, 152-154
Web servers and integration of, 154-157
ServletContext class, 163
Servlet instance, destroying, 162
Servlet interface, designing, 157-158
ServletResponse object, 182
Servlets, 303
coding, 158-162
deploying, 172-175, 187
developing, 157-162, 187
execution of, 162-166
interacting with, 154
JSP and development of, 183
membership processing sample, 159-161
and multithreading, 163-166
and servlet containers, 152-154
and session management, 167-172, 187
for session management, not business logic, 185-186
using, 152-157, 187
Servlet session tracking API, 171-172
Session beans, 61, 194, 196-197, 198, 203-206, 234, 240
Message-driven beans preferred over, 232-234
Session identification, 167-172
hidden form fields, 168-169
HTTP persistent cookies, 169-171
HTTP user authentication, 167-168
reading from incoming request, 170-171
rewritten URLs, 169
servlet session tracking API, 171-172
Session lifetime, 25
Session management, 161, 187
cookies, and implementation of, 170-171
with multiple containers, 172-175
and servlets, 167-172
Session migration, automatic, 174-175
session object, 181
Sessions, 24, 246
Session state, maintaining in hardware load balancing, 174
SetInt(), 321
setSessionContext() method, 204, 208
SGML. See Standard Generalized Markup Language
SharedConnection.java, 82, 86
SharedConnection object, 83
Shirazi, J., 126
Simple API for XML Parsing, 343, 344-348
efficiency differences between DOM and, 364
XML parsing using, 347-348
SimpleDom.java, impact of DOM tree building versus other code in, 365
Simple Object Access Protocol, 92, 337, 338, 339, 340, 362, 368
communicating with remote services via, 363
communication based on, 354, 355
encoding rules, 353
envelopes, 353, 354
over HTTP, 356-357
RPC representation, 353
translators, 355, 362
Web services invoked with, 353-357
Simplicity, 309, 331
Single-row functions, 214, 215
SingleThreadModel interface, 164, 166, 184
"Smart stubs," 231
s-maxage response, 109
SMP machines. See Symmetric multi-processing machines
SOAP. See Simple Object Access Protocol
Softbots, 9
Software
and parallelism, 76
and redundancy, 78, 79
Software-style load balancing, 184, 185
Specification of services information, and UDDI, 358
Speculative execution, 75
Speedup, 15-16
Spider, 9
Spoofing, 168
Sports scores/event statistics, "live," 138
Sprint, Inc., 4
SQL. See Structured Query Language
SQL-92 standard, 273
SQL queries
GROUP BY part of, 275
optimizing, 289-290
resolving, 286
SSL (secure socket layer), 132, 336
Standard Generalized Markup Language, 338
XML distinct from, 340
Starr report, 45, 7
startElement() method, 348
Stateful session beans, 196, 198, 203, 205, 206, 213, 234, 235, 236
Stateless session beans, 197, 198, 203, 234-236
life cycle, 205
State management, 174175, 197
State manager, 235
Statement.executeQuery() call, 313
Statement.executeUpdate() call, 329
Statement objects, 312, 316, 318, 319
Statement processing, with JDBC, 312-314
Static GET requests, caching, 101-103
Static objects, 148
Static page data, JSPs, 177
Static requests, 24
Static responses, 148
Static Web pages, 36
Stock price checks, 336
Stored procedures, 280-282
creating with JDBC, 317
and denormalization, 302
using, 303306
Structural representation of data, 340
Structured information, 292
Structured Query Language, 238, 267, 273, 286, 331
database queries via, 309
DML commands, 275
dynamic, 320-321
JDBC and statements in, 310
Stubs and skeletons, 231
code for, 57
and remote invocation, 232
Student course registration requests, 144-147
Subscriber listener, and asynchronous client postprocessing, 258
Subscribers, 247
creating, 254
Subscriptions
durable, 251
synchronous processing of, 257-258
Sun Microsystems, 338
Java 2 Enterprise Edition, 49
Java Web Server supported by, 135
JDBC/ODBC bridge supplied by, 312
Switches, 35
Sybase, Transact-SQL (T-SQL), 280
Symmetric multiprocessing machines, 75
Synchronization
of access methods, and databases, 46
clock, 15-16
and multithreaded code, 42
Synchronized keyword, 46, 164, 165, 184
Synchronous communication, 80, 128-129, 137, 147-148
bidirectional communication versus, 245
caching, data locality and, 133
and connection management, 133
and data marshalling, 134
Synchronous delivery of messages, 247
Synchronous I/O-bound execution, poor performance with, 260
Synchronous message processing, 254, 256
Synchronous middleware technology, 43
Synchronous price update processing, 130
Synchronous processing, with Java servlets and JSPs, 135-136
Synchronous subscription processing, 257-258
Synonyms, 285
Syntactic checking, 318
Tables, 270
creating with JDBC, 316, 317
data in, 38
and 1NF, 295
and performance measurements, 14-15
in physical database design, 271-272
in relational databases, 267
rows inserted into, 274
and 2NF, 296, 297
and 3NF, 298, 299
Tag-based validation, 108-109
taglib directive, 182
Targeted scalability, 186
Task parallelism, 40
Tcl, 151
TCP. See Transmission Control Protocol
TCP/IP, 33, 93, 94, 97
Telephones, 2627
Television, 5
Testing, 47
Text-based messages
with SOAP, 356
and Web services, 353
TextMessage body type, 254
TextMessage type, 246
Thin clients, 30, 31, 4445
application servers and deployment of, 189
and Web applications, 190
Thin drivers, 294
Third normal form (3NF), 298-299
Thread-level parallelism, 75
Threads, 136
data streamed between, 139-144
pooling, 46
Thread-safe code, 46, 163, 184
Thread-scheduling policies, 41
Three-tier applications, 38
Throughput, 20-22
and price performance, 1921
sample application response and times for, 17
and scalability, 16
times, linearly scalable, 18
Tier-based designs, 38-41, 47
better distributed processing and task parallelism with, 40
increased modularization/component reusability with, 38-40
and more efficient service replication, 40-41
Tiers, 38
Timing dependencies, and JMS publishing models, 251
TLP. See Thread-level parallelism
TopicConnection, 253, 256
Topic creation, with pub/sub model, 252-253
TopicPublisher, 254
Topics, destinations as, 246
TopicSession, 254
TopicSubscriber object, 256, 257
TPC. See Transaction Processing Council
TPC-A, TPC-B, and TPC-C benchmarks, 20
TPC-style benchmarks, 19, 20
TPS. See Transactions per second
traceroute, 36
Transaction management, 321-323
and Enterprise JavaBeans, 192
with Java transaction API, 59-61
Transaction Processing Council, 20
Transactions
and client acknowledgment, 249
and EJBs, 61
explicit control of, 330
JNDI for location of, 63
processing of, 291, 321
at Web application level, 24
and Web components, 60-61
Transactions per second, 17
Transact-SQL (T-SQL), 280
Transfer-Encoding header, 112, 113, 116
transferFunds() method, 259, 260
Transfer rate, and persistent connections, 111-112
Transistive dependency, 298
Translators, SOAP, 355, 362
Transmission Control Protocol, 33, 97
Trees, with DOM, 343, 344, 364, 365
Triggers, 282-283
avoiding, 306-307
Tuples, 267, 271
24x7 availability, with Internet, 11
Two-tier applications, 38
Types
with price-quoting service, 351-352
in WSDL documents, 350
UDDI. See Universal Description, Discovery, and Integration
UDDI 2.0 Programmer's API, 359, 360, 361
UDP. See Universal Datagram Protocol
Uniform Resource Locators
JNDI for location of, 63
rewriting, 169, 235, 236
Universal Datagram Protocol, 33, 97
Universal Description, Discovery, and Integration, 339, 368
APIs, 340, 359-362
information types, 358, 359
publishing functionality via, 362
standards, 359
Web services registered with, 357-362
Universal Resource Identifier, 92
UNIX, 267
Unsafe membership processing, example of, 164-165
Unstructured images, 292
Updateable results, 324
updateRow(), 324
Updates
batching with remote database, 328-329
with JDBC, 316
UDDI, 360
updateString(), 324
UPPER() function, 215
URI. See Universal Resource Identifier
URLs. See Uniform Resource Locators
Usability benefits, 292
Usable applications, 27
Useful applications, 27
User authentication, HTTP, 167-168
UserLand, 338
Usernames, 72
Value-added denormalizations, identifying, 302
Value-added replication, 301
Values
in caches, 68
and sequences, 284-285
Vendors, 318
choosing, 64
database, 280, 291
JDBC driver provided by, 309, 310, 311
knowing, 239-240, 307
Vertical access to information, 279
Video streaming, 75
Views, 270, 278-280
Virtual shopping carts, 197
Visigenic, 58
Visual Basic (VB), 335, 340
Visual representation of data, 340
wait() mechanism, 126
WAR files, 53, 54
Waste, 266
W3C. See World Wide Web Consortium
Weather information, 138, 336
Web. See World Wide Web
Web applications, 22, 24
with browser clients, 93-94
defined, 2
emergence of, 1
growth rates, 4
with nonbrowser clients, 94-95
and parallelism, 76
requirements, 25
terminology, 23-25
Web sites versus, 2
Web browsers, 26, 27, 187, 336
Web caching, 13, 33
Web components, and transactions, 60-61
Web containers, 50, 51, 135, 191
Web event listeners, 50
WebLogic Server, 174, 175
WebLogic suite, 49
Web pages, 2
fetching, with HTTP, 98
highly dynamic, 138-139
for querying a specific city, 100, 103, 104
with several embedded images, 111
static, 36
Web server farms, 34, 78
Web server request redirection
and dynamic response generation, 151
to Java servlets, 152
to script processor, 151-152
Web servers, 3, 36, 135
extension of, through APIs, 150
and HTTP requests, 148
redundant, 79
and servlet container integration, 154-157
Web services, 333-368
consumer's perspective on, 363
definitions, 335, 350-351
description of, 335-338
developing, 349
features, 337
invoking with SOAP, 353-357
practical use of, 334-335
provider's perspective on, 362
registering with UDDI, 357-362
replication and load-balancing demands of, 364
scalability and performance challenges with, 363-367
technologies, 334, 338, 340
technology stack, 339
with WSDL, 349-353
XML: self-describing data, 340-349
Web Services Description Language, 339, 368
available functionality with, 362
document definitions, 350-351
price-quoting service with, 351-353
Web sites, Web applications versus, 2
WebSphere, 49
WHERE clause, 216, 275
White pages, 358
Wildcard tokens, 320
Windows, 267
"Workers," 154
Workflow processing, 234
World Wide Web, 1. See also Internet
nature of, and challenges with, 3-5
requirements of, 27-29
World Wide Web Consortium, 338
DOM working group of, 343
and SOAP, 353
WSDL report, 349
Write-through caches, and server farm, 127
WSDL. See Web Services Description Language
XA transaction standard, 60
XML. See Extensible Markup Language
XML files, deployment descriptors as, 55
Xpath, 366
XQL, 366
XQuery, 365-366, 368
parsing versus, 367
Yahoo, 9, 28, 36
Yellow pages, 358
Zero-to-many relationship, between entities, 270

Updates

Submit Errata

More Information

Unlimited one-month access with your purchase
Free Safari Membership