THE SETUP :

Terminologies in our project -

SERVER : - The machine in an intranet having access to the internet. Server application of the project is installed & executed on this machine.

CLIENT : - All the machines in an intranet having unique IP address. Client application of the project is installed & executed on these machines.

      The SERVER and the CLIENT directory contains SRC and DOC subdirectories. They hold the .java files and relative documentation.

ENVIRONMENT VARIABLES :

SET the following environmental variables :

SET PATH=yourjavadirectory\bin;%path%

SET CLASSPATH=.;yourjavadir\LIB\CLASSES.ZIP;yourswingdir\ROSE.JAR;yourswingdir\SWING.JAR;%CLASSPATH%

e. g.

SET PATH=C:\jdk1.1.3\bin;%path%

SET CLASSPATH=.;C:\jdk1.1.3\LIB\CLASSES.ZIP;C:\swing-0.2\ROSE.JAR;C:\swing-0.2\SWING.JAR;%CLASSPATH%

Important !!

* Watch out for the case structure of java filenames while compiling.

* You may have to delete all the .class files and rebuild the application. The compiler may not recognise and build all of the modified source files.

RUNNING THE THE APPLICATION :

THE SERVER :

* The first file pulled will be saved as homepage.html. Soon the other files will follow. Recursively all html files with the filename containing the reference string will be pulled. Also the .gif, .jpg or other image files referenced by the html files will get pulled.

* Clipping is performed on the html files so that the URL contains only the filename and not the host and the directory name. Also unwanted links of which the files were not pulled are clipped off.

* The links to the .jpg files in the advt directory are inserted in the html files.

Multiple Clients can be connected to the Server at any given time. While the pulling, clipping and the inserting operation is going on, any Client trying to connect to the Server will display a 'SERVER BUSY' message in the Client's text area. Also "pull on wait" message appearing on the screen states that its time for the next pull and no further Clients are to be serviced by the Server. The pullthread is only waiting for the present Clients to be finished.

Since the pull operation is repeated after a period of time, in the first iteration, for each file, a table of 'last modified' status is made by the server. In the following iterations a 'last modified' check is made for each file. Only the modified files are pulled.

( For demonstration the third file's lastmodified status is changed and this file is pulled in the successive iterations).

THE CLIENT :

It may happen that the server may not respond favourably or may not respond at all. Then make the use of the stop button and try again pressing Connect button.

The client detaches itself from the server after a successful server push.

Confession

User Interface is implemented using Java Foundation Classes. The look and feel could have been more attractive. Our intention was to learn the language & explore ourselves as programmers in implementing  push-pull rather than making attractive user interface.


Vijay Mukhi's Computer Institute
VMCI, B-13, Everest Building, Tardeo, Bombay 400 034, India
E-mail:vmukhi@giasbm01.vsnl.net.in Tel : 91-22-496 4335 /6/7/8/9 Fax : 91-22-307 28 59
http://www.vijaymukhi.com

next >>

Index