I am new and want to lear how real time communication takes place and how can I implement it. Let me explain the objective.
I want to write a program in JAVA that will connect to a remote assets let's say TRUCKS. (The big trucks that carry cargo) Trucks have a digi device (cell modem) installed which is connected to the onboard computer (via a serial port, each truck has a computer).
All the event logs, status messages etc. are on the computer. I will need to connect to the Digi (cell modem) device by sending the IP address and the port. For example, I will need to send a command "connect me to this IP at this port.
The commands/messages that I send to the Digi device (cell modem) will be relayed to the computer and responses from the computer will be sent by the Digi (cell modem) to my Java program which will put them in a queue.
I need to talk to the Digi device. Let's say there are 1,000 truck. I will perhaps need to store 1,000 IP and port #s in the database. My java program will pull the IP and port info from the database and send 1,000 command to 1,000 unique trucks.
Let's say, we need to downlaod event logs/status messages from 1,000 truck every 15 minutes. So I will need to send a command to the Digi device (cell modem) everything 15 minutes for all 1,000 trucks.
How can I write such program to fetch data from a digi cell mode, device?
I can use one of the following protocols:
I would like to know which one should I choose and why? (I am looking for recommendations).