Need advice in converting synchronous code to asynchronous RRS feed

  • Question

  • User-1045336983 posted

    Hi, I am converting my existing application on asp.net to asp.net core. While doing so, I am thinking of converting apis and their respective business logic to async methods. However, I am confused if at all this is required. My application consists of a lot of DB calls. There are grids on each page which contain around a million records( we fetch data according to page no. ). There can be around 2-3K users actively using my application. We have angular as front-end and asp.net(core) as back-end. The DB calls are executed using Dapper. Now, if a page has 5 API calls, then javascript being asynchronous in nature, each 5 api calls get called at once so calling these APIs are not an issue, however, the execution of them is. I feel if I convert most of my APIs to async then my application would become more responsive if a large number of users try to access my application at a given instance.

    I read few articles that said async methods work great if there are I/O operations involved but my application doesn't seem to have any. So will converting synchronous code to asynchronous is worth an effort? Also, should I use async methods of Dapper instead of existing synchronous methods?

    Saturday, October 5, 2019 12:29 PM

All replies