Code, technology, opinion ... and who knows what else?

Month List


Comment RSS

Microsoft wakes up to Open Source … in a big way!

Contrary to popular belief, Microsoft loves open-source. No, really! Don’t believe me? Read on:


Today, Microsoft announced that it is open-sourcing all of its flagship web/cloud platform: ASP.NET MVC Web Pages (aka Razor), Web API.

Importantly … these projects will be publicly hosted and that the team will continue development in the open (you’ll be able to view the repository and see the code commits as they happen) and that Microsoft will even consider code submissions, fixes, improvements & features contributed by 3rd parties.

This isn’t the first time Microsoft has released major open-source projects. ASP.NET itself has been open-source for some time, and Microsoft has tested the waters with developing significant projects as open-source projects for a while now.

The difference with today’s announcement is that Microsoft is jumping into the deep-end, open-sourcing significant projects AND committing to developing them in the open in future AND will be open to accepting code submissions from the community!

And, yes, this is MICROSOFT we’re talking about! Winking smile

So, let’s examine Microsoft’s open-source stance and credentials for a few moments:

It all started …

Rather than repeat what’s already been written, go read this piece by Wired. It’s okay, I’ll wait … Thanks for coming back Smile

So, Bill Hilf forms the Open Source lab at Microsoft and hires Sam Ramji. They hire a cadre of open-source hotshots from around the company and beyond and start working on making Windows a great place to run open-source software.

The result? Microsoft has chilled-out and has become … dare I say it … hip!

Despite some unfortunate stances and comments early-on in the early explosion of moden-day open-source projects, Microsoft has increasingly been helping a variety of open-source platforms and projects take better advantage of Windows as a service hosting infrastructure

At the same time, gradually finding its own feet, gaining confidence and beginning to open-up some of its own product development teams, projects and processes to open-source.

In the last couple of years, Microsoft has:

  • Committed code to the Linux kernel (to help Linux run beautifully on Windows’ Hyper-V virtualization infrastructure).
  • Collaborated with open-source communities and companies to better support PHP and node.
  • Created and released its own open-source projects including IronRuby, IronPython, F#, Orchard CMS, NuGet, IISNode, Hadoop and now its own flagship web platform: ASP.NET, ASP.NET Web Pages (nee Razor) and Web API.

Making Windows a great place to run …

Microsoft has done A LOT of work over the last few years to make Windows better support a variety of traditionally-UNIX open-source projects. Below are a small sampling of the most prominent works:

… PHP & Apache Web Server

In October 2006, Microsoft announced that it was collaborating with Zend to make Windows a great place to run PHP sites.

The key inhibitor to Windows being a great host for environments like PHP at the time was PHP’s dependency on the venerable CGI (Common Gateway Interface) process spawning component.

The result of this collaboration was the FastCGI component for IIS6+ which mimicked CGI to calling applications, but used IIS’ highly optimized process management infrastructure to vastly reduce the overhead normally associated with running CGI-based systems on Windows.

Since the work on FastCGI, Microsoft have also created PHP drivers for SQL Server, added support for PHP to some of its developer tools. Microsoft also helped PHP & Apache Web Server port their code to compile smoothly with Microsoft’s VC9 compiler which resulted in a significant performance and stability improvements compared to versions compiled with the VC6 compiler.

… Ruby & Python

Ruby and Python have become very, VERY popular and for good reason. Their terse, expressive, dynamic syntax lets developers achieve a lot with relatively little code.

Microsoft released IronPython in 2006 and in 2007, Microsoft announced IronRuby. Both of these languages compile their code to .NET IL (as does C# and VB) allowing for good execution performance along with greater integration with the .NET framework and with Windows as a whole.

Although Microsoft dismantled the Iron* language teams in late 2010, they released these projects back into the community and they continue to thrive and flourish.

… Hadoop

The IT “big-data” communty erupted with excitement (e.g. Wired, ArsTechnica) when Microsoft announced that it was adopting Hadoop – a distributed compute platform for analyzing large data sets. Hadoop is housed and supported by the Apache Foundation and Microsoft will submit to Apache any additions or changes it makes to Hadoop, and that it is “making a commitment to compatibility” with the open-source project.

So? Microsoft supports another open-source project? I hear you ask. Yes, but importantly, they did so whilst dropping their own internally-developed big-data analysis engine!

… DVCS: GIT, Mercurial

DVCS – Distributed Version Control Systems – utterly revolutionized open-source development projects and are increasingly revolutionizing corporate and enterprise development projects.

GIT – first implemented by Linus Torvalds (who also created the Linux kernel) has achieved DVCS dominance in less than 6 years. Mercurial is a very similar DVCS but is simpler to use and less likely to allow you to blow your own foot off. Both have revolutionized how open-source projects (and, increasingly, enterprise development projects) collaborate on a common code-base.

GIT was originally quite Windows-hostile since it was first built as a UNIX tool that depended on the way UNIX works. That changed with the advent of the MySysGIT project that ported GIT to run more smoothly on Windows.

Mercurial was and is implemented in Python so has few of the incompatibility issues that plagued early releases of GIT.

Just this week, Microsoft announced that it is adding GIT support to CodePlex – Microsoft’s own open-source hosting site in addition to the incumbent Subversion, Mercurial and TFS options.

… Linux

Yep, you read that right!! In 2009, Microsoft contributed open-source drivers to the Linux Kernel project! These drivers help Linux run faster and more smoothly within Microsoft’s Hyper-V virtualization engine.

… node

Node (formally known as node.js) is a server-side javascript application platform built on top of Google’s V8 javascript engine. Node is rapidly growing and is generating a lot of excitement, particularly in the open-source community. What’s most exciting about node is that it is asynchronous to the core – all file & disk IO, all network IO, all IO with external systems is all asynchronous. This results in node apps being very thread-agile in that it doesn’t block its (single worker) thread waiting for slow storage, networking and/or external systems to respond.

Node’s problem was that they were not taking advantage of Windows’ Async IO Completion Ports (IOCP) in order to perform async IO and so earler versions of node could not operate correctly on Windows. By working with Microsoft during the latter half of 2011 to improve node on Windows, Joyent created “libuv” a new platform abstraction library that provides dependent code with a common cross-platform API for async fiie IO, streams, UDP, TCP sockets, named-pipes, DNS requests, etc., along with process forking, new clocks & timers, async TTY support, etc.

So important and highly-respected is libuv that several other OSS projects are now adopting it, further improving their ability to run on Windows.

Today, Ryan Dahl, node’s creator, was seen to tweet:


Microsoft themselves have also recently released IISNode - an IIS extension that enables node apps to run as first-class citizens on IIS. Along with FastCGI, IISNode now allows a single website to simultaneously host ASP.NET WebForms, ASP.NET MVC Web Pages (formerly Razor pages), PHP, Node (and potentially other platforms too including Ruby, Python, Perl, etc.)!

… NOSQL: Cassandra, Redis, Mongo, etc.

All of the major NOSQL engines already run very nicely on Windows. I myself am running Redis and Cassandra on the laptop upon which I am writing this post! I am certain that should the demand increase, that Microsoft will collaborate with those projects to further improve their products’ performance, reliability and manageability (if necessary) when running on Windows.

… open source via the NuGet package manager & gallery

Perhaps the second most important feature of any open-source community (after a decent DVCS facility) is package management. This allows any developer anywhere in the world to download, verify, extract and install a wide variety of open-source components, add-ons, utilities and tools with just a few keystrokes.

Ruby, for example, has gained a colossal following in just a few short years thanks largely to the huge number of Ruby “Gems” that can be downloaded and installed using the Gem package manager. To install a package, Ruby developers just need to type commands like:

gem install <package name>

Many other open-source communities have followed this pattern: For node developers, type:

npm install <package name>

For Windows developers, install nuget, then browse the nuget gallery and then from Visual Studio’s Package Manager console or from the command line, type:

nuget install <package name>

While nuget was originally created by a skunkworks team at Microsoft and then later formalized by Microsoft’s web platform team, it’s since been handed over to the OuterCurve Foundation & the community. NuGet is BY FAR the most exciting thing to enter the Windows developers’ toolbox for a long, long time.

Conversely, making .NET code great EVERYWHERE!

Not only is Microsoft committing time and resources to making open-source projects run well on Windows, but it’s helping make their own products work well on non-Windows environments!

.NET is Microsoft’s implementation of a set of standards that the company released to the ECMA standards body in 2001, even before Sun released the Java spec’s!

Taking advantage of the fact that the technologies underlying .NET would be open and free, in July 2001, Miguel De Icaza, creator for the Gnome shell for Linux,  announced the creation of the Mono Project – an open-source project that would aim to implement the CLI, CLR & C# for UNIX-based operating systems (.e.g. Linux and, more recently, OSX).

Miguel & Co. formed Ximian to create a commercialized toolset using the open-source Mono project. Over the subsequent years Mono & its commercial tools continued to improve and innovate, despite being bought by Novell, cast aside when Novell crumbled and since taken over once more by Miguel & Co. at the newly formed Xamarin corporation.

Today, Mono is a fully featured, cross-platform implementation of the CLR, CLI & C# and can run a large number of .NET projects including ASP.NET, Orchard CMS, Raven document DB, etc.

This morning, Miguel De Icaza tweeted a request for help from the community in order to do the work necessary to implement the additional (async) features required by the newly released ASP.NET MVC 4 framework … and Microsoft was the first to offer its support:


Microsoft have also helped ensure that the open-source Orchard Content Management System (CMS) runs on Mono and that it supports RavenDB and MongoDB. The list of open-source .NET projects is growing VERY rapidly with, or without, Microsoft’s involvement. It’s only a matter of time until the .NET open-source community achieves critical mass and achieves explosive growth.

Considering the sheer size of the .NET community, it should be a very exciting time ahead!

Is that it?

No. The projects enumerated above don’t even begin to scratch the surface of Microsoft’s contributions to open source or open-source projects that they themselves founded. We’ve not even mentioned F#, CoApp, PEX & Moles, etc. And we’ve not mentioned how Microsoft is helping Umbraco port their CMS from ASP.NET WebForms to MVC Web Pages.


So, why is Microsoft doing all this?

Well, essentially, the world has changed in the last 6-8 years. Open-source projects have proven their ability to deliver groundbreaking new technologies VERY quickly. Consider jQuery, MySQL, ProgreSQL, Cassandra, Redis, node.js, etc., all of which are open-source and all of which are delivering valuable service to their users.

By making Windows a great place to run all these systems, Microsoft will increase its applicability and

So Microsoft is all Unicorns and Rainbows?

No. Not yet … but they’re a heck of a lot closer than ever before!

I think it safe to say that, unlike 10 years ago, Microsoft “gets” open-source and is now a staunch supporter. Not only that, they’re proving through their actions that they’re willing to open-source some of their own premier products and technologies.

Will we ever see a day when Microsoft open-sources Windows or Office? Probably not, but, I wouldn’t be at all surprised to see them open-source subsystems and components of their OS for others to contribute to.

What Microsoft needs to do more now than ever before is:

  1. Increase support for external open-source projects (e.g. help get libuv adopted by Cassandra, Redis, etc.)
  2. Lead by example
    1. Open-source more products where relevant and necessary
    2. Develop in the open
    3. Accept appropriate code submissions from the community

All in all, open-source on Windows is looking good now and about to get VERY exciting in the coming months.

Permalink | Comments (0) | Post RSSRSS comment feed

“Antares” - Microsoft’s future web/cloud hosting platform?


Microsoft has made a HUGE commitment to the cloud. They’ve spent billions of dollars building datacenters around the globe that provide on-demand, dynamically scalable compute, storage, caching and content delivery capabilities. This is Windows Azure.

Azure datacenters are populated with specially-built shipping containers filled with server blades and storage racks. These containers are ordered on demand, delivered to site, plugged into power, network and cooling and then self-integrate into the Azure fabric.

Rather than buying and hosting complex and costly cloud-scale infrastructure, most customers rent compute and storage resources as necessary.

Compute resources come in two flavors: Worker Roles and Web Roles.

Windows Azure worker roles are essentially Windows Server VM's running on racks in Microsoft’s datacenters. Azure Web Roles also run IIS. This means that pretty much any existing Windows Server app can be easily run in the Azure cloud.

Today, Microsoft leaked a new codename: Azure “Antares” (source: Mary Jo Foley @ ZNet):


Details are sketchy at present, but I believe that Antares is a natural evolution of Microsoft’s current web/cloud infrastructure towards a more comprehensive, complete and holistic web/cloud hosting platform, allowing one to build and host a web/cloud app and deploy it seamlessly and without change to in-house servers, servers operated by hosting partners and/or to servers hosted in Azure.

Its highly likely that this infrastructure will integrate current and new features such as FastCGI and IISNode in order to better support sites that use technologies created by open-source communities such as Java, node.js and PHP.

More details as they appear Winking smile

Categories: Cloud | Azure | ASP.NET | node | node.js | IIS | Windows Server
Permalink | Comments (0) | Post RSSRSS comment feed

On the eve of the Windows8 Consumer Preview


In less than 24 hours, the near feature-complete Windows 8 Consumer Preview (aka Beta) will be made available for everyone outside Microsoft to download, install, touch and taste.

Windows 8 is undeniably, one of the biggest single updates to Windows since the introduction of Windows 95. Some argue that it’s the biggest shake-up to Windows since the launch of Windows 3.0 back in 1990.

I couldn’t agree more!

I’ve been using Windows 8 on a daily basis since the developer preview (DP) was released in September 2011. I have been running Windows 8 on a variety of devices – installed locally on a Samsung Slate and Sony Vail Z Series laptop, running in virtual machines and accessing both locally and via remote desktop using a MacBook Pro (primarily running Windows 7) coupled to a 29” Apple Thunderbolt display in order to see how Windows 8 looks and feels on a larger-format display.

Now the the Windows 8 story is stabilizing and with the imminent introduction of the Windows 8 Consumer Preview (CP), I’ll be increasing my posting volume considerably in the coming weeks and months. My goal is to offer you, dear reader, with a balanced, real-world view of Windows 8 – both the good, and the bad – without any of the over-the-top hyperbole and anti-Microsoft-at-all-cost fanaticism we see all too often on the web today.

I’ll be discussing Windows 8 from both the end-user perspective, as well from the perspective of a seasoned developer interested in exploring Microsoft’s exciting new app platform and examining strategies for porting existing Win32/.NET apps to run in the new MOSH environment.

I encourage you to add your comments, questions, thoughts and opinions, but please keep things reasonable and constructive. Unnecessary flames and abusive nonsense will be removed.

Permalink | Comments (0) | Post RSSRSS comment feed

An Accurate Windows 8 Platform Architecture Diagram?

Since Microsoft unveiled details of Windows 8 to the world during the //BUILD conference in September 2011, there has been some confusion about where and how the new WinRT API sits in relation to .NET and Win32.

Part of this confusion is due to the oversimplified, ambiguous and misleading platform architecture diagram unveiled during the conference (click image for un-obscured version):


In this diagram, it appears as though there is no more .NET & CLR, it looks like Silverlight doesn’t exist and, worse, makes it look as though WinRT is an entirely new Windows subsystem that sits alongside Win32!

I spent a lot of my career at Microsoft building and presenting architectural diagrams to explain the relationships between the various technologies I worked on and other current and new technologies. But I don’t think I ever created something as confusing, misleading and ambiguous as the diagram above!

A tip for whoever designed the above diagram: If you’re going to unveil your brand new OS & app platform architecture to your developer community, make sure your architecture diagram is clear and accurate.

Win32 & .NET are NOT “going away”!

During and since the //BUILD conference I’ve had MANY conversations (and overheard many more) with people expressing concern that .NET and Win32 are “going away”! I’ve seen people state that WinRT doesn’t utilize Win32 API’s and that it “resides directly on top of the kernel just like the Win32 API”!! Nothing could be further from the truth!

The reality is that Win32 and .NET are not going away! WinRT is not magic – it’s simply a collection of native COM objects that are exposed to the outside world using .NET/ECMA-335 compatible metadata (rather than the traditional IDL metadata format employed by all COM objects in the past). This allows WinRT objects to be consumed by native C/C++, managed C#, Visual Basic, etc. and Javascript via Microsoft’s Chakra Javascript engine.

Several other people have attempted to provide a more accurate diagram with varying levels of success. Fellow ex-Microsoftie Doug Seven posted his re-rendering of the Win8 architecture, and MVP & author Shawn Wildermuth recently posted his perspective while explaining how Silverlight sits in this architecture.  Famed Microsoft-watcher Mary Jo Foley also has a post discussing the angst caused by the poorly designed Windows 8 architecture diagram above.

While these newer attempts to describe the new architecture are increasingly accurate, they don’t deal with the issue of the relationship between WinRT and Win32. Nor do they clarify the position of .NET & CLR.

To clarify reality:

Because of the continuing confusion I thought I would offer-up what I believe to be a pretty accurate diagram summarizing the Windows 8 platform architecture:

Windows 8 Platform Architecture

Hopefully, this new architecture diagram should make things a lot clearer. This new diagram is by no means perfect, but I believe it accurately expresses the major components of the existing and the new OS components. Let me know if you think it needs any further changes in the comments below.

Permalink | Comments (0) | Post RSSRSS comment feed

How NuGet hosed my Javascript Intellisense but still saved the day


The Issue

I have been banging my head against a brick wall over the last few days trying to get JavaScript & JQuery Intellisense working in Visual Studio 2010 for a web project I am currently working on. I have read all the threads over at StackOverflow, I have read many of the threads on MSDN’s discussion forums and on many pages around the web.

All to no avail – as you can see above, no matter what I did, I could not get any JQuery Intellisense. But why? While it’s not perfect, Visual Studio 2010 has some pretty good (and rapidly improving) Javascript Intellisense support. I know this because I’ve used it on many projects in the past. But for some reason, it was just not working in this current project.

The Problem

I hunted high and low:

  • I made sure I had the JavaScript sources local to the project (to rule-out CDN/connectivity issues)
  • I checked that I was referencing the correct version of JavaScript
  • I added “///<references path=”Scripts/JQuery-1.6.4.js" to my source
  • I checked that there were no errors being reported in any of the sources

Nada. Nothing. It should work, but it wasn’t Sad smile

I thought I’d check in case there were any JQuery updates published to NuGet, so I opened up the NuGet Package Manager console window in VS and typed the following:

PM> update-package

I was surprised to see a number of errors returned, including:

Update-Package : 'jQuery' was not installed in any project. Update failed.
Update-Package : 'jQuery.vsdoc' was not installed in any project. Update failed.

Huh? That’s odd. Let’s see what packages we have installed:

PM> get-package

Id                             Version      
--                             -------      
EntityFramework                4.1.10331.0  
EntityFramework                4.1.10715.0  
jQuery                         1.6.2        
jQuery                         1.6.4        
jQuery.UI.Combined             1.8.16       
jQuery.Validation              1.8.1        
jQuery.vsdoc                   1.6          

To quote Chris Griffin: ”WHAAAAAAAAAT?” Two versions of JQuery? SRSLY?

The Remedy

I remembered that just a couple of weeks ago, I’d updated my NuGet packages and noticed that a new version of JQuery had been downloaded, the old version appeared to be removed from my project and replaced with JQuery-1.6.4. I thought it had been done right, but I guess something must have gotten screwed up in the upgrade.

So, I used "uninstall-package …" several times for each JQuery library until all references to JQuery were removed. Then I used "install-package JQuery” to re-add the latest JQuery to my project. I ran “Rebuild” to re-generate the JavaScript Intellisense, and was delighted to see JQuery Intellisense restored to its full working glory:



I hope this post helps anyone else out there who’s been struggling to get JavaScript Intellisense working in VS 2010.

Permalink | Comments (0) | Post RSSRSS comment feed