I'd like to use redis pub/sub in PHP, but I'm afraid PHP can't be the only tool: a subscriber need to be always callable, since php isn't built for running as a daemon, I can't trust it to reliably be always "on".
So what is the solution for the PHP world?
With the "2." I mean : use a nodejs/java/fooBar server which is the daemonized subscriber and call back the php (using http/cli or whatever).
I can't find a better idea than the "2." , but it seem so ineffective at the same way...
What is your opinion?
EDIT : How would you do this using a cloud platform like platform.sh which do not give the opportunity to have a supervisor.d alike?
Thanks to the comments, I found a satisfying way to go : use of supervisor.d which will relaunch a symfony Command script with :
set_time_limit(0)
BRPOP
with a max way of 1 sec. lower than the read_write_timeout)
what I can tell from an early point of view :
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With