0

Recently I was tasked with developing a data analysis dashboard. Now that I'm nearing completion of this project I have run across one annoying issue that I'm struggling to solve. In particular all of my data processing and analysis is carried out by python3 backend scripts. However the dashboard itself is built using HTML & Js. Now whenever user logs in I want backend to trigger all data processing scripts. Main problem with this is that these scripts take about 5mins to complete and they produce critical data displayed in the dashboard. At this moment in time my backend php script does this;

if (<user logged in>) {
     $out = passthru("python3 $dispatchPath/dispatch.py $param1 $param2");
}

However this method is really poor as it all takes is few triggers of this condition and entire server slows down as 'dispatch.py' is computationally heavy. So Is there a better way to do this operation i.e when the user logs in toggle loading screen, have backend execute python script, then once that is done working, sent data back to the user and turn off loading screen. Any software or tutorials to help me with this will be greatly appreciated thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.