By:  Millie Ives
Professor:  Dr. Mark Pullen

DOWNLOAD  Click here to download a zipped file of this documentation and the source code.

Table of Contents

1 - Abstract
2 - MBONE Introduction
3 - MBONE Applications
4 - Audio Recorder
      4A - Version 1
      4B - Version 2
5 - DIS-Java-VRML Introduction
6 - DIS Logger
     6A - Version 1
      6B - Version 2
 7 - Summary


    The purpose of this project was to create a "logger" (a record and playback utility) for the DIS-Java-VRML group.  Since this was my first introduction to DIS, Java and VRML, I decided to create a JAVA recorder for an MBONE audio application first.  I then generalized to audio recorder to capture and playback the DIS-Java-VRML packets as well.  This paper gives a brief introduction to the MBONE and DIS-Java-VRML.  It also documents the audio and DIS-Java-VRML "player" applications.

DIS                Distributed Interactive Simulation
**  VRML         Virtual Reality Modeling Language
***  MBONE    Multicast Backbone


    The MBONE is a virtual network on top of the Internet.  It was created to facilitate group communications over the Internet.  Using the standard unicast (one to one) scheme to communicate with a group of people, you would have to replicate the packets "n" times in order to communicate with "n" people simultaneously.  Using multicast over the MBONE, you can send the same packet to all "n" recipients.  This is more bandwidth efficient.

    The MBONE was created because most of the Internet routers do not handle multicast packet streams.  The MBONE is actually a network of islands that are able to support IP multicast.  These islands are connected to each other via point-to-point links called tunnels.

    In order to join the MBONE, you need to set up a "tunnel" to a multicast router you need to install some software on your network and ensure your Internet provider supports multicast.  For tips refer to the following links:   Dan's Quick and Dirty Guide to Getting Connected to the MBONE  and  the MBONE faq.


    Once you are on the MBONE you can try out some of the free group multimedia software that are available.  The available software can be categorized as follows:

    For a list of the available software refer to the following link  Index of MBONE Software

        Visual Audio Tool (VAT)

    For this project, I decided to use vat.  Although the Robust Audio Tool (rat) will usually provide better performance than vat, vat is more widely used.  Perhaps the most important reason I chose vat was because I had some source code for a vat utility (record and playback) written in "C" by Anders Klemets in 1992 .  A former student of Dr. Mark Pullen, Michael Benson, gave me the source code.  I have tried to find the code on the Internet, but have not been successful.


    I studied Klemets code and created two Java audio recorders.

    Network programming in Java is much simpler than in "C".  The major steps are noted below:

    The vat application uses Real Time Protocol (RTP).  Certain parts of this protocol can be seen in the code.  Here's the vat header:


Time Stamp (in Audio Samples)
   VER - Protocol Version Number (2 bits)
    NSID - Number of Speaker ID's
    TS - time stamp 1 bit -- 0 or 1
    Audio Format - encoding number (i.e. 0 is 8 kHz mulaw encoded PCM)
    Conference ID - 16 bits
    Time Stamp -  [in audio samples] 32 bits
    <0 to 63 4-byte speaker id's> - in this case the IP or the sender
    <audio data>
    * taken from vat.h Copyright 1991 Regents of the University of California

    When recording audio, you first increment the NSID by one.  Then, you add the IP address of the sender to the header.  Then you add the data received.  Therefore, the actual packet length is incremented by 4 bytes.
Version 1

    Version 1 allows the user to record and play back vat packets.  Version 1 is close to version Klemets wrote in "C".  One major change was that I used only one file to record the packets.  Klemets used one file every "n" seconds (i.e.., one file every 60 seconds).  Another change was I did not send out any session packets.  This version provides the user with a user interface.  Klemets version uses a command line interface.  This version writes the packets directly to a file.

    The format of the file is similar to the format used by Klemets.  There are two masks:  LEN_MASK and
    I have provided a User's Guide for this application.  User's Guide Audio Player Version 1

Version 2

    Since version 1 wrote directly to a file, it did not have a rewind and fast forward capability.  Version 2 uses a linked list as a temporary structure to keep the packet data.  With this version, the user can now record, play back, rewind and fast forward the audio files.
    I have provided a User's Guide for this application.  User's Guide Audio Player Version 2


    DIS-Java-VRML is the nexus of DIS, Java and VRML.  Using the DIS protocol and the Java and VRML language you can create distributed simulations over the MBONE using virtually any platform (unfortunately I don't know of any good SUN VRML browsers).  "The IEEE Distributed
Interactive Simulation (DIS) Protocol is used to communicate state information (such as position,
orientation, velocities and accelerations) among multiple entities participating in a shared network
environment. Java is a portable networked programming language that can interoperate on any computer
which includes a Web browser. The Virtual Reality Modeling Language (VRML) enables
platform independent interactive three-dimensional (3D) graphics across the Internet, and can be used to
compose sophisticated 3D virtual environments." [Brutzman, Project Overview]

    In order to create the logger, I had to learn very little about VRML.  I used the available examples in the Naval Post Graduate School' s DIS-Java-VRML web pages to create sample DIS packets.  I used the EspduTransformTrace.wrl (Vehicle in the Monterey Bay World) as a sample world.

    The DIS protocol specifies several types of Protocol Data Units listed in the DIS Data Dictionary.  I tested the application using EntityStatePDUs.  It should work for any PDU.  The DIS PDU Header does not require the programmer to make any changes to the received data packet prior to recording the data.  Unlike the vat packet, wherein you had to increment the NSID and add the IP of the sender to the packet, you simply have to record the packet as is.

 DIS "LOGGER" - DisPlayer

    The code for the DIS Logger was essentially the same as the audio recorder.  I just simplified the recorder.  In the audio recorder, I had to make changes to the packet that was received prior to writing it to the file or saving it to the linked list.  For the DIS Player application, I simply wrote the packet I received to the file or save it to the linked list.

 Version 1
    Version 1 writes directly to the file.

    I have provided a User's Guide for this application.    User's Guide DisPlayer Version 1

Version 2

    Version 2 uses a linked list.

    I have provided a User's Guide for this application.   User's Guide DisPlayer Version 2


    I have create very simple Java application utilities for recording and play back of vat audio packets and DIS packets.  The players only play back based on the time the packet was received -- not based on the time the packet was sent.  The two versions have their own limitations.  The first version does not have a fast forward and rewind utility.  The second version can become a memory hog if you try to record for long periods.