InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Mainsoft: Running .NET on the JVM While Maintaining Performance

Posted by Ryan Slobojan on Jul 19, 2007

Sections
Development,
Architecture & Design
Topics
Java ,
.NET ,
Java plus .NET Integration ,
Stories & Case Studies
Tags
migration ,
Mainsoft ,
Java EE

Mainsoft recently released version 2.0 of Mainsoft for Java EE (formerly known as Visual Mainwin), and also released an intriguing whitepaper which showed that a .NET-based application which was cross-compiled to run on Java EE using Mainsoft for Java EE actually performed better in several areas than the original .NET-based application did. InfoQ spoke with Mainsoft CEO Yaacov Cohen to learn more.

First, Cohen was asked to describe how Mainsoft for Java EE worked:

The cross-compilation engine cross compiles the Microsoft Intermediate Language (MSIL) code generated by the .NET Framework compilers into Java Byte code. Our Java-based implementation of the .NET Framework runtime supports classes on which the application will execute. Finally, our Visual Studio extension enables developers to code, compile, deploy and debug Web and server applications on the Java Enterprise Edition platform.
Since the code is cross-compiled at the bytecode level, there is no source conversion - this means that Visual Studio.Net remains the sole development environment for the ported application. InfoQ also learned that Mainsoft has reimplemented a large portion of the .Net Framework in Java, including ASP.Net, ADO.Net, and the Web Services API - however, because Mainsoft for Java EE has a focus on web and server applications, components such as Windows Forms have not been implemented.

InfoQ looked at a Mainsoft whitepaper which presented a case study of one company's use of Mainsoft for Java EE to port an existing .Net-based Windows application over to a Java EE-based Linux application, and discovered the following things:

  • The ported Java EE application worked on IBM WebSphere, BEA WebLogic and Apache Tomcat
  • The ported Java EE application was tested on Windows, Linux, and AIX
  • On identical hardware, the ported Java EE application (running on WebSphere):
    • Handled 8% more requests per second (RPS) than the original .Net application
    • Had better CPU scalability, with almost linear increases in RPS
    • Had at least 4% faster response time across all tested user loads
    • Handled at least 5% more RPS under heavy load

On why Java was faster than .NET, Cohen was careful to point out that the whitepaper intended to show that server applications could be ported without a performance penalty:

We deliver equivalent performance by tuning our open source .NET implementation to fit WebSphere's architectural strengths, similar to how Microsoft's .NET framework leverages the strengths of IIS and Windows. For the performance study, we configured the appropriate garbage collection algorithm, page size and heap size on each OS and hardware configuration tested. We also identified the need to optimize the IBM Java Virtual Machine on some scenarios that were exposed with our libraries. These changes are now widely available in the WebSphere Application Server 6.1 release.

With the number of companies that have recently open-sourced their products (such as Sun's JDK, Terracotta's DSO, and Adobe's Flex SDK), InfoQ asked Cohen if Mainsoft was going to follow suit. He replied:

Cross-platform .NET is an ambitious project, and next to Novell, Mainsoft is the largest contributor to the Mono open source project. We share all our .NET Framework assemblies with Mono, with the exception of the core library mscorlib.jar, which is Mainsoft's proprietary Java EE implementation of the .NET core class library.

Mainsoft also offers a freely available developer edition, called Grasshopper, which can be used for deployments on Tomcat and single CPU configurations.
Terracotta for .Net by ARI ZILKA Posted
Re: Terracotta for .Net by Ilya Kharmatsky Posted
  1. Back to top

    Terracotta for .Net

    by ARI ZILKA

    Would be interesting to see if a .NET object can be shared across instances using Terracotta beneath.

  2. Back to top

    Re: Terracotta for .Net

    by Ilya Kharmatsky

    Since ".Net object" become in Mainsoft for J2EE a regular "java object" - it should not be a problem...

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.