Make the simple easy. Make the complex possible.
129 karma · joined November 15, 2010
Make the simple easy. Make the complex possible.
Why? .NET Core 1.x tried making everything a Nuget package and it was a disaster. ASP.NET is big which meant a huge number of dependencies, easy to create conflicts, long restore and build times.
It was much better to just include ASP.NET Core in the box with .NET and simplify it down to a single reference. And most people use the web SDK which does it for you so they don't even need that.
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<OutputType>exe</OutputType>
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
</Project>
Just create an empty ASP.NET Core project, change the SDK, add a FrameworkReference and a OutputType.Read the console args and configure the web app with a port as desired.
What did you need to do to create an empty website?
Disclaimer: I work on ASP.NET Core
The headers frame, and the capability to have headers before AND after content is a requirement. gRPC requires trailing headers for the status code of the call. Trailing headers frame is a new concept in HTTP/2.
gRPC-Web supports HTTP/1.1 and browsers. It is able to do that by encoding the status into the end of the response body. However gRPC-Web is a different spec.
If HTTP/3+QUIC supports the same features of HTTP/2 then gRPC should work on it. There might be a HTTP/3 specific spec for details around the management of a HTTP/3 connection, but gRPC headers, message content, and proto contracts shouldn't need to change. Take what I say with a grain of salt because I haven't looked closely at HTTP/3+QUIC yet.
gRPC client requires HTTP/2, and HttpClient (the .NET library for making HTTP requests) didn't previously support HTTP/2. The gRPC client actually supports netstandard2.1. Any .NET implementation that supports HTTP/2 should support running the gRPC client.
Kestrel (the .NET web server) already supported HTTP/2 but it required some new features in .NET 3.0 to fully support hosting gRPC services.
1. They attempted to trick the UQM project leadership into signing a document that said Stardock owned the rights to everything in Star Control II. Stardock would then "generously" license rights back to the UQM project as "protection". In reality it would put the free game under Stardock's thumb[1]
2. There are leaked conversations of the owner of Stardock labeling the UQM forum and star-control.com as hostile to his company and how he is going to shut them down
3. There are two subreddits for Star Control. The fan owned /r/starcontrol and the Stardock owned /r/StarControlOfficial. An unknown reddit account took over /r/starcontrol under strange circumstances and sowed havoc for a couple of days before reddit intervened and removed the new mod. There are theories that Stardock was behind it.
Duplication exists with generics and value types, e.g. List<long> and List<DateTime> are entirely separate code. It's just a thing to keep in mind when mixing them with value types.
What? LINQ is terrific.
https://blogs.windows.com/buildingapps/2015/08/20/net-native...
One great feature of .NET Native is that the compiler is capable of being hosted in the cloud. When you build your Store package in Visual Studio, two packages are created – one .appxupload and one “test” .appx for sideloading. The .appxupload contains the MSIL binaries as well as an explicit reference to the version of the .NET Native toolchain your app consumes (referenced in the AppxManifest.xml). This package then goes to the Store and is compiled using the exact same version of the .NET Native toolchain. Since the compiler is cloud hosted, it can be iterated to fix bugs without you having to recompile your app locally.
When .NET UWP applications are uploaded the store pre-compiles them on the server with .NET Native. The user only downloads and executes native code.
The reason for the performance hit is that a lot the time your async methods are actually completed synchronously, e.g. you read data from a FileStream with ReadDataAsync and instead of going to disk, the data was already cached in an in-memory buffer. When you hit that situation the overhead of the async - the state machine, not being able to inline the method, nesting everything in a try/catch, etc - makes it orders of magnitude slower than a normal method just fetching some data from a buffer.
If your method is always async and is already taking 2ms then it doesn't matter, but you want to avoid the async in methods called in tight loops in performance critical code. The overhead can be significant.
An async method is much slower (40x) compared to a normal sync method. If you're writing a high performance library you need to be careful to not repeatedly call a method decorated with async in a tight loop. Of course 40x times slower of extremely fast is still really fast but I found the overhead can add up really quickly.
Good video on async/await and performance: https://channel9.msdn.com/Events/Build/BUILD2011/TOOL-829T
Later in tests the US Navy found there was a 2/3 chance the torpedo would break up, not start or simply sink when it hit the water.
Currently .NET Native (AOT) is used with WinStore apps - in fact every Win10 .NET application in the store and on your computer HAS to be .NET Native - but the plan is to make compiling a native DLL possible for all .NET Core applications.
.NET CLI is a set of cross platform command line tools for making .NET applications.
DataContractJsonSerializer is a hack that is built on top of an XML parser.
For the people who are unfamiliar with .NET there is a comparison of Json.NET to Microsoft's two JSON serializers here:
http://json.codeplex.com/ <- Json.NET homepage
If you look at them side by side (UQM against the original PC Starcon 2) it is remarkable how much work has been put in to improving the graphics and sound for modern computers.