Chapter 18. Data Flow

The relationships between libraries and applications during the URI translation and Page construction processes are shown in Figure 18-1.

Flow chart of relationships between applications and libraries.

Figure 18-1. Architecture, Data Flow

1. Browser request to Apache is intercepted by mod_midgard.

2. mod_midgard determines if the HTTP request matches a Host within the database.

3. When a match is found, Midgard walks the URI and fetches the requested Page and Style records from the database (through lib_midgard).

4. As midgard-root.php3 is read, PHP takes control, and the document building process begins.

5, 10. midgard-php processes the <[elements]> and Midgard functions.

6, 7. The document is built from the Elements that are stored within an Apache name value array.

8, 9. Midgard functions (mgd_...) are handled through lib_midgard.

11, 12. After the document is built, it is returned to Apache, and delivered to the requesting client.