Data Model Async

Hi, I saw million times solution with ThreadPool or sometimes event with new async keyword in C# 5.0. And so many times, I want to tell people that they’re doing it in the wrong way. About a half year ago, someone told me I tend to keep too much only for me. I am trying to change this. So, what is the best way to do async? It uses a data model Continue ReadingData Model Async

Performance Manager Aspects (New)

Hi today I created powerful combination of performance aspects. First MemoryManagerAspect<T> and second ThreadsManagerAspect. Both of that ideas are for high-speed services created on multicore systems. I will show you code that produce following output that can be a proof that it is possible to create very low latency and asynchronous code in C#. This code was produced by Idea of two performance aspects. First, manages memory to help in garbage collector Continue ReadingPerformance Manager Aspects (New)

WebSockets on Windows Server 2012 with WCF 4.5 after TuneUp

Hi, today I try to tune up my last example with very trivial way with buffer. Now my example is much faster. Buffer for sending data usually has an array form. In my example, I change the “double value” into the “params double[] values” parameter. With that modification, older implementations can still work just fine, but when someone wants to use buffered array values, it is possible now in an elegant way. Continue ReadingWebSockets on Windows Server 2012 with WCF 4.5 after TuneUp

WebSockets on Windows Server 2012 with WCF 4.5

Hi, today I was wandering about new features in .NET 4.5 and I try to examine in practice WebSockets feature. This feature is supported by Windows Server 2012 only. And I try to find an elegant example of running it. There was no interesting and elegant solution on the Internet, so I prepared my own for this blog entry. I used Visual Studio 2012 to implement 3 assemblies, WebSocketsSandbox.Contracts with interfaces, WebSocketsSandbox.Server Continue ReadingWebSockets on Windows Server 2012 with WCF 4.5

The Powerful Async Pattern in .NET and C# 5.0 with Async CTP1

Hi, in my blog entry The Powerful Async Pattern in .NET 1.1 without TPL and Async CTP1 I wrote about async pattern in .NET 1.1. And today, I would like to show a pattern with Async CTP1 for .NET and C# 5.0. The example code is very similar except for the RunAsync method that I will show below. And below is an output with results. So, as you can see, results are Continue ReadingThe Powerful Async Pattern in .NET and C# 5.0 with Async CTP1

The Powerful Async Pattern in .NET 4.0 with Parallel

Hi, in my blog entry The Powerful Async Pattern in .NET 1.1 without TPL and Async CTP1 I wrote about async pattern in .NET 1.1. And today, I would like to show a pattern with Parallel for .NET 4.0. The example code is very similar except for the RunAsync method, which I will show below. And below is an output with results. So, as you can see, results are similar to the Continue ReadingThe Powerful Async Pattern in .NET 4.0 with Parallel

The Powerful Async Pattern in .NET 4.0 with Tasks

Hi, in my blog entry The Powerful Async Pattern in .NET 1.1 without TPL and Async CTP1 I wrote about async pattern in .NET 1.1. And today, I would like to show a pattern with tasks for .NET 4.0. The example code is very similar except for the RunAsync method that I will show below. And below is an output with results. So, as you can see results are similar then last Continue ReadingThe Powerful Async Pattern in .NET 4.0 with Tasks

The Powerful Async Pattern in .NET 2.0 with Threads

Hi, in my last blog entry The Powerful Async Pattern in .NET 1.1 without TPL and Async CTP1 I wrote about async pattern in .NET 1.1. And today, I would like to show patterns with threads for .NET 2.0. The example code is very similar except for the RunAsync method that I will show below. If you would like to test it you need last entry code and replace only this method Continue ReadingThe Powerful Async Pattern in .NET 2.0 with Threads

The Powerful Async Pattern in .NET 1.1 without TPL and Async CTP1

Hi, today I would like to show you Async Pattern for .NET 1.1 and C#. I prepared a training workshop on this subject, and this is one of my excellent examples. So, below I will show you an example test code of the entire async versus sync performance measurement solution. You may wonder how that is possible in .NET 1.1 without the Task Parallel Library and the async keyword? The answer is Continue ReadingThe Powerful Async Pattern in .NET 1.1 without TPL and Async CTP1

The async keyword implementation in the C# language

Hi, today I would like to show you what is a new async keyword of the C# 5.0. This keyword means that your method will be invoked asynchronously, and you can invoke it, and .NET Framework waits for results. You can simply invoke the method, and the magic happens. This blog entry will be concise. I will try only to show you one example of using the async keyword. That example is Continue ReadingThe async keyword implementation in the C# language