RE:INVENT “We found that .NET open source is heavily under-funded,” said Saikat Banerjee, an AWS software development manager, at a re:Invent session this week.
“The sad thing about .NET open source is that we still call it third-party open source. That should not be the case.”
At the session, AWS spoke about its support for open source .NET, including funding and AWS credits for projects, porting tools from the Windows-only .NET Framework, code contributions in an effort to port the Windows Communication Foundation (WCF) framework to cross-platform .NET, and code to enable Active Directory connectivity from Linux containers.
Why is the cloud giant an enthusiast for Microsoft’s technology? “The last two years, we’ve spent a lot of time getting customers from .NET Framework to .NET Core, so customers can get away from Windows and SQL Server licenses and use Linux and Cloud native technologies,” said Mayur Dewaikar, an AWS senior product manager.
.NET Core (now officially just called .NET) is the open source, cross-platform version, first released in 2016. Porting applications is not always straightforward. Applications that call COM or other native Windows APIs will not work on Linux, and parts of the .NET Framework, including ASP.NET Web Forms and much of Windows Communication Foundation (WCF) are not part of .NET Core.
It is an odd situation, where AWS is investing in one part of Microsoft’s development platform in order to help its customers migrate away from other parts. The claim of underfunding for .NET open source may also seem surprising, given that Microsoft set up the .NET Foundation which says it is “an independent, non-profit organization established to support an innovative, commercially friendly, open-source ecosystem around the .NET platform.” AWS is listed as one of just 10 corporate sponsors.
The path of open source .NET has not been smooth, though, and a series of incidents last year included an admission from a board member that it “violated the trust of project maintainer.” A tussle over a .NET feature which Microsoft removed from open source .NET for the benefit of Visual Studio, before apologizing and reinstating it, was another reminder of the company’s ambivalence towards the open source aspect of .NET.
That said, Microsoft’s .NET team has put plenty of energy into the platform and at a technical level, welcomes the efforts of external contributors including AWS. One notable example is the work on WCF. “The Core WCF project was started by a developer in Microsoft in the WCF team,” said Banerjee. “We got connected with that individual very early in the development and have been working together since. We are in lockstep with Microsoft on this project.”
According to Banerjee, AWS is trying to “improve WCF, not leave it with the limitations it had.” The work includes federated identity support for HTTP bindings, and work to extend WFC message queuing support “to include other message brokers” alongside Microsoft Message Queue (MSMQ), such as RabbitMQ and Amazon SQS (Simple Queuing Service).
“We have contributed to a design that provides a layer for that messaging framework, so you can provide an implementation of the messaging framework you want to use.”
Another key area is Active Directory (AD). “A project we have been working on this year is AD connectivity from Linux containers,” said Banerjee. “When customers start modernizing, they told us that it’s hard to get away from AD, because AD connects all of their organization.”
In Windows AD a Group Managed Service Account (gMSA) is often used as an account for application services. “That’s a great architecture than can be ported to Linux,” said Banerjee. AWS worked on a component called credentials fetcher. “It’s a daemon that sits on your Linux instances,” he said. This enables use of gMSAs in Linux containers.
A third area which keeps some .NET applications wedded to Windows is ASP.Net Web Form applications. “There is no way for customers to port a Web Forms application to .NET Core,” said Banerjee.
AWS is not attempting to implement Web Forms for Linux, but has added a Web Forms to Blazor capability in its Porting Assistant for .NET, Blazor being a web application technology that does work in .NET Core. “This is far from complete,” Banerjee said, “and we request the community to chip in.” The team is also considering options to port Web Forms applications to AngularJS or ReactJS.
Serverless .NET, specifically on Lambda, is another tricky problem. “Customers told us, when they were launching Lambdas with .NET, there is a constant cold start problem. The issue is not only the need to load the .NET runtime every time a function runs, but also “the JIT (just in time) compiler kicks in every time to compile .NET intermediate code to native code and that also takes a long time.”
The solution in the recent .NET 7 release is AOT (Ahead of Time) compilation. AWS has therefore worked on Lambda tools for .NET that add native AOT compilation to Lambda functions. The newly announced SnapStart technology for Lambda may also help with this, though currently only Java is supported.
On the community side, AWS is offering up to $5,000 each for up to 10 community projects, as well as AWS credits.
“Right now .NET is the third most popular platform behind Python and Java for app development at AWS,” said Dewaikar.
Even if Microsoft’s Azure cloud is a better fit for .NET applications, businesses that have standardized on AWS may want to run their .NET code alongside their other cloud deployments. These efforts to take Windows out of .NET also benefit Azure users though, since many of the same arguments apply there. Linux VMs or app services are more cost-effective and using Linux containers helps with Kubernetes deployments. That is the nature of open source; the investment from AWS is helpful for Microsoft customers too. ®