Microsoft has had a massive advertising push over the past year for IE10, trying to regain some of the market share which they have been steadily losing. Credit StatCounter I have to admit their adverts are good, making it seem like their browser has started to catch up with the likes of Chrome and Firefox. Once again we see the classic Microsoft approach of reacting … Read More →
ThreadPool Thread Starvation, A Practical Example
As a follow up to my last post on ThreadPool Thread Starvation, I thought I would show you some code to give a practical example of the problem at hand. I will run a series of NUnit tests using different ThreadPool configurations and TaskFactory parameters. These tests were run on a 1.6GHz dual core (hyper threaded to 4 cores), 4GB memory laptop. This spec will … Read More →
ThreadPool Thead Starvation
Generally speaking if you end up in a situation where your application is thread starved you probably need to rethink your architecture. However, there are times when using (or potentially misusing) the Task Parallel Library that this could become a genuine problem. The ThreadPool has a couple of settings that can be used to manage the minimum and maximum number of available threads in the … Read More →
SignalR Proxy Generator
I wanted to be able to create SignalR JavaScript Hub proxies at build time so I could compile them into a minimized file for an application I was working on to provide only a single JS download from the server and better code obfuscation. SignalR does not provide a tool out of the box to do this and the tool David Fowler created isn’t documented … Read More →
Using Multiple SignalR Hubs On A Single Page
When connecting to multiple hubs from a single page, SignalR automatically pools the underling connection between them all. If you look at a request that is sent to the server, it specifies a hub name so the server dispatches it to the correct hub for you: { ”H”: “marketupdaterhub”, ”M”: “UpdateMarket”, ”A”: [ { "MarketId": 4, "Selections": [ { "SelectionId": 4, "Price": 4 } ] … Read More →
SignalR Will Change Your Life
SignalR stated its life as a small open source project created by some developers from the Microsoft ASP. NET team which has subsequently been officially adopted and given full time resources from Microsoft, most noticeably David Fowler as the project lead. I once saw it described as “An easy to use high-level API that looks like magic” The NuGet package consists of 2 parts, a … Read More →
Task Exception Handling
The Task Parallel Library (TPL) has a nasty little quirk if you throw an unhandled exception during the tasks execution. When the finalized attempts to clean up the task and its resources it checks to see if there were any “unobserved” exceptions associated with it. If there were, it throws an exception inside the finalized to take out your entire application to make you aware … Read More →
Please Microsoft, Stop Hating Interfaces
I realise that back in 2002 when the .NET framework was born that unit testing and mocking weren’t at the forefront of development and that it was acceptable to avoid interfaces unless you needed to implement something with multiple concrete types. Now in version 4.5 of the framework, where TDD and BDD should be the first thing that you consider before you add a new … Read More →
Asynchronous Log4Net Appenders
I have spent the majority of my time over the last week performance profiling an enterprise application using ANTS Performance Profile. The results showed that we were having huge delays (over a second) on Log4Net when under load, which I thought was strange as it’s such a tried and tested logging framework. After some digging through their source code it’s evident that requests are processed … Read More →
Silverlight ChildWindow start up location
My first post of 2012 will be short and sweet. Despite being introduced in Silverlight 3, I have seen a lot of questions recently about being able to set a start up location of a ChildWindow in Silverlight. There is a common misconception that it can’t be set because there are no offset properties, however this is not true. It can be achieved using the … Read More →
