Architecture

Home / Architecture

Given that DimML is a web analytics framework, the DimML platform interacts with user agents of a web page that has a single-line-of-code, invoking the dimml.js file, implemented on this page. When a user agent visits this webpage, the dimml.js is invoked. This JavaScript file contains the functionality to interact with the DimML server and can be best seen as a library of client-side code necessary to communicate with the DimML servers.

The first request to the DimML HTTP server is always of the Subject URL type. Subsequent actions for this type of request are based on its referrer and typically invokes static DimML code that executes logic and possibly invokes more dynamic calls to DimML.

DimML needs to know which files to load and therefore uses heuristical mechanisms to construct a list of potentially interesting DimML files. These files may or may not exist and many more files might be required to serve the request. Retrieved files contain the actual (human-readable) text as written by the author. This text needs to be interpreted by the DimML system into something it can work with. In addition to going through the actual fetched DimML files, these components may also stumble upon imports recursively, meaning more DimML files need to be fetched. Once the entire parsing process is done, the output is a so-called merged concept matcher; an object that might match a specific concept of a webpage and contains a fully merged set of instructions to execute upon it.

Based on the resulting object, the repository loads Flows and Plugins. It next sends back a translation from the DimML code to actual JavaScript to the client for collection of variables and execution of subsequent steps.

Each of these subsequent steps will involve a new request to the DimML HTTP Server. The difference now however, is that these requests are of type Fire Event or Execute Flow. Fire Event requests are sent when a specific event is triggered. Plugins may listen to such events to perform specific behavior. Execute Flow events invoke flows. For these flows, specific client- and server-side variables need to be collected and present beforehand. In addition, an Execute Flow event has an Event Context attached to it. This context contains some information about the request and response and it allows flows to  execute more DimML code.

With each new page load, including the SLOC the process will be executed.