OpenEdge Application Server: Developing AppServer Applications
AppServer and Client Interaction
The session-managed model is specifically designed for application services or Web services that support a single transaction across multiple requests from the same client, returning intermediate results with each request until the transaction is completed.
The connected AppServer is dedicated to serving that one client until the connection between them is terminated.
– state-reset – AppServer broker connects the client application directly to one of the agents in its AppServer agent pool. The connected AppServer agent remains dedicated to the client application for the life of the connection. Between connections, OpenEdge reinitializes the AppServer session to its initial state. This is the state it is in immediately after the AppServer agent is started and after all startup parameters are processed. The AppServer session maintains all session context between client requests.
duvida:para fazer o reset o broker tem que correr os parametros de inicialização ou tem uma cópia em memória do estado inicial e usa essa informação para fazer o reset?
– state-aware – igual ao state-reset excepto, OpenEdge does not reset the AppServer session context between connections. Whatever context remains when one connection finishes is available to the next connection.
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.
– stateless – All AppServer agents remain generally available to execute remote procedure and user-defined function requests from all connected client applications. When a client connects to an AppServer that is running in stateless operating mode, the AppServer broker maintains the connection between itself and the client. The AppServer broker can then dispatch each remote procedure request from the client to any available AppServer agent to execute. Because any AppServer agent that executed a previous request from this client might not be available, the AppServer agent that handles subsequent requests might be different. An AppServer running in stateless operating mode does not reset its session context between client connections. Instead, it maintains most all context created in an AppServer session until a particular AppServer agent terminates or the context is changed by some procedure running in the AppServer session.
The session-free model is specifically designed for application services or Web services that return a complete result, starting and ending any transactions, in a single request.
Thus, a session-free AppServer executes requests from all clients as it receives them, and completes each request independently of any prior request
– state-free – igual ao statelesse excepto, an AppServer running in state-free mode is never physically connected to a single client. The AppServer broker serves, not as a physical connection point, but as a request listener. A state-free AppServer provides the highest degree of availability and responsiveness to clients compared to a comparable configuration using any other operating mode.
cliente => broker => agent/session => bd
por agente => startup / shutdown =>The name of a 4GL procedure that executes when an AppServer agent starts up/shuts down for this AppServer. disponivel em todos excepto state-reset
por ligação => connect / disconnect => The name of a 4GL procedure that executes when an AppServer agent starts up/shuts down for this AppServer. disponivel em todos
por pedido => activate/deactivate => The name of a 4GL procedure that executes before / after the AppServer executes a remote procedure request for a client connection that is unbound. só para stateless
Note: Each physical connection in the pool is a separate TCP/IP connection AppServer broker in the list provided by the NameServer.