Solution to the long running query problem in a web application (asynchronous request)

后端 未结 4 1419
忘了有多久
忘了有多久 2020-12-28 22:51

Here is the problem

A user of an enterprise web application is performing a task that results in a long (very long) database query (or other long processing intensiv

4条回答
  •  醉话见心
    2020-12-28 23:33

    Show a message to the user that "Your request is accepted and will take an hour to get updated"

    You create a table which stores all these transactions and process these in a batch on server.

    User would not have to wait for long and he will be happy to see the message. You can send a confirmation email once your the transaction is processed.

    This is the best solution I think.

提交回复
热议问题