|  | 13.1 | The Session Layer
| 13.1.1 | The session layer overview

Networking processes often occur in less than a second, making them difficult to "see". By using analogies you can understand more clearly what happens during these processes. The following analogy helps explain the session layer: You have just had an argument with a friend. You are now communicating (referred to, here, as a "rap session" or "session") with him/her, to discuss the state of your friendship. You are using the Instant Mail feature on America On Line (AOL) or an Internet Relay Chat (IRC). However, there are two problems that may interfere with your session. The first problem is that your messages may cross during your conversation. You may both type messages at exactly the same time, thus interrupting each other. The second problem is that you need to pause (to save your current conversation as a file) or to check each other’s previous conversation (for clues to the cause of the argument), or re-synchronize your communication after an interruption.

To solve the first problem, you should establish a protocol, or set of protocols, that dictate rules for communicating with each other. This means that each of you would agree to a set of guidelines to use during the conversation (e.g. taking turns sending messages to avoid interrupting each other). This is referred to as two-way alternate communication. Another solution is that each person would type whenever he/she wishes, regardless of who is transmitting, and you would assume that more information is always on the way. This is referred to as two-way simultaneous communication.

To solve the second problem, you should send a checkpoint to each other, which means that each person should save the conversation as a file. Then, each person should re-read the last part of his/her conversation and check the time on the clock. This is referred to as synchronization.

Two very important checkpoints are how the conversation starts and how it ends. This is referred to as orderly initiation and termination of the conversation. For example, when you use Instant Mail or Internet Relay Chat, good-byes are usually exchanged before terminating a session. The other person then realizes you are ending the session.

To help understand what the session layer does let's use the same analogy in another way. Imagine that you are communicating with a pen pal via the postal service. The same problems might occur. Messages could pass each other because you haven't agreed to use two-way simultaneous communication rather than two-way alternate communication; or you could experience poor communication because you haven't synchronized the subjects of your conversations.