194 points · by octopus · 14y ago · 67 comments
I'm apart of the core team that delivers http://www.servicestack.net (A REST, RPC, SOAP + MQ Service framework) which we've been hosting for years on Linux, initially on CentOS and we're now on a Hetzner Ubuntu vServer which worked out to be 11x cheaper than a lower speced instance on Azure!:
https://speakerdeck.com/mythz/what-is-the-servicestack?slide...
We've gotten great up-time with Linux where our last server reached 480+ days up-time before we switched hosts: http://www.servicestack.net/mythz_blog/?p=838
There are other traditional Windows/.NET companies exploring deploying on Linux/Mono since it allows them to scale at $0 licensing cost, here's a post from 7digital showing how they deploy on Nginx/FastCgiMono using Capistrano: http://blogs.7digital.com/dev/2012/09/25/atomic-mono-deploym...
NancyFx (http://nancyfx.org) and SignalR (http://signalr.net) are other great .NET frameworks with Mono CI builds and first-class Linux Support.
The administrative overhead of deploying all this stuff is incredible as are the disparate infrastructure and software models. You might be saving 11x on an Azure instance, but your ops time and staffing requirements will cost more than that. Throwing something on Azure is really cheap with respect to time and effort. If you need to scale past that or cost becomes a limitation, you might as well fish out for a Rackspace or other dedicated package.
We're at the £50k hosting budget a month mark now (1x production DC, 1x hot spare DC, 2x packed 42U racks in each) and 2 meat based products to manage it all. Not much of that cost is software licenses.
Note: I have nothing against servicestack - in fact it's rather good (we use servicestack.text)
For ref, I turned down a position at 7digital a couple of years ago as I though they were smoking crack when stuff like this was mentioned.
Going to call BS on Azure being cheaper. All of ServiceStack's live demos are deployed using simple bash scripts. There's none of these admin overhead costs, I check-in on my dev box and run a remote script to deploy straight from the Git repo. The projects are also un-touched ASP.NET or stand-alone Console hosts (which I host behind an nginx reverse proxy). I've no doubt that it would be at least 11x more expensive if I decided to host servicestack.net on Azure, even more if I decided to use SQL Server (PostgreSQL/MySQL is free to use on Linux). And I'll also miss out on cool linux utils like rsync which is how we migrated GB's of content onto the new vServer.
When it comes to the deep web i.e. corporate applications, business tools etc, it's just not seen at all. These are the things that produce a lot of value and solve a lot of problems. I'd argue they are cumulatively more valuable than the above.
EsEnt, AppFabric, IIS7 ARR, PowerShell cover your concerns above all of which are scriptable and automatable.
When you consolidate your time across the year spent on developing a backup methodology for your server, managing updates etc, monitoring, testing, where does that leave you? I know Linux inside out (I've been a professional user on and off since 1998) and I know you hit the same number of roadblocks as windows along the way.
Also your deployment model sounds odd. Do you check in your production artifacts/dlls and configuration? Do you build on your production boxes? Also your demonstration applications are tiny. A single deployment we throw out has 95Mb of release compiled DLLs across 48 assemblies...
We use NHibernate and have a test harness for MySQL already so we're not bothered about SQL pricing (anyway it's still plenty affordable as our product is valuable and pays for the licensing).
I was using rsync on Windows 2000 back in 2002 to sync press image libraries so that's a moot point really.
Azure cuts it for the ramp up phase of your product if you factor in the above. We did a proper cost analysis.
Could you elaborate on why you think this is true? It seems to me like Microsoft baseless propaganda from last decade.
I'd worry about reliability and security of any service with that kind of uptime. Security if the uptime was achieved by not applying kernel updates, or reliability if some kind of hack to update a running kernel without a reboot was used.
The latter is a reliability problem because rebooting after a major update serves a purpose other than just loading the new kernel. It also serves the purpose of showing that the update has not broken configurations or dependencies required to boot. It's a heck of a lot better to discover that an update has left your system non-bootable right after the update, rather than finding out months later when some hardware failure takes down the server and then you find it doesn't boot and you've got to go back through months of changes trying to figure it out.
...of course, the OP should enlighten us about whether this is how they did things
By the way, I have had servers running several years on the internet, without problems, one FreeBSD which topped all until some hardware maintenance was necessary.
Things may have since changed - this was back in v2.12 days - and / or other stacks (like service stack) may be more stable, but it's just easier for me to stick with Windows.
With all this said, however, I have had fun trying the MonoTouch toolkit demos. I hope to find some time to build a real iOS app (one that works with the aforementioned website, in fact). Fingers crossed things will work out better this time for me and Mono.
Now that it's open source and MVC is accepting patches, MVC3 might be more stable on Mono.
Those sub-projects appear to be unmaintained and queries about their status on the mailing list go unanswered. Without some solid info there, it unfortunately makes the open source MVC stuff rather moot.
I concluded (perhaps wrongly?) that web wasn't a priority for mono and chose another technology for that part. On the other hand, mono makes a great socket server stack, and I still use it extensively there.
Played with MonoMac on the weekend, it was super easy to get going and the bindings are nicely polished in idiomatic C# (uses same technology as used in MonoTouch). The bindings end up a close match to the official Obj-C APIs. Easy to translate Cocoa docs to C# APIs (which end up being nicer IMHO). It was also seamless to create UIs in XCode and access them in C#.
Ideally I'd expect to see more CAD/Drawing/Creation-focused apps using monomac. I actually keep wondering if rhino3d is using it since that's a .net-based application.
In case you burn to use Qt, qyoto (qt-c# bindings) is also being actively maintained (although I tend to recommend just going native for interfaces). recently wrote a post on it: http://vivekgani.com/blog/2012/09/17/setting-up-qyoto-on-osx...
Care to explain the last bit ? Because Java also lets you invoke native code (and hence platform specific) if you want to.
The main thing, though, was simply attitude. Sun's attitude was that Java was a separate platform. You write for Java. It is an inconvenient truth that any given instance of Java happens to be running on Windows, or Linux, or Mac, or whatever--don't worry about that and you just stick to the Java platform. If you wanted to have a native interface with Java computations code, you were thinking heretical thoughts. So, Java came with AWT and Swing. It would have been inconceivable for Sun to include a GUI meant just for Windows, and one meant just for Mac, and so on.
You want to do that in Mono. They are fine with that. They include a GUI interface for Mac that only works on Mac. They include a WinForms interface for developing Windows native stuff (although they do somewhat support it on non-Windows so people can use it to port Windows stuff).
The Mono developer's attitude seems to be more toward providing useful tools to programmers, so we can do what we want, rather than trying to provide a platform that we should leave our native platforms for.
To put it succinctly, if you said "I want to write a Windows program" or "I want to write a Mac program", Sun would have said "Write a Java program instead!". The Mono people say "Cool. We've got some neat tools you can use for that!".
Awesome things are coming!
I've been working with Mono for going on 8 years, I'm so glad to see that they were able to pull away from Novell.
Politics aside, the MSR people did a beautiful job designing the system and it's very saddening how it's currently misused by the mother corporation. It's good that it gets a chance to thrive beyond their suffocating grasp.
There are basically three major downsides:
1) It's another at least $399 x 2 as a single developer to use (but you can develop against it for free and only buy the license when you want to deploy). Professional licenses are more expensive than that.
2) The runtime can take a long time to load. 3-5 seconds for some apps. You can create a splash screen to mitigate this, but it's a *t experience when you do an a/b comparison on a native app and a mono app (this time is basically while it loads the runtime).
3) 3rd party library support sucks. It just doesn't really exist; if you're used to pulling nunit, ninject, shouldly, nhibernate, nsubstitute, etc. into your project, forget it. A handful of libraries have been ported to the touch and android runtimes, but most of things you'll look at either won't work or you'll have to recompile manually (to be fair there are a fair few that are easy drop ins; Dapper works like a charm for example).
That said, you get some pretty cool stuff: you can separate your core application logic, including database access into its own library and share the code between your various projects. Fix once, fix everywhere.
You can have common unit tests that you can run on a non-windows server.
It's vastly more productive (than writing two code bases in objective c and java).
You can develop without using visual studio~ <3 (some people see this as a downside; it's not to me. VS2010 is rubbish as far as I'm concerned; it crashes, freezes, loses my work all of the time. For all that I love resharper, I'll take monodevelop in a second thanks).
Overall; if you can afford it, do it.
[1]: http://stackoverflow.com/questions/8223837/using-dapper-in-m...
Porting from WP7 to iOS took a few months, mostly because MonoGame didn't have any 3D support (we added it). We have been slowly porting to Android, it's been pretty good so far, the framework makes it easy and we've had very little issues making external libraries build on MonoDroid. Xamarin's also been very responsive to our questions and issues.
If you want to see what it looks like, here's a video of what we have lined up for our next update coming out in a few days: http://www.youtube.com/watch?v=u5N_ckb-dXw
I find the project to be deeply hurt by being tied to the XNA ecosystem (the content pipeline is a mess, especially as you can't build content stuff in MonoGame itself, and Android support is atrocious--dealing with a destroyed context is insanely messed up). I'm also pretty disappointed in the lack of professional behavior--no CI, few/no automated tests, and few/no code reviews have led to some serious WTFs that sneak in that are really unsettling. There's a lack of project leadership, too, in that if you'd like to contribute there are no real designated maintainers or developers with responsibility over submodules (I've tried myself, multiple times, to no real success).
I think the best way forward for Mono and games would be a library, starting with MonoGame or not, that followed better practices and didn't try to make square pegs fit in round holes. There are a lot of areas where it makes sense for Mono to ape the .NET APIs but this doesn't seem like one of them.
How to guides:
http://www.badlogicgames.com/wordpress/?p=2602
http://www.badlogicgames.com/wordpress/?p=2450
http://www.badlogicgames.com/wordpress/?p=2454
http://www.badlogicgames.com/wordpress/?p=2457
http://www.badlogicgames.com/wordpress/?p=2459
There was also a discussion about using J2objc (http://code.google.com/p/j2objc/) in order to port it to iOS: http://www.badlogicgames.com/wordpress/?p=2593
If the project is lacking tests -gasp- that right there is an area you could have contributed.
If the project needs CI, I can tell you, it is not very hard to add. We would be happy to host that.
He achieves anywhere from 69-87% code reuse depending on the platform. They did a bit of a case study a while ago where Frank talks about it - http://blog.xamarin.com/2011/10/26/java-to-ipad-in-2-months/
I met the creators of iCircuit and TouchDraw at MonkeySpace they said it was really easy to get going and you just needed to design your library so the UI was decoupled from the main code-base (which you could effectively re-use as-is). Several of techniques of structuring your code-base was described in @gshackles talk, some of the slides are here:
https://speakerdeck.com/u/gshackles/p/cross-platform-mobile-... (SpeakerDeck seems affected by EC2's outage).
MonoGame (https://github.com/mono/MonoGame) is an implementation of XNA which allowed games like Bastion and Infinite Flight (A C# Flight Simulator) to run cross-platform.
I really hope 3.0 addresses missing SqlDbTypes like Date, Structured etc.
I know this isn't Mono, of which I've been a big fan, and it's my first go-to for building certain applications cross platform, but have to admit that Node.js seems to be a better workflow, when you want to get a small task done. No spooling up a new project in VS, with build efforts. It just works.
http://download.mono-project.com/sources/libgdiplus/
Would be nice to have it there :)
https://github.com/mono/libgdiplus/commit/3ddf7ff28e0876dc39...