For someone who's spent most of her career writing about Linux and open source, it was a little brain-bending to see a Microsoft (news, site) booth at DrupalCon 2011. I managed to drag Mark Brown, senior product manager for the Microsoft Web Platform Team, away from the booth for a bit of a chat.
Apparently the most common question Brown hears at Drupal (news, site) and other open source events is, "What are you doing here?" Fortunately he approaches that question with humor and a bit of humility, as far as owning up to Microsoft's attitude in the past and focusing on the future.
The long and sordid tale he spins starts back in 2007, when trying to run anything PHP-related on Microsoft Windows was a nightmare: PHP binaries were out of date and weren't maintained, there was no feature parity and there were huge security holes. The standard Windows CGI handler launched a new process with every PHP request, causing such a heavy load on systems as processes were created and destroyed that people just avoided doing anything CGI on Windows servers. Those who did use PHP on Windows boxes were mixing PHP modules from various sources, some of which were single-threaded, and others were multi-threaded, which caused no end of trouble -- IIS is single-threaded and has no thread safety checks.
On top of that, Microsoft IIS had grown up organically, with features being added over time, and the resulting patchwork server made it difficult to add support for other technologies such as PHP and CGI. Then elements at Microsoft realized that, to stay relevant and be used at all as a web platform, it couldn't just support ASP and ASP.NET. There was a huge community of PHP developers who would never build products on its servers.
Fixing the Stack
To say there was a lot to do was an understatement. Microsoft, the 500-pound gorilla of the software world, was in the position of having to play catch-up. The first thing the Microsoft team did was to create a module called FASTCGI, which created an app pool for PHP requests. This act eliminated the constant creation and destruction of processes. One problem solved.
Their second move was to re-architect IIS 7 from the ground up. Using Brown's own words, it made the web platform more like Apache (news, site). IIS 7 was modular, with most things turned off by default, so it had a much smaller footprint and would have fewer security risks from people forgetting to turn off unneeded features. They also changed the processing pipeline, creating a URL rewrite module similar to Apache's mod_rewrite because readable URLs are so important for SEO.
Because PHP apps are compiled at run time, it also need caching. They wrote wincache, their own version of memcache, and made it in some ways the Swiss army knife of caching. But that still didn't take care of all of the issues. By this point they had a native PHP driver for SQL Server, but when they heard that Drupal 7 was adding PDO support, they realized this was their chance to improve their database handling. Microsoft partnered with Drupal developers, with Microsoft helping them with the SQL Server module, and the Drupal developers helping them implement PDO support.
Once the stack was ready, the Microsoft team moved into the next phase. They started by releasing the Web Application Gallery, where Acquia's Drupal bundle was one of the first packages offered. Today it has over 60 free open source applications for multiple technology stacks (PHP, .NET, etc.) Microsoft also released the Web Platform Installer, which is essentially an apt-get or rpm for Windows that handles installation, dependencies and other basic issues.
But feedback from the open source community was that people were still uncomfortable installing on Windows, in part because they didn't know where the configuration files were, and didn't feel sure about the file permissions, and other learning curve issues. In response, Microsoft worked with The Commerce Guys, who released a Drupal 7 install profile for SQL Server.
On January 13, they made the next step, releasing WebMatrix. Brown says that the Web App Gallery was just half of the equation -- it gets the software installed. Once people have their Drupal or other site ready, they need to find hosting so they can publish it. WebMatrix gives people access to about 150 hosting companies at price ranges from $2.50 per month up to higher-end packages. When the user chooses their host, WebMatrix handles moving the configuration, setup and content onto the hosting site using WebDeploy, which is essentially a souped-up FTP or rsync. WebMatrix has other features as well, such as analyzing a site for SEO, a database editor and a CSS editor.
Walking the Line
Brown says that, over the last three years that he's been at Microsoft, he's really enjoyed reaching out to the Drupal community. He was an open-source user and web developer before he went to Microsoft, and thinks that the moment that both communities get that it's best to get along, the better it will be for everyone.
The jaded will point out that Microsoft isn't doing this out of charity, but out of self-interest. Of course it is. Everything we do is out of self-interest, even if that interest is to feel good by helping another human being or doing something else all fluffy and sweet. But because open source is in part about choice and avoiding vendor lock-in, it seems to be participating in the proper spirit of things. After all, if someone doesn't want to change stacks but is willing to give open source a try, who are we to say no?