![]() In prod setup, DNS and proxylookup will be involved. The above code was run in my localbox.To begin with, the calls run in a different thread anddoesn't block UI. Calls to RESTservice are initiated in controller methods which gets invoked fromajax calls. The REST calls return in 3-4s which is acceptable.HttpClient async: 1027 - 10834 ms Code My Questions Using a new HttpClient for each request (min - max) Using same HttpClient instance for all the requests (min - max) I did a quick performance test to find how WebClient (sync calls), HttpClient (sync and async) perform. I am yet to see practical values that we may gain due to the differences. I searched for differences between WebClient and HttpClient and this site mentioned that single HttpClient can handle concurrent calls and it can reuse resolved DNS, cookie config and authentication. Started to evaluate WebClient and HttpClient. I took a look at few open source code projects for REST consumption and didn't find any value in those to justify additional dependency in the project. ![]() ![]() There is no requirement for uploading/downloading huge data and I don't see anything in future. The REST service requires Basic Authentication Scheme and itcan return data in both XML and JSON. ![]() I am evaluating the best way to call REST service in. We need to consume REST service from our vendor. The UI calls controller methods through ajax calls. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |