asp.net - c# on Database in background -


i have asp.net server-based single-page web application performs several functions, 1 of requiring data access third-party api. application uses data provide suggestions user.

when user tries execute simple actions on page independent of data api, page takes significant time load. after all, application calls api every page load - need fix this.

to avoid slow-load frustration factor, know rely on tools jquery , ajax speed client-side. however, other page methods execute quickly, don't see value in converting else on page client-side code when 1 method call blame.

i don't need live data external api, natural instinct throw timer method sends data on postback or pageload after x minutes. seems crude approach. there more elegant way accomplish goal?

the api data stored in database, serves middleman between api , web page. application call api every x minutes (separate page load) , supply data upon user's action or page load, allowing time-consuming api methods run in background without hindering application?

the database can not call third=party. databases don't , data put them , store data, query database back.

you write console app, or windows service calls api every x minutes. not sure efficient either make api call every user whether or not have logged in in past month.

you should able load page fast without data came third part api . or 1 row or whatever case may , make ajax call own api. api call database , if last data-update done within last x minutes jst read database , if not api can call third-party api directly , insert database


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -