Lecture Notes for Client-Server Interfaces

26 February 2002 - The Presentation Layer and XDR


  1. host architectures - data types and structures

    1. each host potentially has a different architecture and representations

    2. local and remote representations

  2. the presentation layer - conversion to a common data format

  3. asymmetric conversion - one side converts to the other side

    1. at the server - many possible client hosts; serial execution

    2. at the client - fewer server hosts; exploits natural concurrency

    3. keeping up with many and varying architectures is a pain

    4. portable software encounters the NxM problem

  4. symmetric conversion - both sides convert to a common format

    1. each side does constant work, but both sides do it

    2. ip's standard network byte order for multi-byte values

    3. each side writes to the common format, ignoring the other side

    4. generic common formats can be expensive in time and space

  5. sun's external data representation (xdr)

    1. an ietf standard - rfc 1832

    2. specifies data types and formats for transmittable data

    3. the atomic and composite data types - bool int array struct union

    4. xdr representations are not self-describing - both sides must agree

    5. xdr conversion routines

      1. the xdr stream - the receiver of encoded data or the supplier of decoded data

        1. xdr streams may involve a memory buffer (xdrmem_create()), a tcp socket (xdrstdio_create()), or a udp socket (xdrmsg_create())

        2. tcp xdr streams are a bit obscure

      2. call translation type routines on the stream

        1. xdr_bool(xdrs, &boolv);

        2. direction (encode, decode) determined by the stream definition or operation (stream read or write)

  6. open-system interconnect (osi)

    1. abstract syntax notation one - asn.1 (x.208)

    2. basic encoding rules - ber (x.209)

    3. an iso standard

    4. asn.1 is self-describing - arbitrary other sides can receive and decode asn.1 encoded messages (almost)

    5. used in simple network management protocol (snmp)

    6. an expensive protocol

  7. object management group (omg) common object request broker architecture (corba) intermediate definition language (idl)


This page last modified on 26 February 2002.