Wanted to get some feedback on this implementation.
I'm developing an application on the PC to send and receive data to the serial port.
Some of the data received by the application will be solicited, while other data unsolicited.
Controlling the serial port and processing messages would be handled by a Python application that would reside between the serial port and the MySQL database. This would be a threaded application with one thread handling sending/receiving using the Queue library and other threads handling logic and the database chores.
They MySQL database would contain tables for storing data received from the serial port, as well as tables of outgoing commands that need to be sent to the serial port. A command sent out may or not be received, so some means of handling retries would be required.
My question: Is this a reasonable implementation? Any ideas or thoughts would be appreciated. Thanks.
It seems there's a lot of places for things to go wrong.
Why not just cut out PHP all together and use python?
That's just me though. I'd try and cut out as many points where it could fail as possible and keep it super simple.