A stateful service is a service that maintains state information between message calls.
Stateful services are used when a multi-step conversation needs to occur and a connection-oriented service is too heavy. A stateful service will utilize a unique identifier as token to correlate the participants in the conversation, thus creating a virtual connection. This allows the connection between the parties to be dropped. The service engine is responsible for looking at all new connections and seeing if they contain a token that is associated with an active stateful service. If so, the service engine reconnects the participants and new calls are executed as though the connection was never dropped. This technique allows one to build distributed applications that contain multi-step conversations, where each message leverages information (state) from the prior messages.
|