File upload to the server

I’ve my front end written using HTML/CSS/Javascript. Front end is communicating with the backend(Oracle database) using Java Webservices (Spring boot app).

Situation #1:
User clicks on the Download button, using Ajax call, I call my Java webservice, java webservice returns the data in JSON format, I display this data in the UI in tabular format.

Situation #2:
Since the amount of data to be returned is going to be huge, when a user clicks on the download button,I am expecting that the query could take hours or maybe a day to finish. Once the query is finished,I would like to upload the data returned from the webservice in a file at some location on the (RHEL)server so that when user comes back, he/she can click the Download button and download the file with huge data in whatever format it was saved (CSV, Excel etc)


  1. I was reading in another Stack overflow post here that saving file using FileSystemAPI on Firefox isn’t supported. I am wondering if this is even a good solution based on the situation #2 described above?

2)If a webservice keeps on running for a day, isn’t it going to time out in few hours? I’ve a feeling that the approach I’ve mentioned in Situation #2 above isn’t an efficient one.

  1. Is there something else that can be done in a more efficient manner to accomplish my task? Probably, some scheduling at database point of view?

  2. In Situation #2, since the query is going to take long time, I am also planning to change the display of Download button to something “Come Back again”. In this scenario, how would I determine that a particular query is going to take long time?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.