StockTrader - .NET 3.0 vs. Websphere 6.1

如果还记得2001年11月Microsoft .NET Pet Shop vs. Sun’s J2EE PetShop的例子和对比报表,今天微软又发布了一个示范案例.NET 3.0 的StockTrader应用,它相对应于IBM Trade 6.1示范应用,提供给.NET的开发人员示范和学习。

IBM Trade 6.1也是WebSphere 6.1性能测试的示范程序,用于证明WebSphere的性能,具体的信息和代码IBM也是公开的,你可以到IBM的网站下载

用.NET实现的StockTrader应用主要使用了ADO.NET 2.0, ASP.NET 2.0, WCF 和MSMQ 3.5/4.0等技术,而这次测试和性能评测集中在三个方面:

1. Web Services的性能

2. 消息处理的底层基础架构的性能

3. 数据访问和存取的速度

另外也从软硬件成本、代码行数、单位事务花费,配置文件和配置复杂性等进行了评估和对比。

这次测试的一个更重要的目的也验证了一种不同平台的互交互性,虽然双方平台不同,但因为都遵循目前开放和流行的Web Services协议,所以IBM Trade 6.1 Jsp前端也可以调用.NET StockTrader的中间层,同样.NET ASP.NET的前端也可以调用IBM Trade 6.1后端的EJB中间层。其操作只需要修改配置文件,而不用修改代码。

所以从这个角度上来说,.NET StockTrader没有使用所有的.NET 3.0的新技术,比如WF,WPF,AJAX….等技术。

有关事务的花费方面的对比,也是惊人的,每TPS的花费($/Cost per TPS )对比:

  .NET WebSphere
Persistent Message Queue $ 6.53 $ 134.69
Non-Persistent Message Queue $ 5.24 $ 90.78

 

下面是有关Web Service的性能对比结论(报告的21页)

1. Both the ASMX and WCF SOAP/HTTP configurations are significantly faster than IBM WebSphere 6.1 for hosting Web Services. .NET WCF hosted in IIS offers 46% better throughput than the JDBC WebSphere configuration in this test; and 124% better throughput than the EJB implementation.

2. Self-hosting WCF services can lead to performance advantages over hosting .NET Web Services in IIS—even when operating over an HTTP-XML basicHttpBinding. Self hosted WCF HTTP Web Services offer 56% better throughout than the ASMX equivalent services hosted in IIS for this test. They offer 45% better throughput than the equivalent WCF IIS-hosted service operating over Http-XML.

3. Self hosted Web Services using WCF significantly outperform IBM WebSphere Web Services. The self-hosted WCF services operating over Http-XML (full SOAP compliance) offer 113% better throughput than the fastest WebSphere Web Service results (JDBC data access). They offer 225% better throughout than the WebSphere Web Services using EJB entity bean database access.

4. The self-hosted WCF services can also support, simultaneously, the netTcp WCF binding, with binary encoding. This can lead to significant performance boosts for remote calls. The WCF netTcpBinding replaces .NET Binary Remoting (used with .NET 1.1 and 2.0) as the preferred way for remote calls between .NET clients and remote .NET services. Supporting both HTTP/XML and TCP/Binary requires no extra development, as WCF unifies the programming model for HTTP-based Web Services and .NET Binary-remoted components, and service hosts will listen simultaneously on all configured endpoints to support any different type of client on any platform.

5. The Tcp-Binary binding (netTcpBinding) between the ASP.NET clients and the Web Service host offer 81% better throughput than the WCF basicHttpBinding used in the same self-host .NET executable. The Tcp-Binary remote mode offers 284% better throughput than the fastest WebSphere Web Service configuration (JDBC data access).

 

相关下载:

.NET StockTrader Sample Application(SourceCode) –(直接下载32M)

Comparing .NET 3.0 and IBM WebSphere 6.1 Application Server Performance

.NET StockTrader Sample Application Forum .

.NET StockTrader Sample Application MSDN Homepage

Comments