Memory refers to the physical devices used to store programs or data. Main memor
ID: 3685573 • Letter: M
Question
Memory refers to the physical devices used to store programs or data. Main memory is used for the information in physical systems which function at high speed (i.e. RAM), as compared to secondary memory, which are physical devices for program and data storage which are slow to access but offer higher memory capacity.
The cache memory is an intermediate level between the main memory and the processor. The goal is to store the most frequently and most recently accessed data in the upper-level unit (cache) to make returning to it much faster. Can this concept be used in any real life applications? If so, discuss its use and advantages.
Explanation / Answer
Important points highlighted regarding sessions data
Very very good question …Yes this is used in Microsoft web server IIS as a session sate management in this the incoming request id is stored in cahe memory and sqlserver and in a hard disc also which are explained below
If the request id or session is stored in side the iis server it is very fast to recall
When it is stored in the other than this like heard disc It will take more time
So wen can imagine accordingly
Managing session state is vital in a web farm environment. Many websites simply cannot function without maintaining state throughout the user’s visit. Session variables are maintained by the web server and a cookie is saved to the client. This cookie will inform the server who the user is and the server can then extract the session information from it. You will need to give extra consideration to state management in a web farm scenario.
Imagine that the web request is routed to farm machine A and the code invoked by the request relies on some parameters stored in the session. If the same user is then routed to machine B in the next web request which also relies on the session state then the results may unpredictable: as the value is not available in the session then a null pointer exception may be thrown, or if you put in a guard clause then that variable may be assigned some default value thereby “forgetting” what the value was in the previous web request. And then the wrong default value may be stored in the database instead of the one the user has selected.
In this post we discussed session stickiness which makes sure that the same user is directed to the same machine on subsequent requests. We also said that we should avoid this solution so that the load balancer can pick the “right” machine in the farm based on the actual load. In case you need to deploy a Classic ASP site in a web farm then this is your only option: Classic ASP doesn’t have any built-in session state solution that works with a web farm.
You can define session state handling in IIS. Let’s see what the options are.
Session state management
Every web developer must have used the session state in some form. A classic example is when a user fills in a step-by-step signup questionnaire then the values are store in a session:
The question is how and where these session states are stored.
In IIS you can open the session state manager by choosing the web site and then clicking the Session State icon: