Introduction to Sysquake Remote

Sysquake Remote is a module for Apache and compatible HTTP servers. It implements LME (Lightweight Math Engine, the programming language at the heart of Sysquake and other Calerga products), most graphical commands of Sysquake (without support for live interaction), and functions specific to the HTTP protocol.

Typical applications of Sysquake Remote include the following:

Graphics with user-specified parameters
Graphics are generated dynamically when the user requests the Web page. Some parameters can be changed in a form with control elements such as text fields for numerical values. The user can change these parameters and observe their influence on the graphics. The author has complete freedom to add explanations, hypertext links, static images, or any other feature which are used on the Web.
Remote interactive computation environment
A text field allows the user to enter any kind of computation using the well-known Matlab-like Sysquake language. Variables, control structures such as loops and conditional execution, and graphics are available. The result can be displayed in the same Web page together with the code used to generate them, ready to be used in a report.
Remote data processing
The user submits numerical data from a spreadsheet or a MAT-file and let them be analyzed in order to get useful statistics, or a prediction model.
Processing of real-time data
A Web page always displays up-to-date key values based on the processing of real-time data, for instance from the production of a plant or from financial quotes.

Some of these applications could also be deployed with local applications (such as Sysquake) or other Web technologies (such as Java). The table below summarizes the strong points of each of them.

FeatureSQRSysquakeJava
Client requirements Browser
(no configuration)
Sysquake Java-enabled Browser
Native math language Yes Yes No
High-level graphics Yes Yes With libraries
Live interactivity No Yes Possible
Embedding in Web page Yes No Yes
Interactive code evaluation Yes Yes No

Programming model

On the server, HTML pages where dynamic contents are desired are renamed with a .sqr extenson instead of .html or .htm, in order to let Apache know that they must be processed by Sysquake Remote. In the HTML code, fragments of LME code are inserted. When a .sqr page is requested by the client (who entered its URL or followed a link from another page), Sysquake Remote evaluates the LME code fragments and replaces them with the output they produce, which can be text (possibly formatted with HTML tags), embedded images, or both. This new page which has no more LME code is sent to the client, which sees a plain HTML page.

Graphics are handled in a transparent way for both the developer and the client. When graphical commands are evaluated, a temporary image file is produced automatically, and a reference to it is inserted in the HTML page. Image files are removed from the server after use.

LME code fragments have access to information about the connection (such as the client IP number or cookies). They can retrieve form data sent with the GET or POST method. The coordinates of click in graphics can be converted automatically from pixel position to the natural coordinates used to produce the graphics. Access to the server file system or to shell commands opens Sysquake Remote to the outside world.


Copyright 2002-2008, Calerga.
All rights reserved.