Suppose there are two scripts Requester.php and Provider.php, and Requester requires processing from Provider and makes an http request to it (Provider.php?data=\"data\"). In th
Split the Provider in two: ProviderCore
and ProviderInterface
. In ProviderInterface
just do the "quick and easy" part, also save a flag in database that the recent request hasn't been processed yet. Run ProviderCore
as a cron job that searches for that flag and completes processing. If there's nothing to do, ProviderCore
will terminate and retry in (say) 2 minutes.