Cloud Foundry: Design and Architecture
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Jonathan Allen on Jul 21, 2009
In honor of MEF reaching its feature complete milestone, we take a look at the confused story of extensibility in the .NET Framework. MEF or Managed Extensibility Framework is the fourth extensibility framework to be released by Microsoft. Though like all the previous times, Microsoft is claiming that it is the first.
The Managed Extensibility Framework, or MEF, is the official dependency injection framework for the .NET Framework. In the documentation they claim,
MEF presents a simple solution for the runtime extensibility problem. Until now, any application that wanted to support a plugin model needed to create its own infrastructure from scratch. Those plugins would often be application-specific and could not be reused across multiple implementations.
But that is not true. In addition to the third-party frameworks like Spring.NET, there are at least three other extensibility frameworks for the .NET runtime just among developed by Microsoft itself.
So which to use? Glenn Block writes about this,
System.Addin is a great technology for addressing issues around versioning resliance, isolation and recoverability.
- Using System.Addin allows you to host different components in separate app domains, thus allowing those addins to have different versions of assemblies which they reference which all run in the same process.
- System.Addin allows you to separately version Addins so that you could have two versions of an Addin sitting side by side.
- System.Addin manages automatically unloading app-domains they are no longer used thus allowing you reclaim memory.
- System.Addin has a bunch of security infrastructure (addins run in a sandbox) to ensure that components that are loaded do not have unauthorized access to data in the rest of the app.
- System.AddIn allows your app to gracefully recover whenever one of the addins crashes (this is due to isolation)
MEF on the other hand is a great technology for discovery and composition
- MEF composes deep object hierarchies of components
- MEF abstracts components from static dependencies.
- MEF can allow components to be lazily loaded and lazily instantiated.
- MEF provides a cataloging mechanism and rich metadata for components to allow them to dynamically discovered.
- MEF can compose components from various programming models, it is not bound to static types.
Rather than simply build MEF on top of the Add-In Model, which they admit has some significant advantages in terms of isolation for security and stability, MEF seems to have been built from scratch with little or no consideration for the preexisting technology.
The confusion over the two technologies suggests that there are some disputes within Microsoft. On one side we are seeing videos with titles such as Creating Extensible Applications with the Managed Extensibility Framework. In November the Program Manager Gleen Block was even claiming that, “MEF is being position as the framework for extensibility going forward”.
On the other side, we have diagrams presented by Krzysztof Cwalina in June of 2008 clearly show MEF being used in conjunction with the Add-In Model. And the Program Manager Nicholas Blumhardt has said that interoperability between the two projects would be considered after .NET 4 is released.
One possible explanation for this is that the Add-In Model just doesn’t work for most people. It is an embarrassingly complex framework and code generation tools such as the System.Addin Pipeline Builder are needed just to get started. And it should be noted that this is the second incarnation of that project. It was forked from the original because it wasn’t being maintained and bugs were not being fixed.
So what will be the final fate of System.AddIn? With no one willing to say otherwise, it seems like it will be quietly abandoned just like LINQ to SQL.
Visual Studio vNext: ALM features for Agile Planning, Team Collaboration
Troubleshoot Java/.NET performance while getting full visibility in production
Automating Error Reporting for .NET Applications
Maybe they could/share some code, but that's beside the point. There really are some unanswered questions about the future of System.AddIn and its relationship to MEF. I think that's bad enough, no need to exaggerate the story.
BTW, has LINQ to SQL really really been "abandoned"? The official version was that they just didn't want to extend LINQ to SQL until it matches EF, ending up with two libraries adressing the same problem (very much what you're criticizing here). They'd rather have a lean-and-mean LINQ provider with very basic ORM capabilities (LINQ to SQL) and a full ORM for enterprise apps (EF). This makes a lot of sense to me.
I think that your statement that "[MEF] is the official dependency injection framework for the .NET Framework." is incorrect. It is an extensibility framework, not a DI/IOC framework. While internally it may use a "container" to fulfill that role, that is a mere implementation detail.
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
Andrew Watson talks about the work of the OMG, where CORBA is alive and well (hint: in your car), UML and UML Profiles vs. custom Modeling languages, DDS and other middleware, and much more.
Sohil Shah discusses creating iPhone and Android enterprise mobile applications based on cloud services using the open source platform OpenMobster.
Paul Sanford presents the transformations supported by data throughout its life cycle, and how that can be better done with Splunk, an engine for monitoring and analyzing machine-generated data.
A common “best practice” for unit tests is to only write a one assertion in each test. I intend to question this advice by showing that multiple assertions per test are both necessary and beneficial.
John Rauser presents the architectural and technological evolution of Amazon retail websites starting with 1994 and ending with adopting Amazon Web Services.
Michael Stal discusses system architecture quality, how to avoid architectural erosion, how to deal with refactoring, and design principles for architecture evolution.
Every developer has had to integrate with another system, API or component. Tis article provides strategies to handle the change and for he separating system boundaries.
2 comments
Watch Thread Reply