Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to manage multiple instances of an app in server connecting with multiple clients on diff machines
    primarykey
    data
    text
    <p>I have an application that needs to be paired with a client on a remote machine. There can be several instances of this application running on the server, each servicing a different client, probably as many as 25-30 pairs.</p> <p>Each pair of server-client will need to have two tcp connections. The server app has 2 processes, and each process has its own tcp connection to the client. </p> <ul> <li>Process A exchanges commands with client </li> <li>Process B receives constant video stream from the client.</li> </ul> <p>In addition, there's another tcp connection between each pair Process A/Process B</p> <p>Commands/Data will flow from as follows:</p> <p>Client &lt;--> Process A &lt;---> Process B</p> <p>while video will flow in this direction: </p> <p>client --> Process B</p> <p>I need help to determine what is the best way to establish all the tcp connections. Who sets up listeners? how to determine the ports to be used? etc.</p> <p>I currently have a single instance of Process A communicating with both Process B and client, but it is all running in one machine, so I am just using "localhost" as my hostname for now. I am also hardcoding the 2 ports that I am using, so I need to change that as well when I have multiple instances so that each instance uses different ports.</p> <p>Once Process A makes a connection with Client, it needs to ask the Client for a port so that Process B can make the other connection directly with Client. Is this a good way to do it, or what is a better way? How can the client determine what port is available to be used?</p> <p>Also any help or pointers on how to assign the ports so this can work with multiple instances would be appreciated.</p> <p>Thanks, please ask any questions about anything that is not clear. </p> <p>EDIT: Actually process A and process B are two different applications.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload