The ROWC Distributed System
by Frank McCown
CamProcessor.java - Application that interfaces
with the web cam and makes available the CamManager distributed
object for controlling the web cam remotely.
Server.java - Server application which saves archived media
to the SQLServer database. It makes available the MediaStore remote
object for storing and retrieving archived media.
CamViewer.java - Application that controls the web cam
remotely using the CamManager remote object. It also displays archived
media from the Server using the MediaStore remote object.
MediaStoreImpl.java - MediaStore implementation used by
CamProcessor and CamViewer for saving/retrieving information and media
to/from the Server.
CamManagerImpl.java - CamManager implementation used by
CamViewer to contol a remote web cam.
RegistrationImpl.java - Registration implementation used by
CamProcessor and CamViewer for making known available remote web cams for
(Other misc. Java files are not mentioned)
Other important files:
rowc.idl - Interface specification for all remote objects
project.conf - Properies file used by system indicating the
location and port numbers to be used by the Naming and Event Services. These
properties must be configured for your system before running.
database.conf - Properties file containing host name of
SQLServer database, and username and password. These properties must be
configured for your system before running.
makeproj.bat - Batch file that will build Java files from
MotionDetector.idl and compile all Java source code
The system is composed of three applications:
- for storing the media and making it accessible to Cam Viewers.
- for conecting to the web cam and streaming the video to watching Cam Viewers.
Cam Viewer - for remote control of web
cams. It displays streaming video from Cam Processors and from
the Media Server.
Each of these applications may run on separate computers or on the same
computer. The use of CORBA makes moving the applications from computer to
computer more transparent.
In order to run the system, complete the following instructions:
A web cam should be installed on any computer which will use the Cam Processor
software. The Logitech QuickCam was the only one used for testing the
software. Other web cams which are compatible with JMF are
acceptable. See http://java.sun.com/jmf
for more information.
If you do not have a web cam but still want to use the system for testing
purposes, a QuickTime video file (.mov file) can be used in place of a
live feed to the Cam Processor. See the instructions below for doing
Install JDK 1.3.1 or 1.4.0 from http://java.sun.com
all computers that use the software.
Make sure C:\<java_home>\bin is in your PATH.
Install an RDBMS like MS SQLServer or MySql for which a JDBC driver
exists. The database needs to be accessible to the Media Server on the
network. Drivers for SQLServer are included in the installation
package. This project was built using SQLServer, and some code
modifications will need to be made to use a different database.
A database must be created on SQLServer or MySql that contains a single table
called media that contains the following fields:
location : varchar 50
name : varchar 50
size : int
timestamp : bigint (long)
The database must be given full access permissions to a user named
"mediauser" with the password "mediauser" unless otherwise specified in the
Unzip the file rowc.zip
in a directory called
C:\rowc. This file contains all the class files, jar files, and
configuration files needed to execute the Media Server, Cam Processor, and Cam
Change the project.conf file to indicate the host name on
which the Naming Service will run. Change this line in the file:
from fmccown to your computer's host name.
Change the database.conf file to indicate the host name on
which SQLServer is running and the username and password if different from
The system is now ready to be started. Skip the Build section unless you
would like to re-build the system from scratch.
Building the System
The ROWC system does not need to be re-built. If you would like to do
this, follow these instructions:
To compile the Java source code for the system, you'll need to install ORBacus 4
for Java from http://www.ooc.com/ob
Make sure C:\<orbacus_home>\bin is in your path and
all jar files in C:\<orbacus_home>\lib are in your CLASSPATH.
Unzip the file Source.zip
into a directory called
In a CLW (command line windows - MS-DOS Prompt), cd to C:\Project or the
directory containing the source code and run makeproj.bat by typing:
This will generate all the CORBA java files and compile
everything. No errors will be shown if it completes
successfully. To see exactly how makeproj.bat builds the system, you can
view the file in any text editor.
Running the System
The system is composed of three main processes: the Server, the
CamProcessor, and the CamViewer. Each process may be executed on a
separate computer in a LAN that does not hide any of the computers behind a
firewall. The Naming Service may also be running on any of the computers
(the host name on which the NS is running must be set in project.conf).
The instructions below show how to execute the system on a single machine using
three CLWs. Each CLW represents three different CLWs. Running the
system on different computers would just require the steps taken in each CLW to
be taken on separate machines.
Start 3 different CLWs and cd to the C:\Project directory.
If you have not already added the following jar files to your CLASSPATH,
in each CLW before running any of the applications. This will place the
classes from ORBacus, JMF, and SQLServer JDBC drivers in the
CLASSPATH env var which are needed by the ROWC Java applications.
Start the Naming Service by executing the startup.bat file in the first
CLW. The Naming Service will launch in its own DOS window using the
properties in the project.conf file.
Start the Server in the first CLW by typing: java Server
The Server app will appear with an "Initializing..." message. The
Server is connecting to the SQLServer database, initializing the ORB,
registering the MediaStore and Registration remote objects, and starting
a server socket for incoming media. When it has completed these
tasks the Server will say "Ready."
Start the CamProcessor client by typing java CamProcessor -loc LOCATIONin
the second CLW. LOCATION is the name of the
CamProcessor's location (i.e. "Computer Lab"). If you do not specify a
location, the computer's host name will be used by
If a web cam is not available to the CamProcessor, a QuickTime movie file may
be used instead. The movie file will be what is seen by any watching
CamViewer. To use a movie file, start the CamProcessor using the -file
flag and indicate the full path of the .move file like this: java
CamProcessor -file c:\myvideos\test.mov.
Once the CamProcessor has connected to the web cam (or opened
the movie file), binded to the ORB, instantiated the CamManager object,
and registered the CamManager object with the Naming Service, it will
display a window showing live feed from the web cam.
Start the CamViewer in the third CLW by typing: java CamViewer
The CamViewer will bind to the ORB and bind to the MediaStore and
Registration remote objects. Once the initialization activities have
finished, the CamViewer window will display allowing the user to view
or delete media stored in the Server's database or watch and
record live video from available web cams.
The Naming Service and Media Server must be running at all times for the
CamProcessor and CamViewer to work correctly. Any number of CamProcessors
and CamViewers may be running at the same time, although each CamProcessor must
use a unique location name. Using the default location name (the host
name) is the preferred method.
Note of caution: The Media Server should always be executed
from the same location. When storing media, the actual movie file is
stored in a videos directory located directly off the Media Server's current
directory. All other media information is stored in the database.
If the Media Server changes location, the data for the media will be
accessible, but the actual movie file may not be.