StockTrader Sample: Application Case Study Performance and Java Interop

obsequiousdowntownInternet and Web Development

Aug 7, 2012 (4 years and 10 months ago)

827 views

Gregory Leake

Microsoft Corporation

May 15, 2009

Agenda

What is .NET StockTrader?

Architecture comparison between .NET Service
and Java Infrastructure

Interoperability

Benchmarks, pricing data

Capacity Planner Demo




.NET StockTrader Goals

Focus on service
-
orientation

Demonstrate the performance and scalability that can be achieved with Windows Communication
Foundation

Demonstrate open interoperability with non
-
Microsoft platforms, including over WS
-
* Advanced Web
Services protocols

Incorporates best
-
practice .NET and WCF programming techniques for high performance

Benchmark kit for testing alternative design decisions

Many configurable options

Configure different physical deployment topologies

Configure different backend databases (SQL Server, Oracle)

Configure different WCF protocols and encoding standards

Configure different transaction models (ADO.NET, System.Transactions)

More

Learning sample application

Building service
-
oriented applications with WCF

Advanced WCF programming techniques

Proper n
-
tier design with clean separation of UI, business logic and DB access

Re
-
usable code blocks

Includes separate configuration service

Use of SQL Server backend repository for configuration data

Allows for management of configuration data across distributed services

Load balancing, failover, configuration synchronization across load balanced nodes

Can be implemented in any application/service


Key Components of Sample

Install Goal: About 5 minutes to fully working composite application

.NET StockTrader Composite Web Application

.NET StockTrader Business Services

.NET StockTrader Order Processing Service

.NET StockTrader Smart Client (WPF)

Configuration Service 2.0 libraries/test harness samples

.NET forms
-
based data loaders

SQL Server

Oracle

DB2

Capacity Planner Benchmark Tool

Includes .NET and Java implementations of additional WSTest benchmark workload

Windows XP/SP2, Windows Vista, Windows Server 2003, Windows Server 2008

Extensive Documentation and step
-
by
-
step tutorials

WebSphere .Trade6 Application

Standard Web Browser

Service Tier
creates/transforms Java
“Model” objects representing
database information; these are
passed between middle
-
tier services
and Servlets/UI layer

JSPs + Java Servlets

Trade6.1 Middle Tier Service

Operations

Java Stateless Session Bean

Trade6 Data Access Layer 1:


“EJB” Mode: IBM Recommended Best
-
Practice


EJB Entity Beans with

Container
-
Managed Persistence 2.0

Trade6 Data Access Layer 2:


“Direct” Mode


Direct JDBC Queries in a Java Class, no
CMP Entity Beans

Web Service Interface

Direct Activation

DB2 Trade

Database

Oracle Trade

Database

IBM WebSphere
Trade
Logical
Design

AccountDataBean


Class


MarketSummaryDataBean

Class


QuoteDataBean


Class


OrderDataBean


Class


HoldingDataBean

Class


AccountProfileDataBean


Class


Core Model Classes

Exposed via Web
Services

User Interface

Middle Tier Business
Services

Data Access


Trade

Database

(SQL Server 2005,

Oracle 10G)

Service Model Classes

Account
Table

Account
Profile
Table

Orders
Table

Holdings
Table

Quote
Table

Account Profile
Class


Market

Summary Class


Quote


Class


Orders

Class


Holdings

Class


Account

Class


Data Access Layer (DAL)




Market Summary
Class

Customer Class

Orders Class


Middle
-
Tier Business Services Layer (BSL)









Core StockTrader

Services Class



Business Transactions



Order Processing

Service Class




Web Application Layer (UI)





ASP.NET
Web Forms

ASP.NET
Web Forms

ASP.NET
Web Forms

ASP.NET
Web Forms


Service

Client Class


UI / Account
Profile


UI / Order

Class


UI / Total
Holdings

UI /

Account



UI /

Holding

UI / Market

Summary

UI /

Quote

UI / Holdings
Sorted,

Subtotaled

Transformed For Display

Core Model Classes

Exposed via Web
Services

.NET StockTrader Logical Design

Microsoft .NET 3.5

IBM WebSphere Java EE


DB2 V9.5


Oracle 11G




ADO.NET




C# Middle Tier
Components



SQL Server 2005


Oracle 11G

.NET StockTrader Web Application








ASP.NET

2.0



Web Service Client



Web Service Interface


IBM Trade 6.1 Web Application







Java Server
Pages



Web Service Client



JDBC




Enterprise Java

Beans




Web Service Interface



Microsoft .NET 3.5

IBM WebSphere Java EE


DB2 V9.5


Oracle 11G




ADO.NET




C# Middle Tier
Components



SQL Server 2005


Oracle 11G



Web Service Interface




JDBC




Enterprise Java

Beans




Web Service Interface



.NET StockTrader Smart Client



Windows Presentation Foundation



Web Service Client

.
Microsoft .NET 3.5

IBM WebSphere Java EE


DB2 V9.5


Oracle 11G




ADO.NET




C# Middle Tier
Components



SQL Server 2005


Oracle 11G




Web Service Interface




JDBC




Enterprise Java

Beans




Web Service Interface



PHP Web Application


Apache Axis2/C


Web Service Client

WSO2 Web Services Framework for PHP

http://wso2.org/interop/stocktrader
MS SQL Server 2005

Other RDBMs


Windows Communication Foundation

Using WS
-
* Advanced Web Services

For Message
-
level Security



PHP Data
Access




WSO2 Web Services
Framework for PHP




WS
-
* Interface





JDBC Data
Access




WSO2 Web Services
Application Server




ADO.NET
Data Access




.NET C# WCF
Service


WSO2 Services:

http://
wso2.org/interop/stocktrader




WS
-
* Interface





WS
-
* Interface



Benchmark Overview

Platforms Compared

IBM Power 570 and AIX running IBM WebSphere 7

Hewlett Packard BladeSystem and Microsoft Windows Server 2008
running IBM WebSphere 7

Hewlett Packard BladeSystem and Microsoft Windows Server 2008
running Microsoft .NET

Middle
-
Tier Workloads Compared

IBM Trade Web Application Benchmark

IBM Trade Web Services Benchmark

Sun Microsystems WSTest Benchmark

Metrics

Performance measured in peak throughput achieved

Cost of Platforms as tested

Price
-
performance ratios ($ cost per TPS)




Testing Details

All source code published/freely downloadable

Full disclosure benchmark report

Test methodology

Tuning details

Pricing details

Capacity Planner Tool

Turnkey tool customers can use to compare different
platforms on their own

Provides performance and price
-
performance metrics

All available
at
http://msdn.microsoft.com/stocktrader


The Tests

Trade Web Application Benchmark

Based on IBM’s Trade benchmark application for WebSphere

Migrated to Microsoft .NET

Tests overall performance of a data
-
driven, transaction
-
oriented Web
application

Trade Middle Tier Web Services Benchmark

Based on IBM’s Trade benchmark application for WebSphere

Migrated to Microsoft .NET

Tests middle
-
tier Web Service performance comparing WebSphere
7/JAX
-
WS to Microsoft .NET/Windows Communication Foundation
(WCF)

WSTest Web Services Benchmark

Based on Sun Microsystems
-
defined WSTest benchmark

Tests middle
-
tier Web Services isolating Web Service and XML
serialization performance (JAX
-
WS vs. WCF)

Overview Of Results

IBM Power 570 with
WebSphere 7 and
AIX 5.3

Hewlett Packard
BladeSystem C7000
with WebSphere 7
and Windows Server
2008

Hewlett Packard
BladeSystem C7000
with Microsoft .NET
and Windows
Server 2008

Total Hardware +
Operating System
Costs


$215,728.08


$50,161.00


$50,161.00

Middle Tier
Application Server
Licensing Costs


$44,400.00


$37,000.00


$0.00

Total Middle Tier
System Cost as Tested


$260,128.08


$87,161.00


$50,161.00

Trade Web Application
Benchmark Sustained
Peak TPS


8,016 transactions per
second


11,004 transactions per
second


12,576 transactions
per second

Trade Middle Tier
Web Service
Benchmark Sustained
Peak TPS


10,571 transactions per
second


14,468 transactions per
second


22,262 transactions
per second

WSTest
EchoList

Test
Sustained Peak TPS


10,536 transactions per
second


15,973 transactions per
second


22,291 transactions
per second

Trade Web Application Benchmark

IBM Trade for WebSphere 7

Java Server Pages (JSPs)

Java Servlets

Direct JDBC access to IBM DB2 9.5

Microsoft .NET StockTrader

ASP.NET

Web Forms

Direct ADO.NET access to Microsoft SQL Server 2008

Middle
-
tier application servers tested to ~100% CPU
utilization in all cases

Accurately measures IBM WebSphere 7 and Microsoft .NET
server performance with no artificial or external bottlenecks

Trade Web Application Benchmark Test Bed

Trade Web Application Benchmark Performance

Trade Web Application Benchmark Price
-
Performance

Discussion Points

Microsoft .NET vs. IBM WebSphere 7

HP BladeSystem with .NET/Windows Server 2008
57% better
throughput

than IBM Power 570/WebSphere 7

Yet WebSphere 7/Power 570 is
over 5 times more expensive

than
HP/.NET/Windows Server 2008 as tested

IBM WebSphere 7 on Power6/AIX vs. IBM WebSphere 7 on
Windows Server 2008

HP BladeSystem with WebSphere 7/Windows Server 2008
37% better
throughput

than WebSphere 7/IBM Power 570

Yet WebSphere 7/Power 570 is
over 3 times more expensive

than
HP/WebSphere 7/Windows Server 2008 as tested

Trade Middle Tier Web Services Benchmark

IBM Trade for WebSphere 7

Trade Business Services exposed via JAX
-
WS

Backing business logic

Direct JDBC access to IBM DB2 9.5

Microsoft .NET StockTrader

Trade Business Services exposed via .NET/WCF

Backing business logic

Direct ADO.NET access to Microsoft SQL Server 2008

Middle
-
tier application servers tested to ~100% CPU
utilization in all cases

Accurately measures IBM WebSphere 7 and Microsoft .NET
server performance with no artificial or external bottlenecks

Trade Middle Tier Web Services Benchmark Test Bed

Trade Middle Tier Web Services Benchmark Performance

Discussion Points

Microsoft .NET vs. IBM WebSphere 7

HP BladeSystem with .NET/Windows Server 2008 by
111
% better
throughput

than IBM Power 570/WebSphere 7

Yet WebSphere 7/Power 570 is
over 5 times more expensive

than
HP/.NET/Windows Server 2008 as tested

IBM WebSphere 7 on Power6/AIX vs. IBM WebSphere 7 on
Windows Server 2008

HP BladeSystem with WebSphere 7/Windows Server 2008
37% better
throughput

than WebSphere 7/IBM Power 570

Yet WebSphere 7/Power 570 is
over 3 times more expensive

than
HP/WebSphere 7/Windows Server 2008 as tested

WSTest Web Services Benchmark

Benchmark originally created by Sun Microsystems

Isolates Web Service performance

No business logic

No data access

Measures SOAP network stack performance and XML serialization
performance

WSTest for WebSphere 7

Web Services based on JAX
-
WS

WSTest for Microsoft .NET

Web Services based on .NET 3.5 and WCF

Middle
-
tier application servers tested to ~100% CPU utilization
in all cases

Accurately measures IBM WebSphere 7 and Microsoft .NET server
performance with no artificial or external bottlenecks

Trade Middle Tier Web Services Benchmark Test Bed

WSTest Web Services Benchmark Performance

Discussion Points

Microsoft .NET vs. IBM WebSphere 7

HP BladeSystem with .NET/Windows Server 2008 at least
112
% better
throughput

than IBM Power 570/WebSphere 7

Yet WebSphere 7/Power 570 is
over 5 times more expensive

than
HP/.NET/Windows Server 2008 as tested

IBM WebSphere 7 on Power6/AIX vs. IBM WebSphere 7 on
Windows Server 2008

HP BladeSystem with WebSphere 7/Windows Server 2008
52% better
throughput

than WebSphere 7/IBM Power 570

Yet WebSphere 7/Power 570 is
over 3 times more expensive

than
HP/WebSphere 7/Windows Server 2008 as tested

Conclusions

Dramatic findings illustrate large potential cost savings

Migrate IBM WebSphere 7 to Windows Server 2008
from IBM Power6/RISC platforms

Save up to 2/3 of overall cost and get better performance!
(on systems as tested)

Utilize Microsoft .NET for best performance and lowest
cost of middle tier platform

Save up to 4/5
th

of overall cost and get the best
performance overall (on systems as tested)

Complete benchmark report, sources

http://msdn.microsoft.com/stocktrader

Complete an
evaluation on
CommNet

and
enter to win!

Required Slide

©
2009 Microsoft
Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademar
ks
and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the
dat
e of this presentation. Because Microsoft must respond to changing market conditions, it should
not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any informatio
n p
rovided after the date of this presentation.
MICROSOFT
MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Required Slide