Multi Service Bus Core Released

Hi, today, the .NET Core 2.0 was released, so I am happy to announce that Multi Service Bus Core is now ready for production. I developed it on macOS Sierra 10.12.6, and below, you can find the test results of this ready-for IoT and Multi-Core coding library… I did not change anything in the code from the last post about Multi Service Bus Core, so you can download it from that post Continue ReadingMulti Service Bus Core Released

PL Lotto Predictor in C# with Encog 3.3

Yes, I know that it is impossible to predict lottery results. But if the results would be predictable? Of course, I know they are not, but just hypothetically, for a play with Perceptron Neural Network and prediction algorithms, I want to show you that in 250 lines of code, you can play with prediction thanks to the Encog 3.3 library. I recently bought 2 of Jeff Heaton’s  books about neural networks and Continue ReadingPL Lotto Predictor in C# with Encog 3.3

ParallelExecutorAspect in C#

Hi, today I would like to share with you idea of right parallel execution of actions/methods. Imagine at the beginning that you have a queue of messages and even some threads that, in parallel, get messages from the queue and then do background work. If that message executes actions on the relational database, you will quickly find that some of your work is done right. Still, you get timeouts, deadlocks, or any Continue ReadingParallelExecutorAspect in C#

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

Fluent Transform Extensions

Hi, today I would like to show you how trivial ETL in C# 4.0 can be. Many times we need to transform model objects from one kind to another. I try to prepare for today easiest way to do that. I prepared a small helper class with extensions for our objects with the following three methods: Serialize, Transform, and Deserialize. You may wonder how it works. Below I show you an example. Continue ReadingFluent Transform Extensions

MultiThreadingProtectorAspect

Hi, today I would like to share with you another aspect for protection service method in multi-threading environment. I also examine how fast this solution is and how much CPU time it consumes. Today’s implementation is extended for most popular usage, and it is a method that returns a value and is still protected. I will try to show you a test program that will be a kind of console application invoker. Continue ReadingMultiThreadingProtectorAspect

MultiThreadingProtectorAspect

Hi, Have you ever wants to protect your method against many concurrent thread in multi-threading environment? Let’s say you have WCF service implementation. In that implementation, the best practice is to create a static class with static methods because of performance (static is about 40% faster than non-static). Oh, right, and let’s say that you need to access something, for example, a file stored in that file, or you have a field Continue ReadingMultiThreadingProtectorAspect