Go to the first, previous, next, last section, table of contents.

The Internal Protocol

All ProtoGen applications prefer to use TCP/IP networking communications driven by a very simple lower layer protocol, called the "Internal LLP" (ILLP). The ILLP just provides some session layer support on top of the fine TCP transport protocol. The ILLP resembles the new T/TCP protocol (2) in many respects.

Assumptions

The internal LLP assumes that a transaction is the exchange of one pair of messages. The `request message' is passed from the client to the server, which sends a `response message' back to the client. It is meant to meet the following needs:

  1. be as simple as possible
  2. signal the end of a message as an `end of file'
  3. allow a site to cancel and restart the message that it is currently about to send

The internal LLP is supposed to use UNIX domain stream type sockets as it's channel and probably will not run on any other channel. This is because the protocol depends on specific properties of the channel that only the UNIX domain stream type socket has: Reliable sequenced unduplicated transport of data bytes governed by a stream semantic along with the immediate notification of the existence of out-of-band data. The latter property is not guaranteed by Internet domain TCP type sockets. It is because of this, that the internal LLP is never an option for transactions between different machines.

Unfortunately out-of-band (OOB) messages are not supported on 4.3BSD (Net2), 4.4BSD (lite), and HPUX-9 UNIX domain sockets, nor am I aware of any Unix system that does implement OOB data for Unix domain sockets and I suspect that there is no such implementation at all. However OOB data is supported in Internet domain sockets, with the limitation that transmission may be delayed.

Normal Operation


             CLIENT                          SERVER

A.                      CONNECTION SETUP

1.      connect to server               accept connections

                             yields

                newly opened, bidirectional, stream
                type socket

2.      write                           read

                from-address as a character string
                delimited by ASCII STX

B.                      REQUEST MESSAGE

3.      write                           read

                        message data

4.      shutdown write part of          read returns 0 delivered as
        socket                          `end of file' condition to
                                        higher layers

C.                      RESPONSE MESSAGE

5.      read                            write

                        message data
        
6.      read returns 0 delivered as     shutdown write part of
        `end of file' condition to      socket
        higher layers

D.                      CONNECTION SHUTDOWN

7.              socket became unusable since it is 
                mutually widowed on both ends

        close socket                    close socket

Exceptions

Restart Message

The site which is about to send a message may restart the transmission of the same message by sending the single ASCII character STX out of band. The other site is notified of the exception by a SIGURG signal. Upon reception of SIGURG the receiving site discards all data up to the mark, which indicates when the exception occurred. The receiver restarts reception of the message immediately after that mark.

Cancel Transaction

The site which is about to send a message may cancel the whole transaction by sending the single ASCII character CAN out of band. The other site is notified of the exception by a SIGURG signal. Any site may abort the transaction without further notification when it is not currently about to send a message. The notification is only necessary in order to allow the receiving process to distinguish between normal end of message block and abort.


Go to the first, previous, next, last section, table of contents.