Consultor Eletrônico



Kbase P101397: How does the state- free AppServer operation mode in OpenEdge work
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   08/10/2009
Status: Verified

GOAL:

How does the state-free AppServer operation mode work

FACT(s) (Environment):

OpenEdge 10.0B
All Supported Operating Systems

FIX:

When a client wants to send a remote procedure or user-defined function request for the
specified application service, OpenEdge forwards the request to an AppServer that supports that
application service. The AppServer broker, which is listening for requests from any client on
the network, receives and dispatches the request for execution to any available AppServer agent
in its agent pool. When the agent completes execution of the request, it returns the results to the
broker, which passes them back to the client, and the agent becomes available to service another
request that might be received and passed to it by the broker.
The name of this operating mode (?state-free?) refers to the lack of any context
maintained by AppServer sessions between client requests. The state-free operating
mode does support limited context management.
By default, there are no physical connections between a state-free AppServer and a client?that
is, all AppServer agents are available to handle requests from any client making a request for its
application services. As long as a state-free AppServer has agents available (it has at least one
agent that is not currently handling a client request), it can handle requests from any client on
the network.
However, at any time during the handling of a client request, a client can become bound to the
agent?that is, the AppServer agent handling the request becomes available to handle requests
only from the client it is currently servicing. The function of this physical binding is very
different from a bound connection in stateless operating mode.
A client can bind to an agent in state-free operating mode only by invoking a request to
instantiate a persistent procedure. When this happens, the AppServer broker that receives the
request creates a physical connection between the client and an available agent where the
persistent procedure is then instantiated.
For the client, this physical binding is only valid for requests to execute internal procedures or
user-defined functions of the remote persistent procedure that it has instantiated on this agent.
If the client makes any other requests for the specified application service, all other available
AppServer instances or other available agents of a single AppServer can execute these requests.
A bound agent becomes free (unbound) and is again available to handle requests from all clients
when the bound client deletes the remote persistent procedure that it has created on the agent.
Note that it is the successful instantiation of a remote persistent procedure that forces an agent
to become bound to the client. If a client fails in its attempt to instantiate a remote persistent
procedure, no binding between the client and AppServer agent occurs.
In general, then, a state-free AppServer agent is available to handle a client request as long as it
is not currently processing a client request and as long as it is not waiting on an exclusive bound
connection to a single client.
If a state-free AppServer has no AppServer agents available to
handle requests, it returns a run-time error to the OpenEdge interface.