Setting Routers

In any deployed configuration of Component Servers, one or more Servers act as router and distributes requests to Servers on a round-robin basis. You specify whether a Server is a router when you launch the Server processes (see Configuring, Starting, and Stopping the Server Executable).

Each client must specify a router as well. You do this with the API ostc::addRouter(). On Windows platforms, you can use the executable ostcSetRouter.exe instead of this API.

ostc::addRouter()

static ostc_Session* addRouter(char *host_and_port); 

host_and_port is a character string specifying the host machine of a router Component Server, as well as the port on which it is listening for thin client requests.

      host:port 

When the client calls ostc::connect(), a router tells the client which Component Server to send requests to. The router makes this determination based on

Click here for the example.



[previous] [next]