Back to Dot-Com Builder How-Tos Archive
Scaling J2EE Technology Applications Based on Application Infrastructure Techniques - Part 3
by Rakesh Radhakrishnan This article is the third in a four-part series that identifies multiple techniques for scaling applications based on J2EE technology to support many concurrent users.
Scaling Techniques
Database Server - System Level Clustering and Parallel Databases (e.g., Oracle 8i) Most DBMS (relational and object-relational) can scale vertically within a box due to the multiprocess and multithreaded architecture of these systems. Figure 13 illustrates a typical single-node configuration.
Some of the best TPC-C benchmarks are accomplished on single-node configurations that support several hundred thousand transactions per minute. In cases where the vertical scalability is not sufficient, horizontal scalability can be achieved via system-level clustering and parallel databases (when two or more nodes are submitting transactions to the same database), as shown in Figure 14.
Scaling can extend further based on the I/O characteristics of the database. If the database is more read- than write-intensive, it is easier to introduce a 4-node cluster, with 3 read nodes and 1 write node on a SAN (storage area network) topology, as shown in Figure 15.
This approach to scaling is appropriate for read-intensive databases; if the database is write-intensive or equally balanced, more nodes should be added to handle writes. Distributed lock manager (DLM) plays an intricate role in such configurations. DLM ensures data integrity when two are more nodes are submitting transactions to the same database. It's also possible to accomplish database system scaling via data partitioning. In data partitioning, the data is sliced into manageable pieces (for example, based on geography, alphabetic groups, etc.). This partitioned data is then managed by its own dedicated database management system.
Messaging Server - Redundant Processes and Distributed Queues (e.g., Tibco) Messaging systems typically utilize a distributed architecture to eliminate bottlenecks and single points of failure. Applications require reliable message relaying, certified and transactional, as appropriate for each message exchange. Messaging can be synchronous or asynchronous, locally delivered or sent via a WAN or the Internet. Generally speaking, messages are self-describing and platform-independent. Scaling the messaging platform relies on redundant processes and distributed queues. When messages are sent from one application to another, two or more redundant messaging processes receive the message, and distributed queues are built up at the same time. This configuration is shown in Figure 16.
To ensure that the message is not applied twice to the receiving application, there is a one-in-n delivery algorithm built into the messaging platform. Essentially this ensures that one successful attempt is propagated to all redundant processes. JMS-based systems optionally support distributed transactions based on Java Transaction Service (JTS).
Transaction Server - Data-dependent Routing and Request Prioritization (e.g., BEA Tuxedo) The scalability of the transaction servers is built into these systems based on techniques such as data-dependent routing and request prioritization.
Data-dependent Routing Here's an example. A bank database may be horizontally partitioned by account number, with different ranges of accounts stored in separate, dedicated database instances. Instead of coding the specific partitioning information into the application code for accessing the accounts, you can use the JTS-based transaction manager data-dependent routing. In effect, the transaction manager looks at the specified data value, consults routing information stored in a tool such as a bulletin board, and dispatches the request to a database instance operating on the correct data partition, as shown in Figure 17.
If changes are made to the database partitioning (migrating a partition to a new server, or changing the distribution of accounts across existing partition instances), one needs only to change the transaction manager data-routing information. The application code is isolated from this issue. From this standpoint, the transaction service offers tremendous value as middleware between applications, application servers and different data stores.
Request Prioritization
|
| |||||||||||||||