BT

Is Mono Ready for Production?

| by Abel Avram Follow 9 Followers on Oct 23, 2008. Estimated reading time: 2 minutes |

 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.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

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.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT