Developing an Asynchronous ASP.NET Core Web API
Correctly writing asynchronous code can tremendously improve the scalability of your web API. In this course, you’ll learn how and why to write async code when creating an ASP.NET Core web API.
What you'll learn
You've built an API with ASP.NET Core. Now it’s time to learn how to improve the scalability of that API by making it asynchronous. In this course, Developing an Asynchronous ASP.NET Core Web API, you’ll learn how to do that, using the async/await keywords. First, you'll learn about the internals of async/await, and when and where it makes sense to use it. Next, you'll discover how to test the impact of writing async code. Finally, you’ll learn all about async streaming, cancellation, & dealing with exceptions.
When you're finished with this course, you'll know the ins and outs of writing asynchronous code in ASP.NET Core.
Table of contents
- Coming Up 3m
- Positioning This Course 3m
- Course Prerequisites and Tooling 2m
- Introducing the Demo Project 1m
- The Advantage of Asynchronous Code 4m
- Handling Synchronous and Asynchronous Requests 3m
- I/O Bound Versus Computational Bound Work 3m
- Threads, Multithreading, Concurrency, Parallelism 2m
- Summary 1m
- Coming Up 1m
- Demo: Getting Resources 6m
- Introducing WebSurge 1m
- Demo: Using WebSurge to Test Async Code Improvements 9m
- The Outer Facing Model 4m
- Manipulating Output with an IAsyncResultFilter 4m
- Demo: Creating a Custom AsyncResultFilter (Part 1) 4m
- Demo: Adding and Configuring AutoMapper 6m
- Demo: Creating a Custom AsyncResultFilter (Part 2) 8m
- Summary 1m
- Coming Up 1m
- Demo: Asynchronously Integrating With an External Service 9m
- Demo: Processing Multiple Service Calls Asynchronously, One-by-one 3m
- Demo: Processing Multiple Service Calls Asynchronously, After Waiting for All of Them to Complete 3m
- Parallel Processing vs. Asynchronous Processing 3m
- Demo: Passing Multiple Objects to a Result Filter with ValueTuple 6m
- Demo: Mapping Multiple Objects Into One 4m
- Why Supporting Cancellation Matters 2m
- Demo: Supporting Cancellation 5m
- Demo: Supporting Cancellation When the Consumer Navigates Away 4m
- Demo: Listening to Multiple Cancellation Tokens 3m
- Handling Exceptions in Async Code 4m
- Summary 2m
- Coming Up 1m
- Additional Async Return Types 5m
- Offloading Legacy Code to a Background Thread 1m
- Demo: Wrapping Synchronous Code with Task.Run() 5m
- Pitfall #1: Using Task.Run() on the Server 3m
- Demo: Blocking Async Code 2m
- Pitfall #2: Blocking Async Code 2m
- Demo: Modifying Shared State 2m
- Pitfall #3: Modifying Shared State 1m
- Summary 2m