If you are just a little bit above the level of a simple user in communication (e.g, just using web surfing, watching video, downloading file etc) and taste even a little bit of engineering in this area, you might have heard a lot about the term 'Session'. 


You might have seen many cases (terms) that you are so familiar with and you think you fully understand, but is very hard to desfine it. I think the terms Session belongs to this kind of category.  Usually you may get 10 different definition if you ask 10 different persons.


Following is the definition of Session from SearchSOA


A session is a series of interactions between two communication end points that occur during the span of a single connection. Typically, one end point requests a connection with another specified end point and if that end point replies agreeing to the connection, the end points take turns exchanging commands and data ("talking to each other"). The session begins when the connection is established at both ends and terminates when the connection is ended.



Following is the definition of Session from TechTerms.


a session refers to a limited time of communication between two systems.



You may find many other definitions from googling.. I would not go any further searching here..  Following is my own definition of Session.


We usually see two types of the communication format as follows : I think (I hope) you intuitively see the difference between these two formats. A block (sequence) of communication being done in format 2 is called as session.


< Format 1 >

    i) Party A --> Party B : Message

    ii) Party A <-- Party B : Message

    iii) Goes on and on

    iv) Nobody talks... Communication ends


< Format 2 >

    i) Some preparation and agreement between Party A and Party B

    ii) Party A --> Party B : Message

    iii) Party A <-- Party B : Message

    iv) Goes on and on

    v) Party A or Party B notify the end of communication


If you had experience of TCP log in wireshark or any experience of doing a socket program, you may be familiar with Fortmat 2 types of communication. The key point in Format 2 is step i). It is called 'Session Initiation' or 'Session Creation', in most cases it is 'two way (two steps)' or 'three way (three steps)' process but the details of the process varies depending on the type of the session (Refer to TCP protocol page as an example)