What Is The Difference Between A Service And A Protocol
Services and protocols¶
An important attribute to understand before studying figurer networks is the difference between a service and a protocol.
In lodge to empathise the departure between the two, it is useful to start with real world examples. The traditional Mail service provides a service where a postman delivers letters to recipients. The Post defines precisely which types of messages (size, weight, etc) tin be delivered past using the Standard Post service. Furthermore, the format of the envelope is specified (position of the sender and recipient addresses, position of the stamp). Someone who wants to send a letter of the alphabet must either place the letter at a Mail service Function or inside one of the defended mailboxes. The letter will then be collected and delivered to its final recipient. Note that for the regular service the Postal service commonly does not guarantee the delivery of each particular letter, some messages may be lost, and some letters are delivered to the wrong mailbox. If a letter is important, then the sender can use the registered service to ensure that the alphabetic character will be delivered to its recipient. Some Post services also provide an acknowledged service or an express postal service service that is faster than the regular service.
In computer networks, the notion of service is more formally defined in [X200] . It can be better understood past considering a computer network, whatsoever its size or complication, every bit a black box that provides a service to users , as shown in the effigy below. These users could be human users or processes running on a reckoner system.
Many users can be attached to the same service provider. Through this provider, each user must be able to exchange messages with whatever other user. To be able to deliver these messages, the service provider must be able to unambiguously place each user. In computer networks, each user is identified by a unique address, we volition discuss after how these addresses are congenital and used. At this point, and when considering unicast transmission, the main characteristic of these addresses is that they are unique. Two unlike users fastened to the network cannot apply the same address.
Throughout this book, we volition define a service every bit a prepare of capabilities provided past a system (and its underlying elements) to its user. A user interacts with a service through a service access point. Note that as shown in the figure above, users collaborate with one service provider. In exercise, the service provider is distributed over several hosts, but these are implementation details that are non important at this stage. These interactions betwixt a user and a service provider are expressed in [X200] by using primitives, as bear witness in the figure beneath. These primitives are an abstract representation of the interactions between a user and a service provider. In practice, these interactions could be implemented as organisation calls for example.
Iv types of primitives are defined :
- X.request. This type of primitive corresponds to a request issued by a user to a service provider
- X.indication. This type of primitive is generated by the network provider and delivered to a user (often related to an earlier and remote X.asking primitive)
- X.response. This type of archaic is generated past a user to answer to an earlier 10.indication primitive
- X.confirm. This type of primitive is delivered by the service provide to confirm to a user that a previous X.request primitive has been successfully processed.
Primitives tin exist combined to model different types of services. The simplest service in estimator networks is chosen the connectionless service [1]. This service can exist modelled past using ii primitives :
- Data.asking(source,destination,SDU). This primitive is issued by a user that specifies, equally parameters, its (source) address, the address of the recipient of the bulletin and the message itself. We will use Service Data Unit (SDU) to name the message that is exchanged transparently betwixt two users of a service.
- Data.indication(source,destination,SDU). This primitive is delivered by a service provider to a user. It contains as parameters a Service Data Unit of measurement as well as the addresses of the sender and the destination users.
When discussing the service provided in a computer network, information technology is often useful to be able to describe the interactions betwixt the users and the provider graphically. A frequently used representation is the time-sequence diagram. In this chapter and later throughout the book, we will ofttimes use diagrams such as the figure below. A time-sequence diagram describes the interactions between ii users and a service provider. Past convention, the users are represented in the left and right parts of the diagram while the service provider occupies the eye of the diagram. In such a fourth dimension-sequence diagram, time flows from the elevation, to the bottom of the diagram. Each primitive is represented past a plain horizontal arrow, to which the name of the primitive is attached. The dashed lines are used to represent the possible relationship between two (or more) primitives. Such a diagram provides data about the ordering of the different primitives, but the distance between ii primitives does not correspond a precise amount of fourth dimension.
The effigy below provides a representation of the connectionless service as a fourth dimension-sequence diagram. The user on the left, having address S, issues a Data.request primitive containing SDU Yard that must exist delivered past the service provider to destination D. The dashed line betwixt the ii primitives indicates that the Data.indication primitive that is delivered to the user on the correct corresponds to the Data.request primitive sent by the user on the left.
At that place are several possible implementations of the connectionless service, which nosotros will discuss later in this volume. Earlier studying these realisations, information technology is useful to hash out the possible characteristics of the connectionless service. A reliable connectionless service is a service where the service provider guarantees that all SDUs submitted in Data.requests by a user will eventually be delivered to their destination. Such a service would be very useful for users, but guaranteeing perfect delivery is difficult in practise. For this reason, computer networks normally support an unreliable connectionless service.
An unreliable connectionless service may endure from various types of problems compared to a reliable connectionless service. First of all, an unreliable connectionless service does not guarantee the delivery of all SDUs. This tin be expressed graphically by using the time-sequence diagram below.
In do, an unreliable connectionless service volition ordinarily deliver a large fraction of the SDUs. However, since the delivery of SDUs is not guaranteed, the user must be able to recover from the loss of any SDU.
A second imperfection that may touch an unreliable connectionless service is that information technology may indistinguishable SDUs. Some unreliable connectionless service providers may deliver an SDU sent past a user twice or fifty-fifty more. This is illustrated by the time-sequence diagram below.
Finally, some unreliable connectionless service providers may deliver to a destination a different SDU than the 1 that was supplied in the Data.request. This is illustrated in the figure below.
When a user interacts with a service provider, it must precisely know the limitations of the underlying service to be able to overcome any trouble that may arise. This requires a precise definition of the characteristics of the underlying service.
Another important characteristic of the connectionless service is whether information technology preserves the ordering of the SDUs sent past one user. From the user'south viewpoint, this is often a desirable characteristic. This is illustrated in the figure below.
However, many connectionless services, and in particular the unreliable services, do not guarantee that they will always preserve the ordering of the SDUs sent by each user. This is illustrated in the effigy beneath.
The connectionless service is widely used in computer networks as nosotros volition see later in this book. Several variations to this basic service have been proposed. One of these is the confirmed connectionless service. This service uses a Data.confirm archaic in addition to the classical Data.request and Data.indication primitives. This archaic is issued by the service provider to confirm to a user the delivery of a previously sent SDU to its recipient. Notation that, like the registered service of the post office, the Information.ostend simply indicates that the SDU has been delivered to the destination user. The Data.confirm primitive does not indicate whether the SDU has been processed by the destination user. This confirmed connectionless service is illustrated in the figure below.
The connectionless service we have described earlier is frequently used by users who need to exchange small SDUs. Users needing to either send or receive several different and potentially large SDUs, or who demand structured exchanges oft prefer the connexion-oriented service.
An invocation of the connexion-oriented service is divided into iii phases. The showtime phase is the establishment of a connexion. A connection is a temporary clan between two users through a service provider. Several connections may be at the same time between any pair of users. Once established, the connectedness is used to transfer SDUs. Connections normally provide 1 bidirectional stream supporting the substitution of SDUs between the two users that are associated through the connection. This stream is used to transfer data during the second phase of the connexion called the data transfer phase. The third phase is the termination of the connectedness. Once the users have finished exchanging SDUs, they asking to the service provider to cease the connectedness. Every bit we volition run across later, there are also some cases where the service provider may demand to end a connection itself.
The establishment of a connection can be modelled by using four primitives : Connect.request, Connect.indication, Connect.response and Connect.ostend. The Connect.asking primitive is used to asking the establishment of a connection. The primary parameter of this primitive is the address of the destination user. The service provider delivers a Connect.indication primitive to inform the destination user of the connexion endeavor. If it accepts to establish a connection, it responds with a Connect.response primitive. At this bespeak, the connection is considered to be open up and the destination user tin beginning sending SDUs over the connectedness. The service provider processes the Connect.response and will evangelize a Connect.confirm to the user who initiated the connection. The delivery of this primitive terminates the connection establishment phase. At this point, the connection is considered to be open and both users can transport SDUs. A successful connection establishment is illustrated beneath.
The example above shows a successful connexion establishment. Notwithstanding, in practice not all connections are successfully established. One reason is that the destination user may not concur, for policy or performance reasons, to establish a connection with the initiating user at this time. In this case, the destination user responds to the Connect.indication archaic by a Disconnect.asking primitive that contains a parameter to indicate why the connection has been refused. The service provider volition then deliver a Disconnect.indication primitive to inform the initiating user. A second reason is when the service provider is unable to reach the destination user. This might happen because the destination user is not currently attached to the network or due to congestion. In these cases, the service provider responds to the Connect.request with a Disconnect.indication primitive whose reason parameter contains additional information about the failure of the connection.
Once the connection has been established, the service provider supplies 2 data streams to the communicating users. The first data stream can be used past the initiating user to send SDUs. The 2nd data stream allows the responding user to transport SDUs to the initiating user. The information streams can be organised in different ways. A first organization is the message-mode transfer. With the bulletin-style transfer, the service provider guarantees that one and simply 1 Data.indication will be delivered to the endpoint of the data stream for each Data.asking archaic issued by the other endpoint. The bulletin-mode transfer is illustrated in the figure below. The main advantage of the message-transfer way is that the recipient receives exactly the SDUs that were sent by the other user. If each SDU contains a command, the receiving user can procedure each command every bit presently as it receives a SDU.
Unfortunately, the message-mode transfer is non widely used on the Internet. On the Cyberspace, the almost popular connection-oriented service transfers SDUs in stream-way. With the stream-mode, the service provider supplies a byte stream that links the two communicating users. The sending user sends bytes past using Data.request primitives that incorporate sequences of bytes as SDUs. The service provider delivers SDUs containing consecutive bytes to the receiving user by using Data.indication primitives. The service provider ensures that all the bytes sent at one end of the stream are delivered correctly in the same order at the other endpoint. However, the service provider does not attempt to preserve the boundaries of the SDUs. At that place is no relation enforced past the service provider between the number of Information.request and the number of Data.indication primitives. The stream-way is illustrated in the figure beneath. In do, a consequence of the utilisation of the stream-mode is that if the users want to substitution structured SDUs, they will need to provide the mechanisms that allow the receiving user to separate successive SDUs in the byte stream that it receives. As nosotros will see in the side by side chapter, application layer protocols often use specific delimiters such equally the end of line character to delineate SDUs in a bytestream.
The 3rd phase of a connection is when it needs to be released. As a connection involves three parties (two users and one service provider), whatsoever of them can request the termination of the connectedness. Commonly, connections are terminated upon request of 1 user once the data transfer is finished. However, sometimes the service provider may be forced to finish a connection. This can be due to lack of resources within the service provider or because one of the users is not reachable anymore through the network. In this case, the service provider volition result Disconnect.indication primitives to both users. These primitives will contain, as parameter, some information about the reason for the termination of the connection. Unfortunately, as illustrated in the effigy beneath, when a service provider is forced to terminate a connection it cannot guarantee that all SDUs sent past each user take been delivered to the other user. This connection release is said to be abrupt as information technology tin can cause losses of data.
An precipitous connection release can also be triggered past one of the users. If a user needs, for any reason, to terminate a connection apace, information technology can issue a Disconnect.request primitive and to asking an precipitous release. The service provider volition process the request, stop the two information streams and deliver the Disconnect.indication primitive to the remote user as soon as possible. As illustrated in the figure below, this abrupt connection release may cause losses of SDUs.
To ensure a reliable delivery of the SDUs sent by each user over a connection, we need to consider the two streams that compose a connection equally independent. A user should be able to release the stream that information technology uses to transport SDUs once information technology has sent all the SDUs that it planned to transport over this connection, but however continue to receive SDUs over the contrary stream. This graceful connection release is usually performed equally shown in the figure below. One user issues a Disconnect.asking archaic to its provider once it has issued all its Data.request primitives. The service provider will wait until all Data.indication primitives take been delivered to the receiving user earlier issuing the Disconnnect.indication primitive. This primitive informs the receiving user that it will no longer receive SDUs over this connection, but information technology is still able to outcome Data.request primitives on the stream in the reverse direction. One time the user has issued all of its Data.asking primitives, it issues a Disconnnect.request archaic to asking the termination of the remaining stream. The service provider volition process the request and deliver the corresponding Disconnect.indication to the other user once information technology has delivered all the pending Information.indication primitives. At this point, all data has been delivered and the two streams have been released successfully and the connection is completely airtight.
Note
Reliability of the connexion-oriented service
An important betoken to note near the connection-oriented service is its reliability. A connection-oriented service can just guarantee the correct delivery of all SDUs provided that the connection has been released gracefully. This implies that while the connection is active, there is no guarantee for the actual delivery of the SDUs exchanged as the connectedness may need to be released abruptly at any time.
Footnotes
[1] | This service is chosen the connectionless service because in that location is no need to create a connection earlier transmitting any information in contrast with the connectedness-oriented service. |
What Is The Difference Between A Service And A Protocol,
Source: https://www.computer-networking.info/1st/html/intro/services-protocols.html
Posted by: olaguebrid1984.blogspot.com
0 Response to "What Is The Difference Between A Service And A Protocol"
Post a Comment