﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Glenn Block commented on Reading MEF code</title><description>You can achieve the functionality by setting an app domain to shadow copy (I just tested it). With shadow copying the assemblies won't be locked and you can update in place. The caveat is this won't remove any types that are loaded in memory, BUT it will allow you to update which types are available to the container as when the catalog changes, recomposition will occur. Ping me if you want to chat on this.
</description><link>http://ayende.com/3631/reading-mef-code#comment11</link><guid>http://ayende.com/3631/reading-mef-code#comment11</guid><pubDate>Tue, 25 Nov 2008 22:04:08 GMT</pubDate></item><item><title>James Kovacs commented on Reading MEF code</title><description>The fundamental problem here is that .NET doesn't support dynamic assembly unloading. You could reload the assembly, but you would never be able to recover the memory used by the old one. One of the main use cases of such as feature is live updating of a long-running application and gradually leaking memory in the form of unreferenced assemblies, JIT'd code, and related data structures doesn't seem like an acceptable story to me. So work needs to be done at the CLR level before a framework like MEF can implement this for the in-process case. WCF or a cross-app-domain plug-in system are possible solutions, but - as Oren mentions - they're orders of magnitude slower than in-process and therefore aren't usable for general composition.
</description><link>http://ayende.com/3631/reading-mef-code#comment10</link><guid>http://ayende.com/3631/reading-mef-code#comment10</guid><pubDate>Mon, 13 Oct 2008 13:51:42 GMT</pubDate></item><item><title>Steve Degosserie commented on Reading MEF code</title><description>That's the main downside, which might be adressed by in-process transport like 
[www.codeproject.com/.../NullTransportForWCF.aspx](http://www.codeproject.com/KB/WCF/NullTransportForWCF.aspx). Haven't tested it extensively but when you think of it, WCF has all the infrastructure (and more) that you need to implement what you describe in your post.
</description><link>http://ayende.com/3631/reading-mef-code#comment9</link><guid>http://ayende.com/3631/reading-mef-code#comment9</guid><pubDate>Sun, 05 Oct 2008 10:58:50 GMT</pubDate></item><item><title>Ayende Rahien commented on Reading MEF code</title><description>I heard of that, I think that he is being grossly exgagerating. WCF is really slow.
  
Something like five orders of magnitudes compare to plain .NET
</description><link>http://ayende.com/3631/reading-mef-code#comment8</link><guid>http://ayende.com/3631/reading-mef-code#comment8</guid><pubDate>Sun, 05 Oct 2008 10:50:12 GMT</pubDate></item><item><title>Steve Degosserie commented on Reading MEF code</title><description>Exactly ! Have you seen the presentation of Juval Lowy touting WCF as a better .NET ? As he says, WCF offers you process isolation at the class level ... maybe an interesting option?
  
</description><link>http://ayende.com/3631/reading-mef-code#comment7</link><guid>http://ayende.com/3631/reading-mef-code#comment7</guid><pubDate>Sun, 05 Oct 2008 10:47:39 GMT</pubDate></item><item><title>Ayende Rahien commented on Reading MEF code</title><description>Steve,
  
Check my post about components about a week ago, it talks about that.
</description><link>http://ayende.com/3631/reading-mef-code#comment6</link><guid>http://ayende.com/3631/reading-mef-code#comment6</guid><pubDate>Sun, 05 Oct 2008 10:41:21 GMT</pubDate></item><item><title>Steve Degosserie commented on Reading MEF code</title><description>Interesting, I was thinking about components or sub-systems that can be started / stopped on the fly (as long as they are not a vital part of the application =&gt; a component exists that has a mandatory dependency to it) ... considering that most applicative components  / services are singletons.
</description><link>http://ayende.com/3631/reading-mef-code#comment5</link><guid>http://ayende.com/3631/reading-mef-code#comment5</guid><pubDate>Sun, 05 Oct 2008 10:39:28 GMT</pubDate></item><item><title>Ayende Rahien commented on Reading MEF code</title><description>Steve,
  
Sure, it is pretty easy, you need to write a facility that keeps track on that, though, and respond to changes to ComponentStatusChanged.
  
The problem is that MEF doesn't have the notion of lifetimes, and Windsor does, so you need to do some fancy footwork there to get it to work in all situations
</description><link>http://ayende.com/3631/reading-mef-code#comment4</link><guid>http://ayende.com/3631/reading-mef-code#comment4</guid><pubDate>Sun, 05 Oct 2008 10:28:20 GMT</pubDate></item><item><title>Steve Degosserie commented on Reading MEF code</title><description>Do you think it would be possible to support dynamic recomposition with Windsor ?
</description><link>http://ayende.com/3631/reading-mef-code#comment3</link><guid>http://ayende.com/3631/reading-mef-code#comment3</guid><pubDate>Sun, 05 Oct 2008 10:26:33 GMT</pubDate></item><item><title>Ayende Rahien commented on Reading MEF code</title><description>Steve,
  
You are probably right, I hoped for some fancy work there, though
</description><link>http://ayende.com/3631/reading-mef-code#comment2</link><guid>http://ayende.com/3631/reading-mef-code#comment2</guid><pubDate>Sun, 05 Oct 2008 10:24:12 GMT</pubDate></item><item><title>Steve Degosserie commented on Reading MEF code</title><description>How about in constructor of AttributedAssemblyPartCatalog(string codeBase):
  
  
var assemblyName = new AssemblyName();
  
assemblyName.CodeBase = codeBase;
  
Assembly assembly = Assembly.Load(assemblyName);
  
this._assembly = assembly;
  
</description><link>http://ayende.com/3631/reading-mef-code#comment1</link><guid>http://ayende.com/3631/reading-mef-code#comment1</guid><pubDate>Sun, 05 Oct 2008 10:20:14 GMT</pubDate></item></channel></rss>