Building Distributed
Applications
Using the Progress AppServer


State-aware Operating Mode

When Progress sends a client application’s connection request to an AppServer that is running in state-aware operating mode, the Application Broker connects the client application directly to one of the processes in its Application Server process pool. The connected Application Server process remains dedicated to the client application for the life of the connection.

Unlike state-reset, Progress does not reset the AppServer session context between connections. Whatever context remains when one connection finishes is available to the next connection.

Connection Management

When the AppServer receives a connection request, the Application Broker chooses an Application Server process that is not currently dedicated to some other client application’s connection. If all Application Server processes are unavailable, the Application Broker might create another Application Server process for the connection, or it might return an error. The result depends on how many Application Server processes are running and the values of various configuration settings.

When the client application disconnects from its Application Server process, the Application Server process notifies the Application Broker that it is now available to service another client application connection.

To help an AppServer session perform common connection tasks, such as user authentication, you can configure a Connect procedure that runs for each connection request and a Disconnect procedure that runs for each disconnection request. For more information on these procedures, see Programming the AppServer."

Performance Considerations

Because an AppServer running in state-aware operating mode dedicates an Application Server process to each client connection, the connected client is guaranteed of having each request handled immediately by the AppServer. Assuming that the general process load on the AppServer platform is light enough, this means that the client can expect relatively fast response time from the AppServer.

However, throughput in a state-aware connection tends to drop as client load increases, because the number of dedicated Application Server processes available to handle client connections is necessarily limited by the number of Application Server processes that can be started on the AppServer machine.

Context Management

Unlike state-reset, an AppServer running in state-aware operating mode does not reset its session context between client connections. Instead, Progress maintains any context created in the AppServer session until you specifically delete it in some procedure that you write.

For an AppServer running in state-aware operating mode you can also configure Startup and Shutdown procedures that run in every AppServer session when it starts up and shuts down. You can use these procedures to establish and discard run-time context that the AppServer maintains in common for all connections. For more information on the Startup and Shutdown procedures, see Programming the AppServer."

Like state-reset, because each Application Server process is dedicated to a client connection, the AppServer maintains all session context between client requests. Thus, for example, any global values or database connections that you set in remote procedures remain available for the life of the connection or until you change them during some remote procedure call.

As noted in a previous section, an AppServer session running in state-aware operating mode maintains most of its context between client connections. However, it does delete any remote persistent procedures that are still active when the connection terminates.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095