Mid-Life Crisis and Polly

Problem

I have been working on an application sending out millions of HTTP Post requests. The application has an issue, it has a high memory usage. It is using 2 GB over the expected of a few hundred megabytes.

An investigation revealed that a percentage of (random) requests are failing because of invalid request content. When a request fails, the application has a built in resiliency policy to wait with an exponential backoff and retry the failed requests. Unfortunately, that failed request is determined to fail again, hence triggering the above policy 3 times, before giving up for all.

One could figure, that the retry policy is referencing the failing requests for considerably longer period in memory. Let's not trust our gusts but do some measurements instead.

Find out more


Animating Graph on Azure IoT DevKit

In the previous post I have shown how an image can be generated by an Azure Function and sent to IoT DevKit to display it.

In this post, I will show how that given image can be animated on the device.

The goal is to animate the graph from left to right, so it shows the measurements first closer to the y-axis, and the one further (to the right) only at a later time. I am not going to propose a generic animation algorithm, but rather an efficient and specific to this problem.

DeviceAnimation

Find out more


Personality Chat Integration to Bots

There is a library and service called Personality Chat that can be integrated to a chat bot so add small talk capabilities. The interesting part of it is that you can provide a personality type like professional, friendly, humorous.

I have a LUIS chat bot, so it is an exciting option to me to integrate this capability to my bot. I have been using BotBuilder v4 SDK, and Personality Chat provides an integration point with that too. Integration itself seems simple, based on the provided samples and documentation, all you need is to setup a middleware for your bot during startup.

Tryout

The real story is a bit more involved, hence this post is born. The current status of the library is an alpha nuget package. It is referencing an alpha build of the BotBuilder v4 SDK too, which contains breaking changes. For this reason, you won't be able to add middleware to your bot, you will get a compile error.

Find out more


Build 2019

Here are the build videos from 2019, that I suggest for watching (besides the keynotes). These sessions mostly focus on serverless, microservices, .net and C# topics. This list does not include the keynotes.

.NET and C#

Serverless and Blazor

Find out more


Deep Dive in Ref Returns

In the previous post I have used Ref returns to return some data. I noticed that with slight changes we get totally different code generated by the JIT, which is can have a good or bad effect on our code.

In this post, I will dig deep (with WinDbg) in the JIT generated code. As forefront: I am using 64 bit machine, .net core 2.1 and RyuJIT.

I created a sample benchmark to showcase. I have a Point struct with 2 integer properties. I benchmark setting the values on the struct in 3 different ways, I show related IL and machine code impacting performance.

The benchmark

Find out more