What is mod_spin

mod_spin is an Apache 2.2+ module that provides the following functionality (in conjunction with some other modules):

mod_spin is written in C, just like Apache 2.2 itself and it uses APR, which was written to be cross platform, secure and perform well. Generally speaking, you should see speed improvements when compared to Java, PHP and Perl solutions, sometimes even by an order of magnitude.

If you want to find out more, check out the documentation.

What does the template language look like

Not surprisingly it is similar to Velocity, but with far fewer directives/commands (i.e. it is even simpler):

   #for(${reference})
     some text within the loop and a ${reference.column}
   #end

   #if(${reference}) 
     some text to replace if ${reference} is not NULL
   #else
     some text to replace if ${reference} is NULL
   #end

   #unless(${reference}) 
     some text to replace if ${reference} is NULL
   #else
     some text to replace if ${reference} is not NULL
   #end

The above is the full set of available language constructs in mod_spin template language.

So, mod_spin is vapourware

A stable release, version 1.2.0, is now available. All previous versions are now end of life and many known bugs in them will never be fixed. Do not use them.

Note, however, that the binary RPMS have been built on Fedora 12, and you should always pick the correct version of the RPM, as any other may not work. You can download packages below:

A skeleton application is available from here:

To run mod_spin, you have to install libapreq2 RPMS, which are available from Fedora.

What is in the works

Note that all development of mod_spin ceased.

The usual set of apps has also been released for this version. Simply look for the latest versions here:

How is mod_spin licensed

mod_spin is licensed under the GNU Lesser General Public Licence (LGPL).