c# - Why are asynchronous calls to my database desireable? -
i've written server interacts mssql database. it's written in .net 4.0 , uses nhibernate orm retrieve information database. when reading .net 4.5 , introduction of async/await keywords learned that, unfortunately, nhibernate not have support async/await .
i don't understand why issuing async call database beneficial. don't requests queue @ database level anyway? wouldn't async increase points of failure without improving anything?
in general, benefit not blocking executing thread while possibly expensive (asynchronous) operation run. in context of wpf / windows form application, mean not blocking ui thread (if request originating thread) , application remains responsive.
in context of web application (say iis), mean releasing thread in pool while awaiting result. since not locking thread, can reused accept request , results in better performance in terms of accepted connections (not time / request).
Comments
Post a Comment