开发者

How to let a page know that search result is available on the server

开发者 https://www.devze.com 2023-03-27 04:07 出处:网络
We are looking to do following for an ASP.Net website, In page A, user enters job information like Title, description and location. As soon as user clicks \"Submit\" button, we redirect to the secon

We are looking to do following for an ASP.Net website,

  1. In page A, user enters job information like Title, description and location. As soon as user clicks "Submit" button, we redirect to the second page but in parallel we are also sending a query to database to get a list of recommended resumes (We need it on next page and since db is large so we need to execute the query asap.)

  2. User gets redirected to page 'B', here we are showing a lot of up sale options and one of them shows a list of recommended resumes we just queried for.开发者_StackOverflow社区 Now the query might still be executing and we can show a 'in process' icon but how would that specific section of the page would know that when the result is ready to be displayed.

  3. I see two ways of doing it

    a. Poll the server regularly and show results as soon as it's available.

    b. Server somehow broadcast the result and our page gets that result. I think this might be a little efficient but how to do this? This search request could be going from hundreds of pages, now how server should best process and return it and how the page figure out that result is available.


You cannot send data to the client if he does not request it, so the way to go is :

a. Poll the server regulary and show results as soon as it's available.

0

精彩评论

暂无评论...
验证码 换一张
取 消