Java Remote Viewer for NAT Networks on both sides

This Project was done during the Lecture 'Internet Programming 3' at DSV Stockholm.

Motivation

In case of Remote Support, there exist a lot of Tools, also a lot of Freeware. But especially the Freeware Tools (VNC, etc) do not work in a special case, when both parties are behind a NAT Router. For this special Problem exist some commercial Applications, which operate with a server with direct connection to the Internet, to which both parties connect. For example Teamviewer, which is free for non commercial use. But in this case one has to give trust to the company who operates this Services.
So the basic Problem is:

The simplest way to do this, is to use a running server on the internet. There are a lot of free servers avaiable, for example php, web, mysql, svn, cvs, etc . I decided to use a MySql Server, because there are a lot of free servers avaiable, it avoids data race conditions because of its internal transaction safe model.

General

The RecorderProgram catures screen, sends this basic Screenshot to the Connector. The ViewerProgram grabs the basic Screenshot from the connector. A Connector can be a MySql Server, or a File (Settings.xml). After that, only differences to this basic screenshot are submitted. If the differences are too big (settings.xml) a new basic screenshot is taken, to reduce future difference frame sizes. All Data is gzip compressed.

Usage

First, adapt Settings.xml, especially the fileFolder Property must point to the location where index.html is!!
Start rec.bat Launches the XML RPC Server
Start rec.bat at the Host to be monitored.
Start player.bat at the monitoring host.
Open index.html, which acts as viewing application.

Model

Database Model

Basic Data Frame remoteBasic

BasicId BasicData id
int longblob int
NOT NULL NOT NULL NOT NULL, default '0', PRIMARY KEY
Identifies this Basic Screenshot data identifier

Difference Data Frame remoteDiffData

DiffData id
longblob int
NOT NULL NOT NULL, default '0', PRIMARY KEY
Compressed Diff data identifier

ByteStream Model

Is used in FileWriter and FileReader mode (settings.xml). The screenshot is scaled down to a specified value (settings.xml), and converted to 8bit grayscale, and serialized to a byte Array. Basic Frame

ID Data
1 byte - uncompressed n bytes - compressed by gzip
An id which identifies this Basic Frame -

Difference Frame

Basic ID Flow Count Data
1 byte - uncompressed n bytes - compressed by gzip

Notes

Java Apps were developed using Netbeans 6.5 .

Download

Click ME