Herding Code 207: Damian Edwards on ASP.NET 5, DNX everywhere, and experimental servers on Windows

While at NDC Oslo, K Scott and Jon talked to Damian about ASP.NET 5, running DNX cross-platform (including Raspberry Pi), the exploratory work he and the team are doing to make ASP.NET 5 run really fast, TagHelpers, and his favorite Redmond craft beers.

Download / Listen: Herding Code 207: Damian Edwards on ASP.NET 5, DNX everywhere, and experimental servers on Windows

Show Notes:

  • Hello
    • (00:18) K Scott asks about the general status of ASP.NET 5 and what Damian’s been up to. Damian mentions the work the team’s been up to and the two talks and two days of workshops he and Jon just completed.
  • ASP.NET 5 – portability and cross-platform
    • (01:16) K Scott asks about the advantages of running ASP.NET 5 on the Core CLR. Damian says the big advantages are portability (bundle the runtime with your app) and cross-platform – anything beyond that is secondary. It is lighter, more compact, etc., but that’s not the main goal.
    • (03:04) Jon talks about how he went through a depressing smackdown trying to talk managers into letting him upgrade corporate apps to ASP.NET 2.0 (when it first came out) and the "one framework per server" monster shut him down. Damian points out that you do lose some things in translations – there are some Windows abstractions and API’s that will only be available in the full CLR. So if you have a requirement for Windows-specific functionality (COM, directory services, etc.), you’ll need to run your application on the full .NET Framework.
    • (03:59) K Scott asks about the experience of bundling the runtime with your application. Damian describes how he demonstrated this during his presentation, bundling multiple runtimes (e.g. Linux, Mono, Mac, Windows) with an application.
    • (04:38) K Scott asks hosting on Linux. Damian describes Kestrel, the web host for ASP.NET 5 that runs on libuv (used by Node and other servers).
  • ASP.NET 5 HTTP Performance, Pipelining and HTTP 2
    • (05:50) K Scott asks how Damian expects ASP.NET 5 to perform relative to Node.js. Damian describes the performance testing testing he an his team have started looking at using the TechEmpower benchmarks. He lists several abstractions and implementations they’ve looked at, starting with the simplest benchmark that just tests plaintext response.
    • (10:15) Damian explains how pipelining works. K Scott asks about how HTTP 2 fits it. Damian talks about how both enable higher HTTP throughput.
    • (12:17) Jon asks if the useful the HTTP plaintext test is and Damian talks about this test focuses on efficiency in speaking HTTP, there are a lot of other tests and features they’ll need to look at as they move up the stack.
    • (12:55) K Scott asks why the ASP.NET 5 stack is nearly twice as fast as ASP.NET 4.x for plaintext responses. Damian talks about how legacy compatibility in ASP.NET 4.x extends all the way back to classic ASP, whereas ASP.NET 5 only pulls in specific features as needed by the application.
    • (14:44) Damian says they’ll also be looking at massive concurrency (important for realtime applications) and asynchronous background work.
    • (15:32) Jon incorrectly guesses that async background work will be important for pipeline scenarios.  Damian says that since pipelining only works over the same connection, so this is more relevant for HTTP 2.
  • Minimizing Kernel / User Mode Transitions
    • (16:56) Jon asks about the importance of switching between kernel and user mode. Damian explains why that transition is necessary and the performance impact it has. He talks about how some of the memory management techniques they’re looking at.
    • (21:12) Jon asks about some newer APIs Damian had previously mentioned to him. Damian talks about Registered IO (RIO) in Windows 8 and Windows Server 2012 R2. K Scott asks about HTTP.SYS kernel mode caching.
    • (24:07) Jon asks if there are some performance impacts he should pay attention to as a web developer. Damian talks about the process ASP.NET MVC pipeline and how content could be double or triple buffered in some cases as it moved through the pipeline. That’s an issue when you’re looking at client-side optimization, because bytes aren’t flushed to the client as early as possible. In ASP.NET MVC 6, it’s now possible to explicitly flush content, and the double and triple buffering has been removed.
    • (27:14) K Scott asks about the baseline KB allocated per request. Damian said that previously it was 15-40 KB per request before your application code did anything; now it’s under a KB. There are some other buffers they can probably pool as well.
  • TagHelpers
    • (28:22) Jon asks TagHelpers. Damian explains some of the problems with HTML Helpers, especially when you need to control the HTML that’s being output. TagHelpers allow you to call HTML Helpers using an HTML-like syntax (tags and attributes) so you get all of the benefits of working in the HTML editor.
  • What do you do for fun?
    • (30:33) K Scott asks Damian what he does for fun. Damian talks about craft beers in Redmond and his new espresso machine. K Scott asks Damian about some of his favorite craft breweries; Damian talks about Kilty MacSporran and Hogus Maximus from Postdoc Brewing and Black Raven Brewing Co.  

Show Links: