Table of Contents

How To Install the Axiom Stack on Joyent Accelerators

What is Axiom Stack

The Axiom Stack is an open source (AGPL) web application framework. The Axiom Stack is a number of things wrapped in one package. It blends Java, which is at its core, with server-side JavaScript and a number of other technologies into a single platform.

Application Development

Applications written for Axiom Stack are run server-side using the Mozilla Rhino ECMAScript engine. Application development in Axiom Stack is done with a mix of JavaScript and Java, and uses TALE for the presentation layer. Use of language features up to ECMAScript 1.7 are supported: for example, E4X providing XML manipulation and list comprehensions like those found in the Python programming language.

Templates

Presentation templates are built using TALE, which uses E4X. This keeps the presentation and business logic separate. TALE consists of of handful of directives that allow looping over arrays to inclusion of other templates.

Business Logic

Making use of Rhino we create a layer for business logic that can be created with either JavaScript or Java. The harmonious bond between the two foster rapid and clean development. Plus, it affords a lower barrier of entry.

Under the Hood

Axiom Stack is forked from Helma. Axiom Stack uses an object-oriented database as its primary storage rather than a traditional relational database. All data stored in an application is surfaced as ECMAScript objects. Object persistence is largely transparent to the application developer. The default storage is maintained in Lucene. Objects may also be mapped to a new or existing relational database. The database structure needs to be created prior to mapping. The only requirement is that the database has a JDBC connector.

Axiom Stack On Joyent

Deploying Axiom Stack on Joyent is fairly simple. Follow these steps and you'll have an blog in place in no time! We are also working on creating a package for easier deployment on Joyent Accelerators.

wget http://file.axiomstack.com/public-bzr/releases/axiom-stack-3.2.6.zip
unzip axiom-stack-3.2.6.zip; sudo mv stack-trunk /opt/local/axiom-stack
sudo chmod +x /opt/local/axiom-stack/start.sh

At this point you have to decide:

sudo /opt/local/axiom-stack/start.sh

Using SMF

#!/bin/bash
case $1 in 
        # SMF arguments (start)
'start')
        /opt/local/axiom-stack/start.sh &
        ;;
*)
        echo "Usage: $0 { start }"
        exit 1
        ;;
esac    

exit $?
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type="manifest" name="Axiom Stack">
  <service name="application/axiom-stack" type="service" version="1">
    <dependency name="filesystem" grouping="require_all" restart_on="none" type="service">
      <service_fmri value="svc:/system/filesystem/local"/>
    </dependency>
    <exec_method type="method" name="start" exec="/opt/local/axiom-stack/svc_start.sh %m" timeout_seconds="60"/>
    <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/>
    <instance name="default" enabled="true"/>
    <template>
      <common_name>
        <loctext xml:lang="Java">
         Axiom Stack 
        </loctext>
      </common_name>
    </template>
  </service>
</service_bundle>


sudo svccfg import /opt/local/axiom-stack/axiom_svc.xml
sudo svcadm enable axiom-stack

Notes

References