*******************************
* Ideas on Data Serialization *
*******************************

1. Overview of XDR
(1) What are the features of XDR
    a. Used in SunRPC
    b. Symmetric conversion
    c. No tags
    d. Primitive data types:
       integers, floating point numbers, enumerations and booleans
    e. Constructed data types:
       strings, arrays, opaque data, unions, pointers

(2) How to use XDR for data serialization
    a. Don't have to use RPCGEN 
    b. Use XDR library routines plus programmer-supplied conversion routines
    c. XDR streams: memory streams, I/O streams, record streams
    d. Example of memory streams:
       xdrmem_create (xdrs, buf, BUFSIZE, XDR_ENCODE);
       xdr_int (xdrs, &i);
       xdr_destroy (xdrs);
    e. Construct conversion routines for more complicated data types 

2. Overview of NDR
(1) What are the features of NDR
    a. Used in DCE RPC
    b. Asymmetric conversion
    c. Architecture tag to specify:
       big endian or little endian for integer representation
       ASCII or EBCDIC for character representation
       IEEE or IBM or CRAY or VAX for floating-point representation
    d. Primitive data types:
       booleans, integers and enumerated types, floating-point numbers, uninterpreted octets 
    e. Constructed data types:
       arrays, strings, structures, unions, pipes, pointers 

(2) How to use NDR for data serialization
    a. Use IDL encoding services stubs which are generated by IDL compiler
       with Interface Definition File and Attribute Configuration File
    b. Similar to XDR libray routines, but can't be provided by programmer

3. Comparison of XDR and NDR
(1) Symetric v. Asymetric conversion
    a. Asymetric conversion allows more flexibility
    b. Symmetric conversion doesn't require the architecture tag

(2) NDR supports more data types
    a. Conformanent arrays, varying arrays, conformanent-varying arrays
    b. Array of strings, structures containing arrays
    c. Pipes

(3) Availability
    a. XDR library is widely available
    b. DCE IDL compiler for NDR is not
