Consultor Eletrônico



Kbase P16563: How to pass messages using sockets, asynchronous AppServer, and a router that hides the clients IP a
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/01/2009
Status: Verified

GOAL:

How to pass messages using sockets, asynchronous AppServer, and a router that hides the clients IP address?

FACT(s) (Environment):

Progress 9.x
All Supported Operating Systems
OpenEdge 10.x

FIX:

It is not possible for the AppServer to establish a socket connection with a client process when that process is located behind a router. In this scenario, a third process needs to be running that acts as a arbitrator between the client process and the AppServer that is running the asynchronous request for the client.

To implement this do all of the following:

1) Have the arbitrator process open a server socket and wait for connection requests.

2) Before the client process invokes the asynchronous AppServer request it should establish a socket connection with the arbitrator process (passing some kind of unique ID along with an indication that it is a client process).

3) The client process should then invoke the asynchronous AppServer request.

4) The AppServer process that executes the request should establish a socket connection with the arbitrator process (passing the same unique ID that the client processed used along with an indication that it is a server process).

5) When the AppServer wants to send a notification (of whatever kind) back to the client process it should write the message to the socket.

6) The arbitrator process will receive the message, find the corresponding client socket (via a temp-table), and write the message to that socket.

The above will allow status messages (or anything else) to be sent from the AppServer process back to the client process when the client process is hidden behind a router (i.e. its IP address is hidden).