Protocol

=VAST Protocol 0.2=

This page describes a common specification of the VAST protocol. The main purpose of the protocol definition is to facilitate interoperability among different implementations of the VAST mechanism using different programming languages.

The protocol thus is language-independent, and should be well-specified so that it may be supported (at a binary transmission level) by different VAST implementations. For efficiency, the protocol is defined to be a binary protocol. All data is sent in //little-endian// (used by the x86 family processors).

Parameter Types
We first define the possible parameters sent within a VAST message. The abbreviations below are the basic data types used in VAST:

uint8: 8-bit unsigned integer uint16: 16-bit unsigned integer uint32: 32-bit unsigned integer uint64: 64-bit unsigned integer float: 32-bit floating value bool: 8-bit unsigned integer (same as uint8)

AOI (aoi), relay (addr) || subscription info || msgtype (uint16), msggroup (uint8), priority (uint8), reliable (bool), target_length (uint8), [targets] (node-id), content (variable) || a serializable VAST message ||
 * Note: Bracket [] indicates a list**
 * ===Parameter=== || ===Contains (size in bytes)=== || ===Notes=== ||
 * node-id || unique id (uint64) || system-wide unique ID ||
 * timestamp || time (uint64) || logical time in the system ||
 * pos || X (float), Y (float), Z (float) || coordinates for a node ||
 * aoi || center (pos), radius (float), height (float) || an area with a center ||
 * IP || host (uint32), port (uint16), padding (uint16) || IP address & port for a node ||
 * addr || host-id (node-id), last access (timestamp), publicIP (IP) || a node address for connection ||
 * node || id (node-id), time (timestamp), AOI (aoi), address (addr) || full info about a VAST node ||
 * sub || host-id (node-id), sub-id (node-id), layer (uint16),
 * msg || from (node-id), size (uint32),
 * update || self (node) || a full position update (with AOI) ||
 * update_lean || X (float), Y (float), time (timestamp) || a lean position update (without AOI) ||
 * || payload size || application message size ||

**Message Types**
disconnect message (used only internally) ||  ||   ||   || to find an acceptor that can take in a joining node || node ||  || reliable || to let a newly learned node to be mutually aware || node || **VON_HELLO_R** || reliable || hello response ||  ||   || reliable || enclosing neighbor inquiry (to see if my knowledge of EN is complete) || [node-id] ||  ||   || to notify AOI neighbors of new/current position || update_lean ||  ||   || move notification with full notification on AOI || update ||  ||   || move notification to boundary neighbors || update_lean || **VON_NODE** ||  || move notification to boundary neighbors with full notification on AOI || update || **VON_NODE** ||  || disconnect a remote node ||  ||   ||   || notification of new nodes || node ||  ||   || notify gateway of a candidate matcher node ||  ||   ||   || promote a candidate matcher to be functional ||  ||   ||   || overload request for matcher insertion ||  ||   ||   || overload request for matcher movement ||  ||   ||   || a new matcher node has joined successfully ||  ||   ||   || transfer ownership of an object to neighbor matcher ||  ||   ||   || acknowledgment of ownership transfer ||  ||   ||   || request for an object's info ||  ||   ||   || to send messages to all child nodes that integrate the AOI || msg ||  ||   ||
 * Note: Bracket [] indicates a list**
 * ** No ** || ** Types ** || ** Parameters ** || ** Expected Reply ** || ** Notes ** ||
 * 0 || ** VON_DISCONNECT **
 * 1 || **VON_QUERY**
 * 2 || **VON_HELLO**
 * 3 || ** VON_HELLO_R **
 * 4 || **VON_EN**
 * 5 || **VON_MOVE**
 * 6 || **VON_MOVE_F**
 * 7 || **VON_MOVE_B**
 * 8 || **VON_MOVE_FB**
 * 9 || **VON_BYE**
 * 10 || **VON_NODE**
 * 11 || **VSO_CANDIDATE**
 * 11 || **VSO_CANDIDATE**
 * 12 || **VSO_PROMOTE**
 * 13 || **VSO_INSERT**
 * 14 || **VSO_MOVE**
 * 15 || **VSO_JOINED**
 * 16 || **VSO_TRANSFER**
 * 17 || **VSO_TRANSFER_ACK**
 * 18 || **VSO_REQUEST**
 * 21 || **VOROCAST_FORWARD_MSG**
 * 21 || **VOROCAST_FORWARD_MSG**
 * A list of enclosing neighbors' IDs is sent
 * A list of enclosing neighbors' IDs is sent
 * A list of enclosing neighbors' IDs is sent
 * A list of enclosing neighbors' IDs is sent
 * A list of enclosing neighbors' IDs is sent
 * A list of enclosing neighbors' IDs is sent


 * Interaction Flow**