Back to Naming Service Examples Page Back

Naming Service Example: Video on Demand

Description

This example demonstrates how to:

We illustrate the use of the OpenFusion Naming Service by considering a video-on-demand system. In a video-on-demand system we have a VideoServer that can provide video feeds (Video Machine) and a VideoClient (Television Set) that wishes to receive a video feed. The Naming Service can be used by the video feed provider to register its services. A client can then locate the video feed they are interested in by using the Naming Service.

This example demonstrates the simple use of the Naming Service to create a naming service graph, containing naming contexts and CORBA Objects, which can be accessed by CORBA Client Objects. This example is therefore split into two components:

The diagram below shows how the VideoServer (the Video Machine) and the VideoClient (the Television Set) interact with the OpenFusion Naming Service and each other.

Using the Naming Service

This example uses the following source files: FilmImpl.java, VideoServer.java, VideoClient.java, and Video.idl.

How To Run This Example

First make sure the OpenFusion Naming Service is running on your network.

If using an ORB which requires persistent POAs to be registered before they can be activated, ensure that the OpenFusion.NamingVideoServer POA is registered.

  1. Start the VideoServer. To do this, type:
    run -x com.prismt.cos.CosNaming.examples.Video.VideoServer

    This should output "Entering Server Loop..." upon successful execution. The server now waits for requests from Client objects (see below).

  2. In a new window, run the client program. To do this, type:
    run -x com.prismt.cos.CosNaming.examples.Video.VideoClient

    The program should terminate after it retrieves a film name and its certificate and description. These details should be printed to screen.

After running the example, expand the Naming Service tree node in the OpenFusion Administration Manager browser and choose the Naming Service Manager from the NameSingleton's pop-up menu by right-clicking on the node. You should be able to view the naming contexts and objects that have been bound into the Naming Service.


PrismTech TOP
Top