#96 Steve Gordon, Http Client Factory in .NET Core 2.1

Summary
Steve Gordon and I talk about the new Http Client Factory in .Net Core 2.1. We cover what's new, what's different and how to use Polly, the .NET resilience framework with it.

Details
Who he is, what he does, meetup group, Humanitarian Toolbox. What is wrong with Http Client, exhausting sockets; using a singleton, DNS problems. Http Client Factory, creates a client pool, using DI to create the clients, named and typed clients, testing. Http Client Handlers. Using Polly with Http Client, differentiating between policies for a given endpoint, wrapping, calling delegates.

Links
Steve's homepage

Steve's series on Http Client Factory.
Steve's twitter

Steve's MS Doc's page

Scott Hanselman's post on Http Client Factory.

Download mp3 of podcast

#95 Ben Watson, High Performance .NET

Summary
Ben Watson, software engineer at Microsoft working on Bing and author of Writing High Performance .NET Code talks to me about his book and how to improve your code.

Details
Who he is, what he does, working on Bing lead to the book, Bing is probably the biggest C# app in the world. Why worry about performance, pay for play, serverless; sometimes more machines are the best solution. Where to start with the CLR, the garbage collector, JIT, be careful of enum flags. More on GC, using generations to improve efficiency, aim for very short lived or very long-lived memory, memory efficiency is as important as CPU efficiency. What about the network, async await all the way down, Ben likes TPL, "immutability is key". LINQ hides allocations, closures delegates. Be careful with Func and Actions, delegates cause allocations. Spans. Concurrent collections. Just in Time, small methods compile faster, Bing loads thousands of dlls. Readability and maintainability vs performance. for vs foreach.

Links
Ben's homepage

Ben's book

Download mp3 of podcast