Posts by /u/kramer9797

PHP-Python Script – On Demand

Hi everyone,

I’m looking for some solution design and ideas for a little side project site I’m working on. In brief, the way it works is, PHP will generate a .php file and that file contains instructions to run a python job. The python job should execute, gather the required data, and then return the results to PHP.

Now, I got this process working, but it takes 1-2 mins to run on my server, and I need to bring it down to 5 seconds or less. The way for me to bring it down is by having python re-configured to run it’s processes via threading 50x. I can’t do this locally on the server as it doesn’t have the resources to run 50 threads simultaneously, so I’ thinking about offloading this to a fast and cost efficient solution, ie Azure. If I can have PHP send the request to Azure for processing of the python job, then that may solve my problem and it really shouldn’t cost much, especially if I’m billed according to time utilizing the platform (few seconds for each request).

I’m looking for some opinions and ideas, as I’m just trying to learn more about Azure. Can I use containers, logic apps, or functions, etc. If anyone has any suggestions, I can dig deeper on those features and topic.

Thanks!

submitted by /u/kramer9797
[link] [comments]

Read More