Sysquake Remote is an Apache module based on Sysquake. Apache is the most widely used server for the World Wide Web. Sysquake Remote enables the server to modify HTML pages right before they are sent to the client, in a transparent way. Variable elements are the result of computations, as text or graphics. They can depend on data provided by the distant user in an HTML form or on the position of mouse clicks in a figure. Sysquake Remote can also access databases or any other resource.
Applications are countless. Here are some examples:
- Graphical display of values measured in real-time for the supervision of a process.
- Statistical processing and creation of a summary of data obtained in a database.
- Resolution of a problem whose parameters are provided in an HTML page.
- Execution in a secure environment of code provided by students for distant learning and display of numerical and graphical results.
Sysquake Remote works with Apache to communicate with the browser via an HTTP connection. It supports natively HTML or XML hypertext and PNG, GIF, and JPEG images. Other file types can be created. Sysquake Remote works by filtering HTML or XML files:
- Apache is configured so that files which end with a special suffix (typically .sqr) are processed by Sysquake Remote;
- Apache is responsible for finding the file and checking access authorizations;
- Sysquake Remote reads the file, finds embedded code fragments, evaluates them and replaces them with their output;
- graphics are created in a totally transparent manner as temporary GIF, PNG or JPEG files, and the appropriate HTML tag is inserted in the document;
- Sysquake Remote sends the result to the remote client.
Specific functions make the use of HTML forms very easy. Coordinates of mouse clicks in figures are converted automatically to match those of graphical commands. All the standard function libraries of Sysquake are provided; of course, you can also reuse yours.
Code submitted by the client is evaluated securely in a sandbox environment, where only computational and graphical functions are available. You can choose the resource limits (like file access, CPU time, and amount of data sent to the client) to be enforced.
Sysquake Remote is similar to PHP in its operating. It differs by its language, much better suited to math, statistics, and engineering problems; and by the ease of creation and interactivity of its graphics.
Sysquake Remote runs with Apache 1.3.x on Solaris/Ultrasparc, GNU/Linux i386 and Mac OS X with mod_so (dll) support.
Here are two examples which show how easy it is to use Remote Sysquake. In both cases, the HTML file which would be used for a static page is renamed with a ".sqr" suffix, and the code shown at top left is inserted. HTML code sent by Sysquake Remote is shown at top right, and the result below.
The first example shows the display of a magic square, where the sum of rows, columns, and diagonals is the same.
<pre> <?sqr M = magic(3); disp(M); ?> </pre>
<pre> 8 1 6 3 5 7 4 9 2 </pre>
8 1 6 3 5 7 4 9 2
The second example shows the creation of a figure with the contour function. Minimum and maximum values are displayed as text.
<?sqr D = conv2(randn(12),ones(5)); ?> <p>Values between <?sqr disp(min(D(:))); ?> and <?sqr disp(max(D(:))); ?></p> <p><?sqr contour(D); ?></p>
<p>Values between -2.1 and 3.4</p> <p><img src="c.sqr?..."></p>
Values between -2.1 and 3.4
Sysquake Remote licenses have a validity of 12 months and are restricted to one host name. Two kinds of licenses are available:
A - the banner below with a link to http://www.calerga.com must be included in all pages processed by Sysquake Remote.
B - no such restriction.
All updates for the license period are included. Sysquake Remote is provided as a tar.gz file over the Internet, with comprehensive HTML and PDF documentation.
You can read Sysquake Remote's documentation online.