Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Minimal APIs in ASP.NET 9

You're reading from   Minimal APIs in ASP.NET 9 Design, implement, and optimize robust APIs in C# with .NET 9

Arrow left icon
Product type Paperback
Published in Dec 2024
Publisher Packt
ISBN-13 9781805129127
Length 252 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Nick Proud Nick Proud
Author Profile Icon Nick Proud
Nick Proud
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1 - Introduction to Minimal APIs
2. Chapter 1: Getting Up and Running with Minimal API Development FREE CHAPTER 3. Chapter 2: Creating Your First Minimal API 4. Chapter 3: The Anatomy of a Minimal API 5. Part 2 - Data and Execution Flow
6. Chapter 4: Handling HTTP Methods and Routing 7. Chapter 5: The Middleware Pipeline 8. Chapter 6: Parameter Binding 9. Chapter 7: Dependency Injection in Minimal APIs 10. Chapter 8: Integrating Minimal APIs with Data Sources 11. Chapter 9: Object Relational Mapping with Entity Framework Core and Dapper 12. Part 3 - Optimal Minimal APIs
13. Chapter 10: Profiling and Identifying Bottlenecks 14. Chapter 11: Utilizing Asynchronous Programming for Scalability 15. Chapter 12: Caching Strategies for Enhanced Performance 16. Part 4 - Best Practices, Design, and Deployment
17. Chapter 13: Best Practices for Minimal API Resiliency 18. Chapter 14: Unit Testing, Compatibility, and Deployment of Minimal APIs 19. Index 20. Other Books You May Enjoy

Understanding and implementing asynchronous patterns in a minimal API

The opening pizza analogy is hopefully a good, high-level illustration of the difference between asynchronous and synchronous programming. Asynchronous programming is significant in minimal APIs because it provides a lot of flexibility for managing the conversations between client and server. It is particularly beneficial to long-running operations, where the overall performance of a request would be compromised by operations running in a linear fashion, with each operation blocking the other.

Asynchronous programming also provides scalability benefits, allowing APIs to cope with high demand. This is achieved by ensuring that threads are not blocked. Operations in an asynchronous endpoint can register callbacks to ensure that the execution thread can continue running other tasks until that callback is resolved. This brings with it other resource benefits such as better management of the thread pool, lower CPU...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime