Frameworks for .NET developers for the 2021 fall season.

Stas(Stanislav) Lebedenko
Geek Culture
Published in
6 min readOct 16, 2021

--

TLDR; In this overview article I will make an introduction to modern stuff like DAPR, TYE, Nomad, Consul, KEDA, .NET 6, Azure Container Apps. I find them exciting and worthy of your learning time this fall. So you can start a new year with a green-field project or maybe a new job :).

  • DAPR - distributed application runtime based on the Open Application Model.
  • TYE - developer tool for microservices.
  • KEDA - Kubernetes-based Event-Driven Autoscaler.
  • .NET 6 and new features for Entity Framework, Azure Functions, etc.
  • Azure Container Apps(wrapper over Kubernetes) to run them ↑ all :).
  • Nomad and Consul - container orchestrator and service mesh from HashiCorp.

Let's talk about DAPR.

I love pluggable components, yes Kubernetes provides the ability to port your application around different cloud providers and even on-premises, but changing components is hard, especially if you need to replace SDK components in your code. It takes time, effort and results in a lot of bugs for complex products.

I had the experience porting applications from Azure Functions to Kubernetes and then to on-premises clusters. While it went well, it was a lot of change in terms of message brokers, state storage, and configuration to limit developers ability to call services where they shouldn't have access.

And version 1 of DAPR brings salvation, but before we proceed to the other topics, consider the pictures below from https://oam.dev/ that explain the Open Application Model in detail.

Let's talk about TYE.

TYE is an experiment at the moment, that tries to remove the complexity of working with Microservices for .NET developers. Personally, I think it will become a part of DAPR at some point in time, but we will see. Btw, it has 3.8k stars on GitHub, which is more than DAPR :),

So, how it exactly helps?

  • Provides service discovery
  • Runs application that contains many microservices with a single command
  • Can automatically containerize .NET applications
  • Can generate Kubernetes manifests, which is a pain for everyone
  • Can deploy your services to Kubernetes

So, as you can see it is the additional command line that aims to solve your problem with Kubernetes :)

Let's talk about KEDA.

Essentially KEDA provides a solution for the event-driven scale of containers on Kubernetes, it is especially useful when you use it for the tight integration with existing apps that uses message brokers. You can fine-tune autoscaling configuration and even scale down from and to zero instances.

I have several successful cases of KEDA usage with applications hosted in Kubernetes across on-premises deployments of cloud-native applications.

The key components are scalers, that provided by Microsoft development teams or community contributors. And it is growing super fast, the current version is 2.4.0 and at the moment GitHub repository has 3.7k stars

And last, but not least it is part of the Cloud Native Computing Foundation (CNCF).

Let's talk about the upcoming .NET 6 release.

One .NET to rule them all (c), there will be no two frameworks going forward.

The major feature was a “.NET hot reload” feature, that was announced, removed from CLI, and brought back after the #$%t storm in the community :). Link.
So after release, you will be able to modify the application code while the application is running :).

Azure functions v4

Let's start with important updates to Azure Functions - we will get Azure Functions V4 with the full support of .NET 6

Be aware of the deprecation of Azure Functions Proxy functionality, which was a “poor man” gateway solution introduced with functions, we successfully used it with several projects - and now the only way is to use API Management service.

New isolate model to run function code in the separate process from Azure Functions host, this will allow flexible usage of a wide range of dependencies without conflicts with the main host and much move advanced startup configuration.

In-process function V4 will be based on .NET 6 and released shortly after the .NET release, they will backward compatible with V3. But we will see how the upgrade will go, we intend to upgrade as soon, as they are released.

C# v10

I really think that each language version brings more fun to the developer's life, I can still recall when I worked with C#6 for straight 4 years and it was boring as hell.

Some cool features from my perspective

  • Minimal API, as simple as below.
using Microsoft.AspNetCore.Builder;var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
app.MapGet("/hello", () => "Hello, World!");app.Run();
  • DateOnly And TimeOnly Types, super neat and removes a lot of headaches :)
DateOnly date = DateOnly.MinValue;
TimeOnly time = TimeOnly.MinValue;
  • Global using directives
  • Assignment and declaration in the same deconstruction
int x = 0;
(x, int y) = point;
  • New collection PriorityQueue, yes I know that there were C5 NuGet :)
  • No need to check for null, if you throwing an exception
ArgumentNullException.ThrowIfNull(yourParameter);
  • MaxBy/MinBy small and neat stuff with
users.MaxBy(x => x.Age);
// Instead of
users.OrderByDescending(x => x.Age).First();

Entity Framework Core 6 LTS

  • Attempts to reach Dapper performance, not there yet :)
  • No support for SLQ upserts :(
  • Updated CosmosDB provider :)
  • Migration updates, squash, bundles, etc
  • No serious breaking changes (Like 2.2 to 3.1)

Let’s talk about the Azure Container Apps service.

I`m super excited about this particular announcement because it was a long-awaited preview and solution to the manual configuration of Kubernetes and yes, it is built on it and contains other open-source frameworks like Kubernetes, Dapr, KEDA, Envoy.

And this service might change the landscape of mine deployments and architectures after GA because it is easily interoperable with your solution build for Kubernetes. It can scale containers to zero, scale-out them on a basis of HTTP or other pub/subs and streams.

Let's talk about Nomad and Consul.

Kubernetes is a standard, but is it easy? Nope, it has a lot of complexity to tackle and in most cases, you don't need this extra tooling to run your workloads. So creators of Terraform come to help us with something much simpler to get the job done. Focused on scheduling and cluster management.

Nomad has a much simple networking model along with slightly different concepts like Job, Task, Task Group, and Allocation. I encourage you to try it and start with https://www.nomadproject.io/docs/install.

Consul project is yet another service mesh and service discovery solution:) and compliments Nomad in every way. Yes, networking with a zero-trust security approach without much overhead is what was promised by Consul. It is available as a self-managed open-source, managed cloud model with SLAsand Enterprise self-managed custom deployed solution.

There is a great comparison of Consul and Istio available via official documentation, so I just briefly highlight some features like automatic TLS certificate management, one service to install and manage, built-in proxy, identity to the network layer only, an agent-based model with a Consul Client deployed to each node.

--

--

Stas(Stanislav) Lebedenko
Geek Culture

Azure MVP | MCT | Software/Cloud Architect | Dev | https://github.com/staslebedenko | Odesa MS .NET/Azure group | Serverless fan 🙃| IT2School/AtomSpace