Pages

Tuesday 3 November 2015

Services Vs Protocols



 A service is a set of primitives (operations) that a layer provides to the layer above it. The service defines what operations the layer is prepared to perform on behalf of its users, but it says nothing at all about how these operations are implemented. A service relates to an interface between two layers, with the lower layer being the service provider and the upper layer being the service user.


A protocol, in contrast, is a set of rules governing the format and meaning of the packets, or messages that are exchanged by the peer entities within a layer. Entities use protocols to implement their service definitions. They are free to change their protocols at will, provided they do not change the service visible to their users. In this way, the service and the protocol are completely decoupled.


In other words, services relate to the interfaces between layers, as illustrated in Fig. . In contrast, protocols relate to the packets sent between peer entities on different machines.





In respect with programming languages, a service is like an abstract data type or an object in an object-oriented language. It defines operations that can be performed on an object but does not specify how these operations are implemented.

A protocol relates to the implementation of the service and as such is not visible to the user of the service.





No comments:

Post a Comment