DEV Community

Discussion on: How to post data from React to Flask.

Collapse
vokabul8 profile image
Vokabul8!

I have a webapp that has a process where data is to be sorted at the back end and updated on the front end periodically (That is, data is collected from users for 6 minutes, sorted and a selection is made after meeting certain conditions, then the selection is displayed on the UI for two minutes, making a total of an 8 minute cycle). This process is to be repeated continuously infinitely.

The issue here now is that my dev says this cannot be done due to the expectation that millions of data may have to be filtered and the system cannot do it within the time frame expected?

Any ideas?

Collapse
dev_elie profile image
Ondiek Elijah Author

Since what you're implementing will be stressful in production, I would recommend that you implement some indexing techniques to speed up the entire process.

Collapse
vokabul8 profile image
Vokabul8!

Will this "indexing technique" make the process to function as required?

Thread Thread
dev_elie profile image
Ondiek Elijah Author

Certainly, yeah.

Collapse
johnyepthomi profile image
JohnYepthomi

You need to know exactly how long the sorting and selection process will take , making sure it gets done withing the 6mins before displaying to the user. Since I don't know what kind of sorting and selection criteria is involved , I can't help much but as you mentioned about your devs saying it can't be done , I'm guessing it involves a lot of work and the time it takes for the whole process isn't guaranteed to be consistent with the 6 mins requirement.

Collapse
vokabul8 profile image
Vokabul8!

Its a question and answer application in which the users have 6 minutes to submit their answers. so the sorting and selection has to be done within this 6 minutes. The criteria is a form of elimination process where the system is to compare answers sent in and select the one among all the answers sent in within the 6 minutes which meets certain conditions, to be displayed, for two minutes.