The following is a list of major new or updated features in Roxen WebServer 2.2.
Roxen 2.2 uses Pike 7.2. See Pike 7.2 release notes for detailed information about changes and additions.
The user-database and authentication module API has been completely redesigned and rewritten to increase speed as well as enable more features.
The gopher and fhttp protocols has been removed. The former because it has not worked properly for three years, and nobody noticed, and the latter because it did only offer benchmark performance and was not all that useful for real world applications.
The most process intensive parts of the normal HTTP protocol module have however been rewritten in C. Together with some other optimizations that has been done HTTP parsing is now about twice as fast as it was in Roxen 2.1.
Another highlight is that the HTTP protocol now auto-encodes unicode. Unicode characters in text data is now recoded to useable output charset, which includes recoding of unsupported characters to entities.
The FTP protocol has now been extended to support the IPv6 and NATs extensions standardized in RFC 2428.
The general image cache has been subject to a major overhaul during its conversion to database only backend. The fact that the image cache uses a database as backend improves scalability and performance as well as making replication of cached data possible.
During the changes two major security features were added. The URLs for the images in the image cache are now encrypted before they are sent to the client, making denial of service attacks much more difficult. Also, the user ID is now saved for the images so that no authenticated user can get an image rendered for another authenticated user.
The general image cache has got the following new features, available in e.g. gtext and cimg.
The handling of "/internal-roxen"-images has been optimized and expanded. It is now possible to get a pixel of any color by calling /internal-roxen-pixel-color, where color is the color of the pixel, e.g. "red" or "ff0000".
A completely new graphics handling library has been added, which in time will replace gtext and business graphics. It does already surpass earlier implementations in both speed and image quality, but no high level tags utilizing this library is included in WebServer 2.2. The primitive functions are however exported into GXML, a markup language for creation and editing of multi-layer images, which can be used as an XML-based photoshop.
There is a new configuration variable "Compatibility level" for each site. This variable is queried by different modules to control minor compatibility issues in their behavior.
The variable is set to the latest version for every newly created site, but is then never changed automatically during upgrade. It's set to "2.1" for sites that are imported from earlier Roxen versions.
The intention with this variable is to make it easier to do small changes that aren't strictly compatible, but still avoid jeopardizing the compatibility when upgrading older sites.
Roxen WebServer now has an integrated MySQL database, which is used both internally by the server and by Roxen modules. This not only makes Roxen faster and more secure, it also makes it easier than ever to administrate, since all internal states can now be replicated and shared on several servers. The database manager has an open API enabeling use from third-party modules.
The graphical database browser in the administration interface gives a good overview of all databases used in and by the server as well as it lets you administrate the databases with minimal SQL knowledge.
RXML is now compiled to P-Code the first time it's run, then evaluated directly from this form on subsequent accesses to the same file. This means that the RXML does not have to be reparsed from the source code for each access, which the <emit> tag in particular benefits from.
The introduction of P-code also allows more advanced features in the <cache> tag, which now is powerful enough to allow you to tune RXML pages for substantial performance gains. The <cache> tag now handles nested <cache> and <nocache> tags correctly by mixing evaluated and unevaluated RXML code in the cached entries. This allows caching to be used around complex RXML code while still keeping some part of it dynamic (such as the name of the visitor or an access counter).
The cache also handles variable assignments. You can e.g. do a costly sql query and assign the result to a variable inside a <cache>, and then use that cached value outside the <cache> tag to format it dynamically depending on a user set theme.
Email module
A module for creating and sending mails.
Writefile
A module that allows the creation of files from normal RXML using the
<writefile> tag. Contributed by Stephen
R. van den Berg.
robots.txt generator
Generates a robots.txt on demand from various information.
Word highlighter
Highlights the words stored in the form variable highlight in
HTML pages, mostly useful for searchengines.
Whitespace sucker
This module removes redundant whitespace from HTML pages.
Sizer
This module provides the <page-size> tag that
calculates the size of a page, including inline images, HTTP headers
etc, and gives an estimate of the time it will take to download the
page over various connections. You can also use the size
prestate to trigger the sizing process.
Table/Image Border Unveiler
Another helping module for HTML-writers. This one allows you to toggle
the viewing of table and image borders using a prestate.
Implicit <use>
Automatically <use> a package before parsing files.
Useful for creating template files whose tags and variables are
automatically included before any RXML parsing is done of the
content files.
Javascript support module
This module provides some tags to support javascript development (as
an example, Javascript popup menus)
Simple MPEG streaming server
A simple mpeg audio streaming server has been added, mostly for example
purposes.
Session tag module
Provides support for session handling in form of the <session>
and <force-session-id> tags. Handles clients with cookie
support turned off transparently for the RXML programmer and uses
unguessable session ID's.
The font renderer is replaced with a new one that will generate higher quality text images. This will affect old image renderings using true type fonts in two ways. The size of the new font renderings will not be the same as the old ones. Typically the new renderings will be smaller, but the exact change is font specific. The new font rendering will also be sharper than before. A workaround to get the old "fuzzier" look is to double the size in the fontsize attribute and to add the attribute scale="0.5".
The global variable "PID file" has been removed. The start script now makes a PID file earlier to be better at avoiding duplicate server processes, and to work better together with init.d scripts. The global variable "PID file" is no longer consulted, due to the "chicken-and-egg" problem that would occur then.
If you depend on the PID file location specified by the "PID file" variable, you need to move that setting to the start script, either by adding a --pid-file argument or by setting the environment variable ROXEN_PID_FILE.
MODULE_DEBUG is no longer defined by default by the start script. Previously the start script added the MODULE_DEBUG define when neither --with-debug nor --without-debug was given to it. That define turns on some extra debug checks which are useful when developing new Roxen modules, but wasteful in production use. It's now turned off by default to get maximum performance in production use. To turn it on, you now need to either add the new --module-debug argument, or run with --once.
The PHP module and the YP user db module have been removed until they have been made to work properly. YP import in SiteBuilder Access Control is not affected. The SQLuserdb module has been replaced with another module with simliar capabilities that uses the new authorization API and the new database API.
Different format for RoxenModule.module_identifier(). The function module_identifier in Roxen modules has been changed to return a string on the same format as Roxen.get_modname. The old format was bulkier and not guaranteed to be unique for the module.
Different type handling for RXML.Value and RXML.Scope objects. The responsibility to do type conversion for values from RXML.Value and RXML.Scope objects has been moved from the caller to the callee (i.e. RXML.Value.rxml_var_eval and RXML.Scope.`[]). It is therefore an error to ignore the fourth RXML.Type argument to these functions. The inline doc for RXML.Value.rxml_var_eval contains motivation and further discussion of this.
Changed API in RXML.TagSet.create. The way to create new RXML tag sets has changed slightly due to encoding issues when p-code is dumped to disk. It's however fairly simple to update the create call. Previously, tag sets were typically created with something like this:
RXML.TagSet internal = RXML.TagSet("TagFoldlist.internal", ({ TagFT(), TagFD() }) );
The first argument should earlier be a string that uniquely identifies the tag set in the whole server (which the one in the example above from the foldlist module clearly doesn't). Now, one instead gives the own module as the first argument and a string that only should identify the tag set uniquely within the module (the empty string is reserved for the main module tag set). The example above thus becomes:
RXML.TagSet internal = RXML.TagSet(this_module(), "foldlist", ({ TagFT(), TagFD() }) );
For tag sets that are used for local or additional tags inside a container tag, it's typically a good idea to use the name of the container tag as the unique identifier, hence "foldlist" above. (Note that these identifier strings are stored in the dumped p-code, so it's a good idea to keep them fairly short.)
The Pike module Debug.pmod in Roxen renamed RoxenDebug.pmod. This is to avoid a name conflict with Debug.pmod that comes with Pike.
In Pike 7.2 local variables at the same nesting depth may no longer overlap. Solution: Remove duplicate variable definitions or use the #pike preprocessor argument.