I am wondering what the phrase limited sockets implementation means. (This is in the PAC Control Reference Guide (1701) in the notes about the Accept Incoming Communication command). Is this the same as the “iterative server” model? And does this mean that a concurrent server model cannot be implemented (easily)?
The reason I am asking is that I have a similar (maybe he same) application as asked about in this question about multiple clients. The suggestions in that post indicated to me that PAC Control does not easily handle concurrent client connections from a single server socket channel.
We have a distributed control system where one controller is a coordinator – it is responsible for moving material around the system, the other controllers (up to 9) are subordinates, receive material and perform processing. Material handling requires sharing data.
We are considering using TCP/IP to share this, specifically
Send Numeric Table and
Receive Numeric Table. The idea is that the coordinator will accept connections (in a server socket) from the processing modules (who are the clients).
The protocol is simple – the client sends a table with its values. The coordinator copies the values to a table used by other charts in the strategy. The coordinator (server) replies with a numeric table containing status data.
The server logic for handling a single client would be to create the server socket, then enter an outer loop to wait for and accept communications. After Accepting the client connection, the server would go into an inner loop where it waits for a numeric table, copies the received table into one that the charts use, then copy its status table into one which gets sent to the client. In the event of an error, the buffer would be cleared, the channel closed, the the outer loop would restart.
I do not see how to do this with PAC_Control. I do see that once we get a connection, we can start a chart to process requests from the connected client. But to implement a concurrent model, when the second client connects, we would need to start that chart again in its own thread, which we cannot do if the chart is already processing requests from the first client.