C On server a \ B \ c \ DProgramIt cannot be changed. It can only be written in C (for various reasons)
The main problem is that the Web server on Server e needs to communicate with server a to obtain some data. Because there is no database (for various reasons ), otherwise, I will store the total data on server a in the database, and the web server will be able to fetch it.
Therefore, I want to write a Socket Client in Web server to communicate with the C program of server a in singleton mode, but the problem persists. The socket stream is sequential, for example, if 10 customers have opened the webpage and called different functional modules, they will be confused.
Because the C program on server a is a socket server, the system ("command") method cannot be used.
I once thought about running another C program on a and communicating with the socket server process. The shared memory is the fastest, but this is not desirable, because the types of data to be interacted are diverse and constantly changing.
So how can we make the webserver communicate with the C program? Low server load when multiple customers access webpages