Wednesday, April 11, 2018

Session & State

In the computing world, a session refers to a limited time of communication between two systems. Some sessions involve a client and a server, while other sessions involve two personal computers.

A common type of client/server session is a Web or HTTP session. An HTTP session is initiated by a Web browser each time you visit a website. While each page visit constitutes an individual session, the term is often used to describe the entire time you spend on the website. For example, when you purchase an item on an ecommerce site, the entire process may be described as a session, even though you navigated through several different pages.

Another example of a client/server session is an email or SMTP session. Whenever you check your email with an email client, such as Microsoft Outlook or Apple Mail, you initiate an SMTP session. This involves sending your account information to the mail server, checking for new messages, and downloading the messages from the server. Once the messages have been downloaded, the session is complete.

An example of a session between two personal computers is an online chat, or instant messaging session. This type of session involves two computers, but neither system is considered a server or client. Instead, this type of communication is called a peer-to-peer or P2P. Another example of P2P communication is BitTorrent file sharing, where file downloads are comprised of one or more sessions with other computers on the BitTorrent network. A P2P session ends when the connection between two systems is terminated.

https://techterms.com/definition/session

                                     *     *     *
In computer science, in particular networking, a session is a semi-permanent interactive information interchange, also known as a dialogue, a conversation or a meeting, between two or more communicating devices, or between a computer and user (see login session). A session is set up or established at a certain point in time, and then torn down at some later point. An established communication session may involve more than one message in each direction. A session is typically, but not always, stateful, meaning that at least one of the communicating parts needs to save information about the session history in order to be able to communicate, as opposed to stateless communication, where the communication consists of independent requests with responses.

An established session is the basic requirement to perform a connection-oriented communication. A session also is the basic step to transmit in connectionless communication modes. However any unidirectional transmission does not define a session.[1]

from: Wikipedia SESSION
                                                   *     *     *
In information technology and computer science, a program is described as stateful if it is designed to remember preceding events or user interactions;[1] the remembered information is called the state of the system.

The set of states a system can occupy is known as its state space. In a discrete system, the state space is countable and often finite, and the system's internal behaviour or interaction with its environment consists of separately occurring individual actions or events, such as accepting input or producing output, that may or may not cause the system to change its state. Examples of such systems are digital logic circuits and components, automata and formal language, computer programs, and computers.

The output of a digital circuit or computer program at any time is completely determined by its current inputs and its state.[2]

from: Wikipedia STATE

No comments: