I have a sensor gateway which is connected to the serial port. My java program basically a desktop application which is collecting sensor data and storing in a public mysql database. Now I am wanting to access the serial port through internet with a web application which is using the same public mysql database. I have think a bit but I think it is not a proper way. If I would keep a table in the database, if any command is generated through internet via the web application this table store the command for a period of time and my desktop application continuous monitoring the table if data available get the data and pass it through serial port. I am seeking for a proper way to access serial port through internet/cloud which is connected to remote machine or something like an expert opinion.
Asked
Active
Viewed 581 times
1 Answers
0
That's certainly the simplest method. Much simpler than say a web service that stores it in memory, or again in the database and you get safety which you wouldn't get if you just relied on the file system to lock a file. You might need some method of clearing out the output from the DB.

Andy Till
- 3,371
- 2
- 18
- 23
-
sure, but which part exactly? – Andy Till Oct 15 '12 at 17:34
-
"Much simpler than say a web service that stores it in memory, or again in the database" this one – Shantanu Banerjee Oct 16 '12 at 02:20
-
What I meant there is that another possible solution is to have some kind of TCP server (or higher level protocol like HTTP) that the server or client side code could call. The server would need to hold this data too in a database or in memory. All this would be much more work than just adding it to the database, which you already have. – Andy Till Oct 16 '12 at 15:49