Title: Enterprise JavaBeans EJB Architecture ScalabilityLoad Test
1Enterprise JavaBeans (EJB) Architecture
Scalability/Load Test
- Ted Osborne
- tosborne_at_rswsoftware.com
- RSW Software, Inc.
- www.rswsoftware.com
2Agenda
- The Current Landscape Performance Testing EJBs
- Example Case Study using EJB-test
- Survey EJB Performance Test Strategies
Techniques
3Performance Testing EJBs
Presentation tier
Data tier
Middle tier
web client
EJB server
web server
database server
web client
web client
client
client
client
4Our "OrderEntry" Example
WebLogic 5.1.0 EJB server
Cloudscape database server
ltltrequestsgtgt
ltltresponsesgtgt
5EJB-test
- Strategy
- Create Java driver "client" for EJB under test
- Goal time method requests on EJB's interface
(business methods) - Automate code generation through Java Reflection
API EJB code patterns - Simulate load using that client
- Run the client in multithreaded load generator
- Map in data from tables (or use generated data)
- Aggregate log data
- Response times
- Exceptions
- Data actual vs. expected
6Select the EJB to be tested from the Jars in your
classpath
7EJB-test automatically generates a Java Test
Client specific to the selected EJB and optimized
for WebLogic or WebSphere
8The automatically generated Java Test Client
times the method calls to the selected EJB
9Define the load to execute and run the test.
10Select the results to view
11Select the response time data to view
12Compare 2 test executions
13OEVendor vs. OELoad
- A simple response time comparison reveals which
bean is the bottleneck - Potential sources of bottleneck
- Design
- Deployment
- Environment
14Comparing EJB Deployments
OEProduct ejb-jar.xml37 lttrans-attributegtSup
ports OEVendor ejb-jar.xml37
lttrans-attributegtRequired weblogic-cmp-rdbms-jar.x
ml29 lttransaction-isolationgtTRANSACTION_SERI
ALIZABLE
15Strategies Techniques
- Load Testing
- Data-driven Load Testing
- Multithreaded Multi-JVM Loads
- Distributed Load Testing
- Scenario (Multi-bean) Testing
- Other Interesting EJB Tests
16EJB Load Testing
- Objective
- Measure EJB's ability to server increasing number
of client requests - Most Common Metrics
- Transactions per Second (TPS)throughput
- Response timeclient-side
- Other Interesting Metrics
- Error rate (exceptions)
- Correctness (expected vs. actual values)
- Method-level response times
17Data-driven EJB Load Testing
- Objective
- Test EJBs with realistic data sets
- Approach
- Particular data combinations often comprise a
"use-case" - Data set triggers business rules or call graphs
of interest - Automation Leverage Data from CSV "maps" into a
static client driver - Hurdles
- Marrying clients to data sets
18EJB Load Testing System Topology
19Multithreaded Multi-JVM Load Generation
- Objective
- Better simulation of load
- Approach
- Multithreaded load generation simulates a
multi-client load (concurrent requests) - Dividing load across JVMs creates multiple socket
connections to server - Hurdles
- Thread safety execution coordination
20Distributed Load Testing
- Objective
- Generate a load simulation that is large enough
- Approach
- Distribute client JVMs across multiple machines
- Hurdles
- Still have thread safety and client coordination
- Aggregating result logs
- Client execution environment
21Distributed Load Testing Nirvana
22Other Interesting EJB Tests
- Stress Testing
- Mixed/Randomized Loads
- Scenario Testing
- Security Testing
- Configuration Testing
23Anatomy of an EJB Test Client Driver
24Anatomy of an EJB Test Client Driver
25(No Transcript)