A protocol is a method of communication between entities. By its very definition, a protocol is 'open'. Any two entities which use it can communicate with each other. Broadly speaking, a protocol has three parts.
A good protocol definition has several attributes which can be verified by formal or informal methods:
A protocol is consistent, if all events or sequences of events leads to an internal state and an external action which is predictable and repeatable to a reasonable degree of scrutiny.
A protocol is correct if all paths involving the same sequence of events achieve the same state, assuming that the start was equivalent.
A protocol is live if for every state (other designated 'dead' states), there is a defined transition to the rest of the protocol space.
A protocol is predictable if the effect of the initial event/state diminishes as time passes. Otherwise, the protocol is said to be infinitely sensitive to initial conditions.
Though protocol engineering has happened for a long time, the first discussion of protocol engineering as a formal science coincided with the development of the OSI reference protocol stack. This also coincided with a great deal of interest in formal methods for protocol verification, etc. The OSI model, though not widely used, was a very interesting reference for studying protocol design in abstraction. Some of the issues that were discussed at that time are valid today.
A fundamental context of protocol engineering is the concept of event delivery and service access between layers. Events can be either messages and/or timers.
Services are typically functions which are executed by a lower layer, using parameters provided by the upper layer. Services are nearly always invoked by the upper layer.
Appropriate design of event handling is challenging for software design, because events occur at any time and may contain data which is contextual to that flow only. Software is typically not designed to operate in this manner - software procedures are written to be sequential, starting at one particular point. There are two workarounds that are used, both of which have their limitations. In the first, the event handling is queued or deferred till the software reaches a particular point in the processing chain is reached; typically, the top of a waiting loop. In the second, the event is responded to instantly, but the processing is done in a separate function or thread and the outcome has to be integrated into the context of the main program separately. Both are a problem. Unlike hardware interrupt handlers, it does not allow for pre-emption, which is a very fundamental aspect of event handling. Also, without a context for event handling, it is difficult to verify correctness of the operation.
A second issue, similar to the problem of event handling is that of service access. Services are provided to higher layers by the layer immediately below. There are multiple problems to be solved with service access. One is the mode of access; how does a higher layer communicate with a lower layer. The second is the response to access. How does the lower layer respond and what information should it have so as to provide a meaningful response. See [Saha97] for one attempt to solve this problem.
There have been multiple attempts at solving the problems mentioned above, typically by specifying new languages which fit the appropriate paradigm. See [Muffke04] for an excellent introduction.
We now look at practical issues of designing a protocol stack, some of which have been hinted at previously. Let us reopen the discussion on function vs threaded design we have touched upon briefly earlier. The choice is between implementing a protocol layer as a set of atomic procedures or as an autonomous entity . There are various pros and cons
There are many protocols which are meant to work in an distributed environment, with a large and sometimes unknown number of users. Examples include Ethernet, Aloha, cache coherency protocols for symmetric multiprocessing systems, bus management systems, etc. Design and implementation of a distributed protocol is especially challenging, since it is too difficult to test with large numbers of IUTs.
This section is to be extended.
Application level framing was first proposed by Clark and Tennenhouse in the 1990s [ALF90]. The purpose of ALF was to create a new genre of protocol stacks, where the application has full knowledge and control over the outgoing packet all the way down to the bottom layer of the protocol stack. In ALF, the final data packet is very much dependent on the kind of application level data that it is carrying. The purpose of ALF was manifold. First, the intention was to percolate the nature of the data being transmitted down to the lower layers, so that the lower layers could make intelligent choices in the case of error situations. One common example is the delivery of video buffers; when there is a loss of data, it might make more sense to deliver complete buffers in out-of-order sequence, rather than wait for the complete sequence to be recovered before delivering the data to the layers above. The latter can mean a sudden rush of processing load on the higher layer. The second was to streamline processing of data packets through the stack, especially for high-performance data transfer protocols.
Key concepts in ALF are already very much in use throughout the world of data protocols. For example, IP fragmentation is disabled through most of the Internet, and TCPs directly discover and use the appropriate MTU to reduce load on the IP system. The design of the adaptive coding and modulation feature in the GPRS physical layer was done so that the link layer could refragment packets more easily. Realtime Transport Protocol or RTP is a full scale implementation of a protocol based on ALF principles. In RTP, the base protocol spec is supplemented by different profiles, which provides different packet formats depending on what it is carrying i.e. G.711 voice, video, etc. This is directly controlled by the application using RTP.
[Estelle91] Budkowski, Dembinski, "An introduction to Estelle: A specification language for distributed systems", Computer Networks and ISDN Systems, 1991 [Saha97] Abheek Saha, Maharaj Mukherjee, P.Dhar, "Design and implementation of a Network SAP for OSI compatibility", Computer Networks and ISDN Systems, 1997 [Muffke04] Muffke, "A better way to design communication protocols", Ph.D. Thesis, University of Bristol, 2004 [Uyar01] Uyar, Fecko, Duare,Sethi, "A formal approach for development of network protocols," 2001 [ALF90] Clark, Tennenhouse, "Architectural considerations for a new generation of protocols", Proceedings of the ACM Sigcomm'90 (1990)
Page Information
|
Wiki Information |
Recent PBwiki Blog Posts |