TPL Dataflow Starvation Fixed Great news for all TPL Dataflow developers. The old bug (more than a year since I reported it) was finally fixed at version 4.5.24. now it is safe to use fallback scenario with TPL Dataflow. for example: if you’re having 2 face recognition algorithm: * excellent but slow * fine and fast and you want to use those algorithm on a video streams without getting to much behind. You can limit the Bounded Capacity of the excellent algorithm’s block, link the two algorithm’s blocks to a buffer block. As long as the excellent...
Microsoft.Composition (Portable MEF): Convention This post is part of mini series, which complete the full MEF series. this post will go over Microsoft.Composition conventions. personally I really like convention over IoC, because it’s lead to better consistency of the code-base’s naming. Convention can be simple as the following code:
var conventions = new ConventionBuilder();
.ExportInterfaces(t => t == typeof(ISetting));
var configuration = new ContainerConfiguration()
using (var container = configuration.CreateContainer())
As you can see the convention can be strict as in line 2,or more general as in line 3,4.the configuration (line 5,6) define the assembly which the convention relate to. convention can be more...
Microsoft.Composition (Portable MEF): Attribute Model This post is part of mini series, which complete the full MEF series. The original MEF series goes over the version shipped with the .NET framework.This mini series will go over the API of 3rd lightweight (yet efficient) MEF version which consumed via NuGet. This version is following the same concept of the previous changes yet some APIshas been changed. Apart of the APIs refactoring (mostly for better)this MEF version is having much better descriptive Exception (it was really bad on previous versions) The down side of this version is lack of documentation.this mini...
Service Fabric Concept, Guidelines and Patterns #5–Map Reduce this post is part of the Service Fabric’s series which covers Service Fabric’s concept, guidelines and common patterns. at this post we will discuss the Map Reduce pattern. quite like the Fork Join pattern Map Reduce is splitting a work into sub processing units, each handling portion of the overall processing. the difference is that Map Reduce sub processes produce the result in form of Key/Value pairs,while the reduction merge similar keys produced by the sub processing units,into single key value pairs (with no...
Service Fabric Concept, Guidelines and Patterns – TOC Service Fabric’s series Table of Content the series will cover Service Fabric’s concept, guidelines and common patterns. #1 Introduction #2 Singleton Pattern #3 Pool Pattern #4 Fork Join #5 Map Reduce
Service Fabric Concept, Guidelines and Patterns #4 – Fork Join this post is part of the Service Fabric’s series which covers Service Fabric’s concept, guidelines and common patterns. at this post we will discuss the Fork Join pattern. Fork Join pattern divide a work into sub unit which execute in parallel, the parallel results collected back into single result (PLINQ is classic sample for this pattern). the following diagram describe the pattern. when using the Actor model over Service Fabric, Actor Id dictate the actual instantiation. in...
Service Fabric: Let Your Voice Be Heard Service Fabric SDK is still in its early stage and your voice may affect the final outcome. your voice can be heard at the Service Fabric User Voice all you have to do is vote for feature and the Team will do effort for addressing the top feature requested by the community. personally I can recommend looking at the following * Adoption of RX 3 * Custom Actor's Queue Extensibility * Immutable Invocation * Provide more control over actor lifetime * Open Source Service Fabric * Cross Actors/Services Transaction
Service Fabric Concept, Guidelines and Patterns #3 – Pool this post is part of the Service Fabric’s series which covers Service Fabric’s concept, guidelines and common patterns. at this post we will discuss the Pool pattern. there are many reasons for using pools, you may need a set of initialized resources, for boosting performance, limit memory allocations or limiting of concurrent access to resource (like connection string). not matter what motivation you have, the pattern is quite simple to implement while using the Service Fabric Actor model. remember that the Service Fabric’s...
Service Fabric Concept, Guidelines and Patterns #2 – Singleton this post is part of the Service Fabric’s series which covers Service Fabric’s concept, guidelines and common patterns. at this post we will discuss the Singleton pattern. when using the Actor model, Service Fabric’s ActorId is the key component for implementation of most pattern when the Service Fabric resolve Actor instantiation it’s using ActorId for returning existing Actor or creating new one. for example: (Update the sample was wrong idx wasn’t “A”) var idA = new ActorId("A");var idB = new ActorId("B");var...
you may want to read this blog post in short ValueTask suggestions for corefx is quite cool and can save memory allocation credit: this post brought to my attention by Avi Avni