Tuesday, October 29, 2013

Session Layer

The session layer is right below the presentation layer in the OSI model. The session layer's responsibilities are centered around allowing applications on different systems to communicate with one another. When an application on one system needs to speak to another, a session must be established. Once a session has been established, the applications are able to freely share data. The session layer provides the functionality of establishing, maintaining, and removing the session. Once the conversation is over, the session layer will remove the session and release any resources it was using. A similar analogy is making a phone call. If I want to speak with you I will call your phone to initiate a session. Once you answer the session is active. We can then talk back and forth. At the end of the conversation we hang up and the resources that were committed to our session are now released for others to use. This is known as dialog management.

When the session layer sets up the connection, there are three types of connection it may use. Each affects how data will flow from one machine to the other. These modes are:

  • Simplex - Communication takes place in one direction
  • Half-duplex - Communication takes place in both directions, but only one application can send information at a time
  • Full-duplex - Communication takes place in both directions, and both applications are able to send information simultaneously
It may seem like it would make the most sense to just always have a full-duplex connection because this would allow both applications to easily communicate, but this isn't the case. In computing we always have to be mindful of the resources we are consuming, so if we can manage with less it's best to do so. A simplex connection requires less overhead and is perfect for any operation where only one system needs to be able to send information. Similarly, half-duplex is great for if each system only needs to periodically update one another.

There is often times confusion about how the session layer is different from the transport layer. The transport layer is responsible for establishing and controlling connections between systems. This is very similar, but the difference is the level they work at. The transport layer is concerned with computer to computer communication, while the session layer is concerned with application to application communication.

Some protocols that function at this level include Structured Query Language (SQL), NetBIOS, and remote procedure call (RPC).

No comments:

Post a Comment