Memory dump with Nano server and Docker

In this post I will detail the steps to create a memory dump for an application which runs in a docker container on Windows Nano server.

Here, I would like to thank @gaborpro for his suggestions throughout the process.

Let's assume we have a .net core application being developed, the application will run in a container based on an image with Windows Nano. At some point we will need to create a memory dump of our application to investigate performance issues. To get started a tool (an exe) needs to be available in the container for creating the dump file. There are several ways to achieve this:

  1. Include the tool along with the application (COPY it in the dockerfile)

  2. Extend the base image

  3. Use docker cp command to copy it (if the command is supported on your platform)

  4. Map an external drive (as a volume) with the tool available on the drive

Find out more


Chatbots: where are you?

Creating a chatbot seems easier then ever. Or is it?

There are several frameworks and services making the life of developers easier, such as the bot framework and LUIS. But when someone starts to cover more-and-more real-life use cases it turns out that the developer still has a lot to do.

One of these challenges I faced in my chatbot comes from getting the user's location.  In bot framework, some channels might provide contextual information along with the user, such as Cortana, which can provide the user's actual location. This comes very handy, when our chatbot needs to know the user's actual location is.

Understanding the user

Find out more


Intercepting Service Fabric remoting calls

In the previous post I described how we can update remoting calls from V1 to V2 in Service Fabric. In this post, I am describing how we can intercept V2 remoting calls and add custom headers. I will share the related code samples for Stateful and Stateless services as-well-as Actors.

The goal will be to add a custom header entry on the client side, while the service side would read (and possibly use) the value of the header value.

Background

Find out more


Understanding Span

C# 7.2 has introduced Span<T> along with a some language features so developers can better optimize code when using structs / value types.

To goal of this post is to (instead of explaining) present a collection of articles and blog posts that help the reader to fully understand these new features.

Let's start by the new features. The following article shall explain

  • in keyword

  • ref readonly

  • readonly struct

  • ref struct

Find out more


Custom VS Snippets

The 'copy-paste' task of developers has to be automatized. It is done by continuous improvement of languages, compilers, design patterns, libraries, packages, components, etc.

Having code templates is a bit of a different story. I have been using R# templates for a couple of years, and one can get really used to it.

Recently I have decided to plainly use Visual Studio, without the R#. One challenge I have is to move all my templates to VS snippets. I tend to use 6 snippets the most often:

  • Argument validation

  • Log informational message

  • Log error message

  • Create a test method

  • Create test setup method

  • Create test tear down method

Find out more