Friday, May 25, 2012

Will Microsoft dive into Open Source Ecosystem?


Microsoft has come a long way in its acceptance of open source. And its motto doesn’t seem to be (this time) to embrace and extinguish.

The Microsoft watching will go on. A few illustrious members of the worldwide Microsoft community to share their insights via guest posts on a variety of topics — from Windows Phone, to Hyper-V. Today’s entry is all about Microsoft and open source and is authored by Richard Turner.

Microsoft is increasingly warming to open source. Not only is the company increasingly publishing open-source projects of its own, it’s also developing major parts of its web/cloud infrastructure in the open and is also supporting a variety of external open-source projects. This is great news, but it’s taken a long time and a considerable amount of hard work and damage-repair to make it happen.

Microsoft’s stance on open source began to thaw during the 2000’s as the company grew-up and learned more about open source and how it can significantly benefit all of us.

It would be constructive to share examples that illustrate that Microsoft (and its ecosystem) are serious about mending fences, supporting external open-source projects and opening up development teams and projects.

Here’s the top 10 list:
1. Encouraging the Open Source Ecosystem
The Windows and .NET development community is exploding with home-grown .NET open-source projects and initiatives. Everything from IoC/DI containers such as Ninject, AutoFac, Castle Windsor and StructureMap to testing tools like nUnit. From NOSQL document stores like (the utterly awesome) RavenDB to powerful Content Management Systems (CMS) like Orchard and Umbraco. And let’s not forget IronPython, IronRuby and F# that Microsoft nurtured before transitioning to community ownership in 2010.

These are just a tiny subset of the amazing range of open-source projects built specifically for (or supporting) the .NET/Windows platform.

2. Wheel-Reinventing Reduced
One of the biggest criticisms many have had of Microsoft is its insistence in building its own version of technologies that already exist in the open-source world.

It came as a pleasant surprise, therefore, when Microsoft shipped ASP.NET MVC 3.0 with jQuery and Modernizr included. This was a big step forward (and was the result of a HUGE amount of effort internally) and marked one of the first times Microsoft shipped a major product containing open-source code. In ASP.NET 4.0, Microsoft is continuing the adoption of open-source projects by including jQuery Mobile & JSON.NET.

3. Facilitating With NuGet Package Manager
Almost every active open-source development ecosystem has seen huge growth in the number of open-source utility libraries made available by “package managers” such as Ruby’s Gems, node’s npm, etc. These package managers allow developers to simply type, for example, “npm install express” and the express library will be downloaded and installed into the user’s current project/system.

A package management tool was missing from the Windows/.NET developer’s toolbox until a skunk-works team at Microsoft created NuGet – a package manager for .NET developers. NuGet and its accompanying site, gallery and package feed were adopted by the Outercurve Foundation in October 2010 and is now maintained by the NuGet team and the community. The NuGet gallery currently contains almost 6000 packages including jQuery, Modernizr, JSON.NET, ELMAH, log4net, Ninject, and the vast majority of the libraries most useful to .NET developers.

While many other open-source communities would scoff at “only 6000” packages being available, it’s important to note that the project count is increasing rapidly and that the proportion of really useful packages to frivolous and/or repetitive packages is very small. Let’s hope it stays this way!

4. Making Windows a great platform for open-source
Many of the hottest open-source projects available today were originally built on Linux-based platforms and, as such, are welded to UNIX-style IO, file storage, process management and thread scheduling mechanisms. In order to run on Windows, such projects typically run under CygWin – a POSIX emulation infrastructure that allows most POSIX apps to run unchanged on Windows. While this is a pragmatic approach for non-performance-sensitive code, Cygwin often introduces a significant performance hit in high performance code.

This was the situation facing node – the blossoming asynchronous JavaScript engine – to run on Windows, it had to be run under CygWin, which impacted performance significantly. To solve this problem, Microsoft and Joyent (node’s primary sponsor & employer of Ryan Dahl - node’s creator) agreed to work together to make node run natively on Windows. The work to port node to Windows spawned LibUV – a library that provides a platform-abstraction layer allowing node (and any other open-source project) take full advantage of both *N*X and Windows’ async IO (and other platform dependent differences) with little effort.

In November 2011, Microsoft announced the first stable builds of node, using the new LibUV library, running natively on Windows. Simultaneously, Microsoft built IISNode allowing node to be hosted within IIS (Microsoft’s web server). The code for IISNode is hosted on GitHub and is free and open for all to see and/or modify should you wish to do so. And that’s not the end of the story: LibUV has turned out to be so useful that other open-source projects are now employing it to port their code to run natively on Windows.

5. Forking and Maintaining Ports
In a sign of increasing maturity in how it works with open-source communities, Microsoft has now begun (appropriately) forking and maintaining open-source projects: In November 2011, Antirez announced that Microsoft had provided patches to port Redis to run natively on Windows, using LibUV. While Antirez decided NOT to accept Microsoft’s patches into the Redis core (yet, for reasons he articulated in the post linked to above), he encouraged Microsoft to create their own Windows fork of Redis. Microsoft worked with others in the community to create a Windows fork of Redis which became the first project officially published by the newly formed Microsoft Open Technologies Inc. subsidiary formed in 2012 and is run by Jean Paoli.

6. Supporting Apache, PHP and Ruby on Windows
In 2008, Microsoft began helping upgrade Apache and PHP significantly update their projects in order to support the newer and far more effective Visual C++ 2008 VC9 compiler. This work resulted in native builds of both the Apache web server and the PHP engine which consumed less RAM and performed much better than before.

In 2008, alongside the new and improved PHP, Microsoft also released support for FastCGI within IIS. This enabes IIS to reliably host non-threadsafe code such as PHP and Ruby, alongside .NET code and native IIS handlers and modules within the same website if required. This means that IIS can now safely and reliably host PHP-based websites and services including Wordpress, Drupal, Joomla, etc.

7. Supporting open-source platforms in Azure
At Mix09, Microsoft announced official support for PHP, Java and Ruby on Windows Azure.

Since Windows Azure Web Role instances are essentially Windows Server VM’s, this should come as no surprise since Microsoft had already released FastCGI support for IIS.

What this announcement introduced, however, was the fact that not only was Microsoft supporting PHP, Ruby and Java on Azure, but that they were also in the process of providing comprehensive API’s for each environment, allowing developers to access all of Azure’s service control & configuration capabilities, table, blob and queue storage, message-bus infrastructure, etc. from their preferred language/platform.
Then, in December 2011, after the work to port node to Windows was completed, Microsoft announced that node is now fully supported in the Windows Azure cloud platform, along with a node Azure SDK providing programmatic access to the Azure environment and storage and message-bus infrastructure.

8. Backing Hadoop
In late 2011, Microsoft and HortonWorks announced they were teaming-up to port Hadoop to Windows. This is a big deal; not only did Microsoft decide to plow effort and resources into porting Hadoop to Windows, they decided to abandon their own home-grown big-data solution in the process. Microsoft’s adoption of Hadoop can only result in good things – particularly to end-users who will be able to analyze colossal datasets using familiar tools such as Excel and PowerView.

9. Becoming A Top-20 Contributor To The Linux Kernel
In 2011, Microsoft became one of the top 20 contributors to the Linux kernel … the same Linux that CEO Steve Ballmer described as a “cancer” just over 10 years previously. My, how times change!

Microsoft’s contributions largely center around drivers they submitted to enable Linux to be hosted within Hyper-V – Microsoft’s OS virtualization technology. The drivers Microsoft submitted to the Linux kernel project provide a significant performance boost to Linux VMs’ storage, networking and video-subsystems.

10. Open Sourcing ASP.NET MVC4.0, WebAPI and Razor View Engine

Perhaps the biggest news related to Microsoft and open source came when Microsoft announced that:

ASP.NET 4.0 MVC, Web API and Razor View Engine would be made open-source
The ASP.NET team will consider accepting changes to ASP.NET submitted by the community
The ASP.NET team would continue development of ASP.NET “in the open”, submitting all future code changes into a public-facing GIT repository hosted by the Outercurve Foundation’s CodePlex site.
It clear that Microsoft has finally turned a corner and is now increasingly following a path towards greater acceptance and support for open-source. This is a GIGANTIC step forward.

Microsoft is leading by example and sending a strong message to their legions of developers that open-source need be feared no longer and that publishing open-source code benefits everyone. Hopefully, this will result in a gradual, but eventually sizable increase in the volume of high-quality, reusable code being made available as open-source for us all to enjoy, learn from, help improve and adopt.

Now, the time is Come. Welcome to the open-source world, Microsoft. Please Hop-On.

No comments: