i'm creating embedded system with infinite Python script (launched on startup) and PHP web page. PHP web page have to communicate with that script.
Current solution is file based communication. PHP writes to file some command and Python writes response to some other (or same) file.
Another possible solution is to call some NOT infinite Python script only at need with PHP $response = shell_exec('./script.py');
Both solutions are possible but they are complicated and I need that Python script to be infinite.
Is there any way how to open some communication tunnel between two independents scipts on same linux device?
Like UART, telnet, etc. between two devices.
Now i'm searching for solution with PHP-PYTHON and PYTHON-PYTHON communication but sometimes i need this for example with Bash, TCL, etc.
Thank you (and sorry for not good english)
Radim