Roundup #63: MessagePack v2, ApiCompat, Serilog RequestLogging, AWS Secrets, .NET Conf Blazor

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.

Follow @CodeOpinion on Twitter

MessagePack for C# v2, new era of .NET Core(Unity) I/O Pipelines

MessagePack for C# Version 2 was released in 2019–12–16. The main implementation was done by Andrew Arnott who is a software engineer at Microsoft, Visual Studio Team. I checked the API design and performance and took care of the Unity compatibility. This collaboration took almost a year, and I think we did a great job.

Link: https://medium.com/@neuecc/messagepack-for-c-v2-new-era-of-net-core-unity-i-o-pipelines-6950643c1053

Check for Breaking Changes with ApiCompat

When we maintain a library that’s used by others, we want to shield them from breaking changes and use SemVer as a way of indicating breaking changes when they do occur. If our public API changes in a way that is considered a breaking change, wouldn’t it be great if we were notified so that we can bump that major version number?

Link: https://stu.dev/check-for-breaking-changes-with-apicompat/

Reducing log verbosity with Serilog RequestLogging

One of the great aspects of ASP.NET Core is that logging is built-in to the framework. That means you can (if you want to) get access to all the deep infrastructural logs from your own standard logging infrastructure. The down side to this is that sometimes you can get too many logs.

Link: https://andrewlock.net/using-serilog-aspnetcore-in-asp-net-core-3-reducing-log-verbosity/

Securing your .Net Core Container Secrets

As customers move .NET workloads to the cloud, many start to consider containerizing their applications because of the agility and cost savings that containers provide. Combine those compelling drivers with the multi-OS capabilities that come with .NET Core, and customers have an exciting reason to migrate their applications. A primary question is how they can safely store secrets and sensitive configuration values in containerized workloads. In this video, learn how to safely containerize an ASP.NET Core application while leveraging services like AWS Secrets Manager and AWS Fargate.

Part 1

Part 2

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

.NET Conf: Focus on Blazor

.NET Conf: Focus on Blazor is a free, one-day livestream event that features speakers from the community and .NET product teams that are working on building web apps with C# and Blazor. You don’t need to use JavaScript anymore with Blazor technology! Blazor lets you build interactive web UIs using C# instead of JavaScript.

Link: https://focus.dotnetconf.net/

Follow @CodeOpinion on Twitter

Software Architecture & Design

Get all my latest YouTube Vidoes and Blog Posts on Software Architecture & Design

Roundup #62: ConfigureAwait, System.Threading.Channels, New Executive Director of .NET Foundation, Event Driven Collaboration, What You Need to Know About Open Source

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.

Follow @CodeOpinion on Twitter

ConfigureAwait FAQ

.NET added async/await to the languages and libraries over seven years ago. In that time, it’s caught on like wildfire, not only across the .NET ecosystem, but also being replicated in a myriad of other languages and frameworks. It’s also seen a ton of improvements in .NET, in terms of additional language constructs that utilize asynchrony, APIs offering async support, and fundamental improvements in the infrastructure that makes async/await tick (in particular performance and diagnostic-enabling improvements in .NET Core).

However, one aspect of async/await that continues to draw questions is ConfigureAwait. In this post, I hope to answer many of them. I intend for this post to be both readable from start to finish as well as being a list of Frequently Asked Questions (FAQ) that can be used as future reference.

To really understand ConfigureAwait, we need to start a bit earlier…

Link: https://devblogs.microsoft.com/dotnet/configureawait-faq/

An Introduction to System.Threading.Channels

“Producer/consumer” problems are everywhere, in all facets of our lives. A line cook at a fast food restaurant, slicing tomatoes that are handed off to another cook to assemble a burger, which is handed off to a register worker to fulfill your order, which you happily gobble down. Postal drivers delivering mail all along their routes, and you either seeing a truck arrive and going out to the mailbox to retrieve your deliveries or just checking later in the day when you get home from work. An airline employee offloading suitcases from a cargo hold of a jetliner, placing them onto a conveyer belt, where they’re shuttled down to another employee who transfers bags to a van and drives them to yet another conveyer that will take them to you. And a happy engaged couple preparing to send out invites to their wedding, with one partner addressing an envelope and handing it off to the other who stuffs and licks it.

Link; https://devblogs.microsoft.com/dotnet/an-introduction-to-system-threading-channels/

Welcoming Oren Novotny as the new Executive Director of .NET Foundation

I started as .NET Foundation Executive Director in February 2017, and a lot has happened over the past nearly three years. We’ve added dozens of high quality projects and added a lot of services to support them, like automated code signing and releases. We launched a worldwide Meetup program that includes over a quarter of a million members, and supported them with hundreds of local events in our .NET Conf Local series. We’ve also ushered in substantial changes, literally years in the making, to open up membership, run an election for the board’s first elected directors, introduce a corporate sponsorship program, and lay the groundwork for the .NET Foundation to grow into its next stage. 

Link: https://www.dotnetfoundation.org/blog/2019/12/16/welcoming-oren-novotny-as-the-new-executive-director-of-net-foundation-

Event Driven Collaboration – Ian Cooper

When we move from a monolith to microservices we abandon integrating via a shared database, as each service must own its own data to allow them it to be autonomous. But now we have a new problem, our data is distributed. What happens if I need one service needs to talk to another about a shared concept such as a product, a hotel room, or an order? Does every service need to have a list of all our users? Who knows what users have permissions to the entities within the micro service? What happens if my REST endpoint needs to include data from a graph that includes other services to make it responsive? And I am not breaking the boundary of my service when all of this data leaves my service boundary in response to a request?

Naive request-based solutions result in chatty calls as each service engages with multiple other services to fulfil a request, or in large message payloads as services add all the data required to process a message to each message. Neither scale well.

In 2005, Pat Helland wrote a paper ‘Data on the Inside vs. Data on the Outside’ which answers the question by distinguishing between data a service owns and reference data that it can use. Martin Fowler named the resulting architectural style; Event Driven Collaboration. This style is significant because it shifts the pattern from request to receiver-driven flow control.

In this presentation we will explain how events help us integrate our service architectures. We’ll provide examples in C#, Python and Go as well as using RMQ and Kafka.

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

What You Need to Know About Open Source – Trust Me, I’m a Lawyer – Jeff Strauss

eff is a software developer, an entrepreneur, and an attorney. As a consultant at WWT Asynchrony Labs, with unique experiences that combine technology and law, he maintains a passion for solving problems with inspired solutions, improving life through technology. A dedicated member of the developer community, Jeff travels internationally to speak on both technical and business-oriented topics. He is a Microsoft MVP and enjoys serving on the board of directors for the Kansas City Developer Conference.

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

Follow @CodeOpinion on Twitter

Software Architecture & Design

Get all my latest YouTube Vidoes and Blog Posts on Software Architecture & Design

Roundup #59: IHostingEnvironment vs IHostEnvironment, Async demystified, Pulumi, Memory management and GC in ASP.NET Core

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.

Follow @CodeOpinion on Twitter

IHostingEnvironment vs IHostEnvironment – obsolete types in .NET Core 3.0

In this post I describe the differences between various ASP.NET Core types that have been marked as obsolete in .NET Core 3.0. I describe why things have changed, where the replacement types are, and when you should use them.

Link: https://andrewlock.net/ihostingenvironment-vs-ihost-environment-obsolete-types-in-net-core-3/

Async demystified – Karel Zikmund

Do you struggle to understand async/await in C#? How it works and why? I did. So I asked the best – the author of async, Stephen Toub. This talk is summary of the most interesting insights from him that helped me and my colleagues on CoreFX team to finally truly understand the magic behind async/await.

The talk will cover: History and evolution of asynchronous programming patterns in C# and their problems. Leading to async/await and demonstrating the “why” behind its design choices.

Touch on the “how” it works behind the scenes.

Reasons for customizing and hyper-optimizing async for high-performance areas (like Networking stack).

Touch on related building block – ThreadPool.

Hands on sync-over-async pattern and associated problems. Workarounds in your code if you hit it. Potential solutions in future .NET versions.

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

Pulumi 💜 .NET Core

Today we are excited to announce the Preview of .NET Core support for all of your modern infrastructure as code needs. This means you can create, deploy, and manage your infrastructure, on any cloud, using your favorite .NET language, including C#, F#, and VB.NET.

Link: https://www.pulumi.com/blog/pulumi-dotnet-core/

Memory management and garbage collection (GC) in ASP.NET Core

Memory management is complex, even in a managed framework like .NET. Analyzing and understanding memory issues can be challenging. This article:

Was motivated by many memory leak and GC not working issues. Most of these issues were caused by not understanding how memory consumption works in .NET Core, or not understanding how it’s measured.

Demonstrates problematic memory use, and suggests alternative approaches.

Link: https://docs.microsoft.com/en-us/aspnet/core/performance/memory?view=aspnetcore-3.0

Follow @CodeOpinion on Twitter

Software Architecture & Design

Get all my latest YouTube Vidoes and Blog Posts on Software Architecture & Design