The Anatomy of an Emergence Website

Web Server Configuration

The current version of Emergence is being used on an Apache2 installation however a newer version is currently being tested on nginx. We expect the platform to work on lighttpd as well. Each type of server has it's own various prerequisites for the various Libraries that are part of Emergence. We go through a vetting process to make sure the framework is fully compatible.

In Short, we will be making the installation guides more and more available as we figure them out ourselves.

Apache2

This process has been turned into a nodeJS script. It has been documented for those who want to truly understand how Emergence works.

Each instance of an Emergence website requires a separate Apache2 configuration. However, the nature of the apache config file syntax means that the config for multiple sites can be in a single file or many files depending on how the includes are organized.

In our configuration we place a file called 'emergence.conf' in /var/apache2/vhosts.d/ which will normally include all the .conf files in that directory.

The file simply contains.

include /var/emergence/apache

This will make apache use every .conf file in the directory so we basically bring the vhost configurations from the apache directory to the emergence directory.

This file is currently generated for us using a nodeJS utility. In the future the Emergence Kernel will be ported to nodeJS as a constantly running server which will host the VFS as a nodeJS WebDAV server as well provide a front-end over HTTP from which you'll be able to manage sites and restart apache without turning off Emergence.

Setting Up the Site's Directories & PHP Configuration

The directory for this site would be /var/emergence/sites/example/. The directory listing for it would look like this.

Site.config.php actually refers to the Site class which is part of the Emergence Kernel.

This amount of configuration is usually enough for the the WebDAV virtual directory to work. Once you visit the site for the first time it will "wake up" and probe four Emergence tables in it's database.

  • _e_files

    Maintains an ActiveRecord model of all files stored in the Virtual File System

  • _e_collections

    Maintains an ActiveRecord model for all directories in the Virtual File System

  • _e_hosts

    Maintains a list of hostnames that the site is aware of.

  • _e_sites

    Maintains a list of Local sites for which the Emergence install should answer to as well as Remote Sites for which the Emergence install maintains an HTTP authentication mechanism.

_e_files

This is currently the file store of the Virtual File System.

Everytime you save through WebDAV a new row gets created here.

This is how the files are stored on the server.