Roundup #52: .NET Core and systemd, System.Threading.Channels, screencastR, Configuration Pitfalls

Here are the things that caught my eye recently in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

.NET Core and systemd

In preview7 a new package was added to the Microsoft.Extensions set of packages that enables integration with systemd. For the Windows focused, systemd allows similar functionality to Windows Services, there is a post on how to do what we discuss here for Windows Services in this post. This work was contributed by Tom Deseyn from Red Hat. In this post we will create a .NET Core app that runs as a systemd service. The integration makes systemd aware when the application has started/is stopping, and configures logs to be sent in a way that journald (the logging system of systemd) understands log priorities.

Link: https://devblogs.microsoft.com/dotnet/net-core-and-systemd/

An Introduction to System.Threading.Channels

I’ve recently begun making use of a relatively new (well, it’s a little over a year old at the time of writing) feature called “Channels”. The current version number is 4.5.0 (with a 4.6.0 preview also available as pre-release) which makes it sound like it’s been around for a lot longer, but in fact, 4.5.0 was the first stable release of this package!

In this post, I want to provide a short introduction to this feature, which I will hopefully build upon in later posts with some real-world scenarios explaining how and where I have successfully applied it.

Link: https://www.stevejgordon.co.uk/an-introduction-to-system-threading-channels

screencastR – Simple screen sharing app using SignalR streaming

In this article, we will see how to create simple screen sharing app using signalR streaming. SignalR supports both server to client and client to server streaming. In my previous article , I have done server to client streaming with ChannelReader and ChannelWriter for streaming support. This may look very complex to implement asynchronous streaming just like writing the asynchronous method without async and await keyword. IAsyncEnumerable is the latest addition to .Net Core 3.0 and C# 8 feature for asynchronous streaming. It is now super easy to implement asynchronous streaming with few lines of clean code. In this example, we will use client to server streaming to stream the desktop content to all the connected remote client viewers using signalR stream with the support of IAsyncEnumerable API.

Link: https://jeevasubburaj.com/2019/08/13/screencastr-simple-screensharing-app-using-signalr-streaming/

Avoiding ASP.Net Core Configuration Pitfalls With Array Values

ASP.NET Core continues to improve on the legacy of the .NET Framework. Our team is impressed with its performance and excited about future possibilities, but change is seldom a smooth transition. In this post, I’ll explain a pitfall you may run into using the newest configuration model in .NET Core and options to mitigate the issue.

Link: https://rimdev.io/avoiding-aspnet-core-configuration-pitfalls-with-array-values/

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #35: Startup Hooks, HttpMaster, 7+M req/sec, Pre-Building Services, DockerComposeFixture

Here are the things that caught my eye this week in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

[C#] Have some fun with .net core startup hooks

One feature of .net core 2.2 that didn’t catch my mind immediately is the startup hooks. Put simply, this is a way to register globally a method in an assembly that will be executed whenever a .net core application is started. This unlocks a whole range of scenarios, from injecting a profiler to tweaking a static context in a given environment.

Link: https://medium.com/@kevingosse/c-have-some-fun-with-net-core-startup-hooks-498b9ad001e1

HttpMaster 4.3

Link: https://www.httpmaster.net/download

ASP.NET Core: Saturating 10GbE at 7+ million request/s

Looking at the latest run from the TechEmpower Benchmarks continuous results ASP.NET 2.2 is the 3rd fastest webserver (0.046% off the top spot); able to respond to 7 Million HTTP request per second

Link: https://www.ageofascent.com/2019/02/04/asp-net-core-saturating-10gbe-at-7-million-requests-per-second/

Reducing initial request latency by pre-building services in a startup task in ASP.NET Core

This post follows on somewhat from my recent posts on running async startup tasks in ASP.NET Core. Rather than discuss a general approach to running startup tasks, this post discusses an example of a startup task that was suggested by Ruben Bartelink. It describes an interesting way to try to reduce the latencies seen by apps when they’ve just started, by pre-building all the singletons registered with the DI container.

Link: https://andrewlock.net/reducing-latency-by-pre-building-singletons-in-asp-net-core/

DockerComposeFixture

I happen to catch this twitter thread and noticed Khalid posted a link to this GitHub repo.

A XUnit fixture that allows you to spin up docker compose files and then run tests against them.

Link: https://github.com/devjoes/DockerComposeFixture

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.

Roundup #32: System.IO.Pipelines, Libraries vs Frameworks, Performance Profiling in Rider, Cyclomatic Complexity, Lessons from the Birth of Microservices

Here are the things that caught my eye this week in .NET.  I’d love to hear what you found most interesting this week.  Let me know in the comments or on Twitter.

High Performance IO with System.IO.Pipelines

Pipelines was born from the work the .NET Core team was doing to make it easier to do high performance IO in .NET.

In this episode, Pavel Krymets (@pakrym) and David Fowler (@davidfowl) come on the show to give us an overview of how the Pipelines programming model works, as well as give show us a few demos on how to use the API.

Link: https://www.youtube.com/watch?v=1koWtKkKb_o

Libraries vs Frameworks w/ Dennis Doomen

Dennis Doomen is on an everlasting quest for better solutions that will significantly improve the efficiency, the quality and the productivity of your software development teams.

And among other things he is the author of Fluent Assertions, an API for asserting the results of unit tests in .NET.

Link: https://6figuredev.com/podcast/episode-074-libraries-vs-frameworks-w-dennis-doomen/

Performance Profiling in Rider

If you’re an active Rider 2018.3 user or just follow our blog, you probably know that Rider just got an integrated performance profiler based on JetBrains dotTrace. Though we’ve already reviewed the profiler features on the EAP stage, the release version brings some important changes, especially concerning profiling session configuration. Read this post to learn more about the changes.

Link: https://blog.jetbrains.com/dotnet/2019/01/17/performance-profiling-rider-2018-3-whats-new/

Rider Cyclomatic Complexity Plugin

Link: https://plugins.jetbrains.com/plugin/10395-cyclomaticcomplexity

What We Got Wrong: Lessons from the Birth of Microservices

Ben Sigelman talks about what Google got wrong about microservices, the lessons learned along the way and how to apply those lessons today.

Link: https://www.youtube.com/watch?v=-pDyNsB9Zr0

Enjoy this post? Subscribe!

Subscribe to our weekly Newsletter and stay tuned.