J. Liebeherr

Multimedia Networks Group

University of Virginia

June 2004


HyperCast Peer Networks

HyperCast is a peer-to-peer communication framework where application programs on remote computers can self-organize as a virtual network (“peer network”) and exchange data with each other.  Peer networks in HyperCast can be very large with possibly many thousand applications in a single network. Applications in the peer network can join and leave at any time. HyperCast applications self-organize in a peer network without the need for a central server or centralized coordination. Any application program can participate in several peer networks.

HyperCast is intended for scenarios where a possibly large number of users need to spontaneously form a network to broadcast video, aggregate sensor data, exchange message information or exchange files. While the HyperCast design can work with a very large network of applications, it has also been shown to have great potential for supporting more focused situations such as emergency response systems and military urban operations.

The HyperCast software is being designed and developed at the University of Virginia since 1998. HyperCast is implemented in the Java programming language. The second release of the software, HyperCast 2.0, is available at http://www.cs.virginia.edu/hypercast [HCAST2-0]. The third release of the software, which includes a security architecture and support for mobile ad-hoc networks, is in development and currently (Summer 2004) being  tested.

Network Topologies of Hypercast

Applications using HyperCast can self-organize in a variety of network topologies. The following describes two widely applicable topologies: a Delaunay triangulation topology and a spanning tree topology.

a)      Delaunay Triangulation

A Delaunay triangulation is a special type of triangulation graph. Each node in a Delaunay triangulation has two coordinates (x,y) which depict a point in the plane. If the coordinates reflect a geographical position, then applications in the peer network are likely to be neighbors if their geographical positions are close. In Figure 2, we show a Delaunay triangulation with five nodes. 

The main advantage of a Delaunay triangulation peer network is that it can be constructed quickly in a distributed fashion [LIEBE01b]. Building a Delaunay triangulation peer network with several thousand applications can be completed in a few seconds. Peer networks with a Delaunay triangulation topology have been tested with up to 10,000 applications running on 100 computers (see [LIEBE01b]). Due to its good convergence behavior, the Delaunay triangulation is used as the default topology in HyperCast.

b)      Spanning Tree

This protocol organizes applications in a spanning tree topology (see Figure 3). The protocol for this topology is intended for mobile ad-hoc scenarios. In an ad-hoc environment, after a spanning tree is built to connect a group of mobile devices, data can easily broadcast to all applications along the tree structure without loops or duplicated transmissions.  The spanning tree is the default topology for HyperCast peer networks in an ad-hoc environment. The protocol has been primarily run on PDAs and laptops over IEEE 802.11b (in peer-to-peer mode).

Data transport 

In HyperCast, all data is transmitted along trees that are dynamically embedded in the peer network topology. When an application sends data to all applications (multicast) in the peer network, data is forwarded downstream with the sender as the root of the tree (see Figure 4(a)). One-to-one (unicast) data is sent upstream in an embedded tree with the receiver at the root (see Figure 4(b)).

Application data is exchanged in the peer network as formatted application messages. Each application that participates in a given peer network is identified by a logical address specific to the peer network. When an application sends a message to one of its neighbors in the overlay topology, the message is carried across a transport-layer network, called the underlay network. One example (but not the only example) of an underlay network is the public Internet. Another could be a private IPv6 network. When an application message is transmitted to a neighbor in the peer network, the logical address of the neighbor is translated into a address that is recognized by the underlay network, e.g., an IP address and a port number.

Overlay socketS

The HyperCast software is built around the notion of an overlay socket [LIEBE03], which is defined as an endpoint of communication in a peer network. A peer network is simply a collection of overlay sockets. Application programs that create an overlay socket can (1) set the configuration of the overlay socket, (2) join and leave a peer network, (3) send data to other applications in the peer network; and (4) receive data from other applications in the peer network.

The software architecture of an overlay socket, shown in Figure 5, has the following main components:

·         Overlay Node: The overlay node is responsible for establishing and maintaining membership in the peer network topology. It is the only component of an overlay socket that needs to be aware of the network topology.  

·         Forwarding Engine: The forwarding engine performs the functions of an application-level router.  It is responsible for sending, receiving, and forwarding application data in the peer network.

·         Message Store: The message store is a repository of transmitted messages that can enhance the delivery service of an overlay socket, such as a reliable delivery service, a synchronization service, or a data aggregation service.     

·         Adapters: Messages are transmitted to neighbors in the peer network across an underlay network using a protocol available in the underlay network. If the underlay network is Internet-based, then the available protocols in the underlay network are UDP or TCP. The components in the overlay socket that provide the interfaces to the underlay network are called adapters. Each overlay socket has two adapters, a node adaptor and a socket adapter. The node adapter handles the transmission of control messages for maintaining the peer network topology and the socket adapter is responsible for forwarding application data.

An application program interacts with an overlay socket through a set of interfaces:

·         The overlay socket interface is the main application programming interface (API) of the overlay socket. The message-based interface bears some similarity to Java’s Datagram sockets.

·         The statistics interface is used for monitoring and managing the internal state information of an overlay socket.  

The following components are external to an overlay socket, but interact closely with it:

·         Overlay Manager: The overlay manager is responsible for creating and managing the configuration of an overlay socket and for bootstrapping new peer networks.

·         Management Portal: The (optional) management portal is an access point for remotely accessing the internal state variables of an overlay socket or an application.

Writing Programs with HyperCast

Below is a  fragment of a simple application program that creates an overlay socket which joins a peer network. After joining the peer network, the application sends the string “Hello World” to all applications of the peer network. Then, the application waits for messages sent to the peer network and displays each received message.  The program reads a configuration file with name “hypercast.xml”, which contains all information for configuring a peer network. The program fragment illustrates that writing programs for HyperCast is not very different to network programming for the Internet.

//This is the string we will sent

String MyString = new String("Hello World");


//Create an object that contains configuration parameters

OverlaySocketConfig ConfObj = OverlaySocketConfig.createOLConfig("hypercast.xml");;


//Create the overlay socket

I_OverlaySocket MySocket=ConfObj.createOverlaySocket(null);


//Overlay socket joins the overlay



//Create an application message with “Hello World” payload
I_OverlayMessage msg = socket.createMessage(MyString.getBytes(),     


//Send the message to all members in overlay network


//Infinite loop to receive messages

While(true) {

//Receive a message from the socket
I_OverlayMessage msg = socket.receive();


//Extract the payload
byte[] data = msg.getPayload();


       // Print out the “Hello World” message

System.out.println(“Message is ” + new String(data) + “.”);


Security architecture of Hypercast

The most recent version of HyperCast (version 3.0) includes a security architecture where users can select plaintext, integrity, or privacy for application data [ZARI04].

·         User Authentication: Authentication is managed through X.509 formatted certificates signed by a trusted third party or a designated certificate authority for the peer network.  An application must present its certificate whenever it contacts a new neighbor in the peer network.

·         Key Management: HyperCast implements a novel neighborhood key management scheme where each application shares a key only with its immediate neighbors in the peer network. In this way, changes to the membership of the peer network only require the neighbors of a joining or leaving node to change their keys.

·         Privacy and Integrity: When an application creates a new message it uses a message key to ensure integrity and/or privacy of the message.  The message key is encrypted with a neighborhood key, and attached to the message. When the message is forwarded to a neighbor in the peer networks, only the message key needs to be decrypted and encrypted at the neighbor.


HyperCast Applications

The effectiveness of HyperCast has been demonstrated for numerous utility programs and applications. Simple shared applications, such as a one-to-many file transfer program and a shared whiteboard application are available with the distribution of HyperCast 2.0.  Recently, HyperCast has been used for the development of more complex software systems. These applications include a video broadcasting system for the Internet that transmits live video in encrypted format (at 150 kbps) and unencrypted format (at 500 kbps).  The video broadcast system has also been applied in an ad-hoc network scenario, using laptop computers and PDAs as video sources. Another application is a situation awareness system for supporting emergency responders in Arlington County, Virginia. A prototype of this system has been presented at the Federal Office Systems Exposition (FOSE) as a Homeland Security Demonstration in Washington, DC, in April 2003.

Currently in development is a system for managing and controlling peer networks as a mechanism for establishing communities of common information interests and for providing security services using a trust model based on peer agreement [BAHO04]. The system, called Dynamic Ad-hoc Security Architecture for Peer-to-Peer Networks (DASAP), performs user authentication and information access control simultaneously for a large number of peer networks in a distributed session and without centralized control. DASAP can adapt to evolving information access requirements and a highly dynamic user base. DASAP employs a distributed authentication scheme, which leverages existing public-key infrastructures, a multi-peer agreement process for authorization decisions, and distributed auditing with a centralized final log. 

Also in progress is the development of a geographic-based information distribution system that associates peer networks with geographic areas of interest. Here, whenever a (properly authorized) user wants to send or receive information relating to a specific geographical area, the user simply joins the peer network associated with this area. 

Project Funding

The HyperCast project has been supported in part by the National Science Foundation under grants NCR-9624106, ANI-9870336, and ANI-0085955.  The HyperCast project is part of the Denali project on scalable services for the Global Internet. 


[BAHO04] A. Bahora, B. Horowitz. DASAP – Dynamic Ad-hoc Security Architecture for Peer-to-Peer Networks. Manuscript, 2004.

[BEAM99] T. K. Beam. HyperCast:A Protocol for Maintaining a Logical Hypercube-Based Network Topology. M.S. Thesis, University of Virginia, May 1999.

[HCAST2-0] HyperCast 2.0 Project Website. http://www.cs.virginia.edu/hypercast, 2002.

[LIEBE99] J. Liebeherr and T. K. Beam. HyperCast: A protocol for maintaining multicast group members in a logical hypercube topology. In Proceedings First International Workshop on Networked Group   Communication (NGC '99), Lecture Notes in Computer Science, Volume 1736, pages 72-89, 1999.

 [LIEBE01b] J. Liebeherr, M. Nahas, and W. Si.  Large-scale Application-Layer Multicast with Delaunay Triangulations.  Manuscript, September 2001.

[LIEBE03] J. Liebeherr, J. Wang, and G. Zhang, Programming Overlay Networks with Overlay Sockets, 5th COST 264 Workshop on Networked Group Communications (NGC 2003), LNCS 2816, pages, 242-253, September 2003.

[ZARI04] J. Zaritsky. Scalable Multicast Network Security: Rethinking Key Management. Undergraduate Thesis, School of Engineering and Applied Science, University of Virginia. May 2004.