In this article, we will discuss the different State management principles for REST services
State Management means to preserve the state of a control, web page etc.HTTP is a stateless protocol by nature. So, State management is a mechanism to preserve state (i.e. state of a webpage, a control or an object etc.) between subsequent requests to server from one or more clients.
REST Service has 2 primary type of states.
When the service is invoked or executed then it enters the Active state.
Further, in Active state, The service can have 2 states.
When the service is not in use, it is in Passive state.
In this condition, the service is active and actively performing a task and processing data for that task.
In this condition, the service is active but not actively processing data for a task.
Further, when the service is stateful, it can process 3 type of data.
Session data represents information associated with retaining a connection made between a program and its client program.Sessions are identified by a unique identifier that can be read by using the SessionID property.A session is considered active as long as requests continue to be made with the same SessionID value. If the time between requests for a particular session exceeds the specified time-out value in minutes, the session is considered expired. Requests made with an expired SessionID value result in a new session.
When the service is active,stateful and executing the main task of the service.If the logic is tied with workflow, then it is further divided to context data and context rules. Context rules are the rules for executing workflow.
When the service is active and stateful,the service can execute a business task by executing multiple services.
Thanks for visiting !!
© 2016,admin. All rights reserved.