ETW Logging implementation for Service Fabric

ETW Logging is suggested for Service Fabric application. ETW has numerous advantages, but the biggest one is being extremely fast.

Preamble

This is poor man's logging. Consider using existing libraries in production applications, such as EventFlow.

The EventSource

Find out more


Perfomance of Mapping C# Poco objects 1

In the series of the following posts, I will explore a couple of ways to map one object to another object, and will measure the performance of these methods.

The task will be map 2 types to each other:

public class People1
{
  public int Age { get; set; }
  public string FirstName { get; set; }
  public string LastName { get; set; }
  public Guid Id { get; set; }
  public double Weight { get; set; }
  public double Height { get; set; }
  public string NationalId { get; set; }
  public God1 God { get; set; }
}
public class People2
{
  public int Age { get; set; }
  public string FirstName { get; set; }
  public string LastName { get; set; }
  public Guid Id { get; set; }
  public double Weight { get; set; }
  public double Height { get; set; }
  public string NationalId { get; set; }
  public God2 God { get; set; }
}

public class God1
{
  public string Name { get; set; }
}
public class God2
{
  public string Name { get; set; }
}

Measurement

Find out more


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