I did some PHP daemon and now I want my PHP webapp to communicate with it, e.g. send XML document to it and receive response after some time. As I would like to avoid file operations over the network (as it involves FTP), what would be the ideal way of sending this document? The PHP daemons and PHP webapps are on different servers. I have investigated various options so far:
- ActiveMQ, but that adds additional bloatware
- TCP Sockets (however it's hard to do it as the PHP daemon is single-threaded and very busy sometimes)
- FTP, SCP to send the file
- NFS / CIFS
- Using database
If the messaging server looks like the best option, what would be best suited for PHP? I would like to avoid centralized, single messaging server because it's difficult to approve firewall rules, and the network is very big, complex and very fail-prone. So that would require star-shaped network of messaging servers, and because of that they would need to very lightweight, easy to deploy and with no difficult dependencies.