Presentation is loading. Please wait.

Presentation is loading. Please wait.

.NET vs J2EE An Architectural and Performance Comparison of.NET and J2EE Applications Greg Leake, Microsoft Corporation Vertigo Software, Inc. James Duff.

Similar presentations


Presentation on theme: ".NET vs J2EE An Architectural and Performance Comparison of.NET and J2EE Applications Greg Leake, Microsoft Corporation Vertigo Software, Inc. James Duff."— Presentation transcript:

1

2 .NET vs J2EE An Architectural and Performance Comparison of.NET and J2EE Applications Greg Leake, Microsoft Corporation Vertigo Software, Inc. James Duff Mike Hanley Scott Stanfield

3 Agenda Architecture discussion Architecture discussion  WinDNA,.NET and J2EE Nile performance comparison Nile performance comparison  WinDNA,.NET and J2EE Demo: Performance walkthrough and tuning scenarios Demo: Performance walkthrough and tuning scenarios  SQL Server: WinDNA .NET  Database tuning  Middle tier tuning and output caching  Oracle:.NET to Oracle using OleDB vs. new MS.NET Oracle provider Pet Store re-visited Pet Store re-visited .NET Pet Shop vs. latest Oracle Java Pet Store

4 Architecture: DNA vs.NET.NET Presentation BusinessLogic Data CLR.NET Assembly ADO.NET (Can use COM+ Services; e.g. transactions) Windows DNA Web Forms Server Controls Code-Behind ASP.NET IIS SQL Server Oracle DB/2, etc. COM ASP and IIS Inline ASP VBScript/JScript VB/VC ADO (Can use COM+ Services; e.g. transactions) SQL Server Oracle DB/2, etc.

5 Presentation BusinessLogic Data J2EE CLR.NET Assembly ADO.NET (Can use COM+ Services; e.g. transactions) Web Forms Server Controls Code-Behind ASP.NET IIS JavaBeans EJBs JSP Servlets Runs on most major application/web servers Support for most databases via Type 4 drivers J2SE/EE JDBC.NET SQL Server Oracle DB/2, etc. SQL Server Oracle DB/2, etc. Architecture: J2EE vs.NET

6 Java Design Patterns Model View Controller (MVC) design model Model View Controller (MVC) design model  Separates the data representation from presentation (separate a Model from its View)  Separates the application behavior from the data representation (separate a Controller from the Model) ClientView Model Web Browser search.html JavaBeans J2EE MVC Design search.jsp Controller find.jsp actions.jsp Servlets Entity EJB Session EJB Request Response Forward Requests

7 .NET Design Patterns.NET Design Techniques still apply –.NET makes them easier Techniques still apply –.NET makes them easier ClientWeb FormsCode-Behind Web Browser Request Response search.aspx Server-Side Events Server Controls Custom User Controls.NET Assemblies Enterprise Services COM+

8 Nile Application Server Benchmark

9 The Nile Application Server Benchmark Created by Doculabs and has been used extensively by Ziff Davis Created by Doculabs and has been used extensively by Ziff Davis End-to-end ecommerce application End-to-end ecommerce application Application includes Application includes  90% Data-driven pages  Use of scripting and components  Ad-hoc database searching and browsing  Database transactions  User authentication/login  Realistic dataset  Session state (shopping cart)  Optionally can highlight dynamic page output caching

10 The Nile Tests Implementations tested Implementations tested  MS.NET implemented with C#/ASP.NET  ASP using VB6 COM+ components  ISAPI/ATL Server using VC++ 7.00  Two leading J2EE App Servers using JSPs  Two leading J2EE App Servers using EJBs Tested in large-scale performance lab Tested in large-scale performance lab All materials and source code published on Web All materials and source code published on Web .NET vs. WebSphere benchmark kit  Customers can replicate/test for themselves

11 Hardware Configuration App Server: Compaq 8500 2, 4 and 8 550 MHz Pentium III DB Server: Compaq 8500 8 x 550 MHz Pentium III Network: Cisco gigabit ethernet Clients and load test tool: 100 clients running Benchmark Factory 2.6

12 The Nile J2EE Results: Peak Throughput 1000 1250 750 500 8 CPUs Pages Served Per Second 4 CPUs 2 CPUs 1500 1750 J2EE App Server A JSP/Linux 7.2 537 957 1362 2-tier 668 890 930 J2EE App Server B EJB/Linux 7.2 3-tier VB-COM+W2K 478 874 1260 3-tier J2EE App Server B JSP/Linux 7.2 834 1280 1395 2-tier 489 905 1289ASP/W2K 2-tier 400 649 886 J2EE App Server A EJB/Linux 7.2 3-tier 400

13 The Nile J2EE Results: Peak Throughput 2500 3000 2000 1500 8 CPUs Pages Served Per Second 4 CPUs 2 CPUs 3500 4000 J2EE App Server A EJB/Linux 7.2 668 890 930 J2EE App Server B EJB/Linux 7.2 3-tier VB-COM+W2K 478 874 1260 3-tier 649 886 3-tier 400 C++ ATL Server W2K 1633 2867 4004 3-tier ASP.NET C# W2K 1399 2713 3999 3-tier 1000 500 4500

14 Nile.NET vs. Websphere 4.0 Benchmark Kit Http://www.gotdotnet.com/team/compare Http://www.gotdotnet.com/team/compare Http://www.gotdotnet.com/team/compare Benchmark kit allows customers to benchmark.NET and WebSphere 4.0 directly Benchmark kit allows customers to benchmark.NET and WebSphere 4.0 directly Based on Nile application Based on Nile application  Customers can get full source, tuning guidelines  Customers can fully compare implementations for.NET, ASP/COM+, ISAPI, JSP, and EJB

15 Nile Bookstore demo demo

16 Nile Load Tests 1. Nile VB/COM+/ASP 2. Nile C# (Managed SQL Server Provider) 3. Database tuning for Nile C# (Index) 4. Database tuning for Nile VB/COM+/ASP 5. Output Caching 6. Nile C# Oracle (OLE DB Provider) 7. Nile C# Oracle (Managed Oracle Provider)

17 Performance Results Test Pages / Second Nile VB/COM+/ASP ( Server / Library) 100 / 190 Nile C# (Managed SQL Server Provider) 250 Database tuning for Nile C# 414 Database tuning for Nile VB/COM+/ASP 200 Output Caching 500+ Nile C# Oracle (OLE DB Provider) 195 Nile C# Oracle (Managed Oracle Provider Beta) 280

18 Implementing Sun’s J2EE Pet Store in Microsoft.NET

19 What is the Java Pet Store? Java Pet Store is Sun’s primary Blueprint application for J2EE Java Pet Store is Sun’s primary Blueprint application for J2EE  Source code: http://java.sun.com/j2ee/blueprints http://java.sun.com/j2ee/blueprints Illustrates J2EE best coding practices for enterprise applications Illustrates J2EE best coding practices for enterprise applications Ships as sample application in Ships as sample application in  IBM WebSphere 4.0  Oracle Application Server 9i  Sun iPlanet  BEA WebLogic Highlighted extensively at JavaOne 2001 as the primary J2EE showcase application Highlighted extensively at JavaOne 2001 as the primary J2EE showcase application

20 According to SUN Java Pet Store is…. “A full-fledged online store illustrating how to best leverage J2EE technologies.” “…a sample application which illustrates basic usage of J2EE technology, and demonstrates current best practices in system design.“

21 What is the.NET Pet Shop? An implementation of Java Pet Store using a.NET best-practice architecture An implementation of Java Pet Store using a.NET best-practice architecture  Source code: http://www.gotdotnet.com/team/compare  Implements the exact same functionality (v 1.1.2)  Fully factored 3-tier logical design using C#  Illustrates best coding practices for.NET Framework Application extension to illustrate targeting of mobile devices with.NET Application extension to illustrate targeting of mobile devices with.NET Application extension to illustrate creating and consuming Web Services with.NET Application extension to illustrate creating and consuming Web Services with.NET

22 15000 7500 10000 5000 2500 17500 12500 Porting Java Pet Store to.NET Java Pet Store Lines of Code Required 3,484.NET Pet Shop 14,273 User Interface 1,881 5,891 Total Lines of Code Middle Tier 863 5,404 Data Tier 684 412 Config 56 2,566

23 What About Performance and Scalability? Oracle’s 9i Application Server Performance Challenge Published using Java Pet Store Oracle’s 9i Application Server Performance Challenge Published using Java Pet Store Oracle-published data and benchmark kit allowed us to replicate their tests with.NET Pet Shop Oracle-published data and benchmark kit allowed us to replicate their tests with.NET Pet Shop Ran tests on similar hardware Ran tests on similar hardware  100 mbit network  2 CPU Application Server (J2EE vs. MS.NET)  4 CPU Database Server (Oracle 9i vs. SQL Server 2000) Tested Oracle-published load levels using same think time and Oracle’s own test scripts Tested Oracle-published load levels using same think time and Oracle’s own test scripts Tested.NET version at even higher load levels than Oracle’s J2EE tests Tested.NET version at even higher load levels than Oracle’s J2EE tests

24 .NET vs. J2EE Performance Metrics.NET Pet Shop is 28 times faster than Oracle’s J2EE version with caching.NET Pet Shop is 15 times faster than Oracle’s J2EE version with no caching.NET Supports 8 times as many concurrent users as Oracle’s J2EE Version (at 1-second page response level)

25 New Oracle Data Users Oracle 9iAS July 2001 Sun Original Java Pet Store 1.1.2 (seconds) Oracle 9iAS March 2002 “New Optimized” Java Pet Store (seconds).NET Pet Shop 1.5 December 2001 100% functionally equivalent to Java Pet Store 1.1.2 (seconds) 100.231 Not tested.032 200.308.034 250.348.035 300.361.038 350.451.048 400.538.052 450.952.063 1000.037.111 1500.038 2000.042.231 2500.046.479 3000.050.900 3500.057 4000.069 4500.097 5000.302

26 New Oracle Data Oracle new optimized Java Pet Store 2500% faster than original Sun Java Pet Store Oracle new optimized Java Pet Store 2500% faster than original Sun Java Pet Store Oracle reports it is now 22 times faster than.NET! Oracle reports it is now 22 times faster than.NET! Is this possible? Is this possible?

27 The Answer: No New Oracle version is a faster implementation than original Java PetStore….. New Oracle version is a faster implementation than original Java PetStore….. BUT IT’S NOT THAT FAST: Fact: Oracle ran test scripts with no error checking Fact: Oracle ran test scripts with no error checking  Cannot distinguish between Http error (e.g. Error 404) and valid page  Issue found by and verified by Mercury Interactive Suspect: Oracle equated “response time” to time to first byte delivered to browser vs. time to last byte (completion of page/transaction time) Suspect: Oracle equated “response time” to time to first byte delivered to browser vs. time to last byte (completion of page/transaction time)  Based on extensive internal testing over past 2 weeks  First byte delivered to browser before server-side processing complete (top static banner vs. database-driven portions of pages)  Time to first byte is not true transaction time, although it is sometimes called “response time” depending on load test tool.NET results based on “time to last byte” and completion of entire page.NET results based on “time to last byte” and completion of entire page  Full error checking on all.NET tests runs

28 But How to Prove? 1. We will show you here in a live load test bakeoff 2. We are calling for an independent audit of the results, with both solutions tested by a third party in neutral lab with same load test software  We will fully participate in this audit  Hopefully Oracle will participate 3. Best of all, you can easily test both apps for yourself, all source code available as well as test scripts. We absolutely encourage you to do your own testing and decide for yourself!

29 .NET PetShop demo demo

30 .NET PetShop Load Tests 1. Oracle Java Pet Store 2..NET PetShop

31 Performance Results: Throughput User Load (no think time).NET Pet Shop 1.5 Pages/sec Oracle New Java Pet Store Pages/sec 257852 5011351 10012951 20014344 500149errors

32 User Load (no think time).NET Pet Shop 1.5 Response Time (seconds) Oracle New Java Pet Store Response Time (seconds) 25.14.48 50.391.6 100.902.71 2001.846.72 5004.88errors Performance Results: Transaction times (time to last byte)

33 Summary.NET Web applications significantly outperform WinDNA apps.NET Web applications significantly outperform WinDNA apps.NET outperforms IBM WebSphere 4.0 and WebLogic 6.1 on Nile benchmark by factor of 4.NET outperforms IBM WebSphere 4.0 and WebLogic 6.1 on Nile benchmark by factor of 4 Testing and tuning under load is critical Testing and tuning under load is critical PetShop: Test it for yourself: PetShop: Test it for yourself: http://www.gotdotnet.com/team/compare/petshop.aspx http://otn.oracle.com http://www.gotdotnet.com/team/compare/petshop.aspx http://otn.oracle.com All materials on Web, customers can run their own tests All materials on Web, customers can run their own tests  http://www.gotdotnet.com/team/compare

34 © 2002 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt ".NET vs J2EE An Architectural and Performance Comparison of.NET and J2EE Applications Greg Leake, Microsoft Corporation Vertigo Software, Inc. James Duff."

Similar presentations


Ads by Google