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.

Is Mono Ready for Production?

Posted by Abel Avram on Oct 23, 2008

Sections
Architecture & Design,
Development,
Operations & Infrastructure
Topics
.NET ,
Open Source
Tags
Mono

 A question was asked on Stack Overflow having the title "Is Mono ready for prime time?" Several users responded including Miguel de Icaza, founder of the Mono project. The responses are helpful to evaluate the opportunity to deploy an application on Mono.

Miguel's response suggested two scenarios:

a) if you are porting an existing application and wondering if Mono is good enough for this task;

b) you are starting to write some new code, and you want to know if Mono is mature enough.

For the first scenario, Miguel suggests running the Mono Migration Analyzer tool, known as Moma, and proceed to production if Moma shows none or few application issues. Miguel offers some Moma analysis statistics:

According to our Moma statistics based on user submissions (this is from memory) about 50% of the applications work out of the box, about 25% require about a week worth of work (refactoring, adapting) another 15% require a serious commitment to redo chunks of your code, and the rest is just not worth bothering porting since they are so incredibly tied to Win32. At that point, either you start from zero, or a business decision will drive the effort to make your code portable, but we are talking months worth of work (at least from the reports we have).

Things look much simpler if starting a new project, according to Miguel:

If you are starting from scratch, the situation is a lot simpler, because you will only be using the APIs that are present in Mono. As long as you stay with the supported stack (which is pretty much .NET 2.0, plus all the core upgrades in 3.5 including LINQ and System.Core, plus any of the Mono cross-platform APIs) you will be fine.

Other users expressed their opinion on the questions asked. Jon Galloway said:

It's pretty good for .NET 2.0 features. Many .NET 3.x features are in process now but aren't complete.

I recently ran MoMA on SubSonic and found only one issue - a weird use of Nullable types. That's a big codebase, so the coverage there was pretty impressive.

At the language level, the Mono compiler is fully compliant with the C# 3.0 language specification.

Jonathan Holland had his take:

On the desktop side, Mono works great if you commit to using GTK#. The Windows.Forms implementation is still a little buggy (For example, TrayIcon's don't work) but it has come a long way. Besides, GTK# is a better toolkit than windows forms as it is.

On the web side, Mono has implemented enough of ASP.NET to run most sites perfectly. The difficulty here is finding a host that has mod_mono installed on apache, or doing it yourself if you have shell access to your host.

Daniel, another Stack Overflow user, pointed out:

If you want to use WPF, you are out of luck. Mono currently has no plans to implement it. http://www.mono-project.com/WPF

It looks like Mono is ready for production, at least for new applications or those which pass the Moma compatibility test.

Mono not ready for production - garabage collection limitations by Alex Black Posted
  1. Back to top

    Mono not ready for production - garabage collection limitations

    by Alex Black

    For the type of application we're building Mono unfortunately doesn't seem ready for production. We were impressed with it overall, and impressed with its performance both on Windows and on EC2 machines, however, our program crashed consistenly with garbage collection errors on both Windows and linux.

    The error message is: "fatal errors in GC: too many heap sections", here is a link to someone else experiencing the problem in a slightly different way:

    bugzilla.novell.com/show_bug.cgi?id=435906

    The first piece of code we ran in Mono was a simple programming challenge we'd developed... The code loads about 10mb data into some data structures (e.g. HashSets), then runs 10 queries against the data. We ran the queries 100 times in order to time them and get an average.

    The code crashed around the 55th query on Windows. On linux it worked, but as soon as we moved to a bigger data set, it would crash too.

    This code is very simple, e.g. put some data into HashSets and then query those HashSets etc, all native c#, nothing unsafe, no API calls. On the Microsoft CLR it never crashes, and runs on huge data sets 1000s times just fine.

    One of our guys emailed Miguel and included the code that caused the problem, no response yet. :(

    It also seems like many other people have encountered this problem without solution - one solution has been suggested to recompile Mono with different GC settings but that just appears to increase the threshold before which it crashes.

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.