Dynamic MEF isn’t thread safe by nature

Saturday, December 4, 2010

Dynamic MEF isn't thread safe by nature this post focus a pitfall which you should be aware in order to avoid sporadic crashes. In general most of MEF operation are operate once at the application initialization stage, and it normally happens on a single thread.   this may not be true when you need to dynamically load MEF parts (using GetExportedValue or SatisfyImportsOnce).   unfortunately MEF underline is using non concurrent dictionary which is not thread safe for the above operation implementation. therefore the following code will crash sporadically. Code Snippet // exported type...

Performance tips

Tuesday, May 4, 2010

Performance tips recently I was working on the Reactive Queue (which is part of the Rx Contrib). the requirement for the Reactive Queue was to to achieve the highest throughput possible for each queue provider (2,000,000 messages of 500 byte per second using Concurrent Queue provider running on simple quad server). while working on this project I was encounter the the following performance hits:   1. ManualResetEventSlim there is a big difference between using the old ManualResetEvent Vs. ManualResetEventSlim the hit factor can go up to 2...

Calling WCF secured service from Java

Tuesday, March 9, 2010

Calling WCF secured service from Java   recently I was working on exposing secured WCF service to Java consumers. I was responsible for the .NET side and a java expert named Tsvika responsible for the Java side.   enabling secured conversation between Java and .NET using WCF is not a trivial task, and it does needed some additional steps. you should have certificate install, and having the binding and behaviors configured in a way that the Java proxy can manage.   Certificates ...
tags: ,

Catalogs (code cartoon)

Monday, February 15, 2010

Catalogs (code cartoon) catalog are search boundary for the composition container.         you can read more about MEF on MEF for beginner series, the TOC is available here   תגים של Technorati:‏ Extensibility,MEF,Composition,catalogs
no comments

Securing the MEF Directory Catalog

Friday, January 1, 2010

Securing the MEF Directory Catalog   during my MEF lecture, on of the attendant (a fellow from check-point) ask the following question: "How can we secure our catalog?"   this is a really good point, because without securing our catalog, hackers can exploit our extensibility model for injecting malicious code.   so can we defend our MEF gates? the short answer is yes. and the long one is yes but…   Secure techniques I will mention 3 techniques, each defend our...

MEF at the SDP

Monday, December 28, 2009

MEF at the SDP today i was lecturing at the SELA SDP about building composite WPF shell application using MEF. first I want to thanks all attendant that was there despite of the latency in the schedule. second I want to thanks Yaniv Rodenski for his part in the lecture. Yaniv was demonstrating real world solution that combine the WCF power with the MEF charm :)   as I promised you can find the presentation and the code sample that I was showing (and Yaniv was kind enough...
no comments