====== Interchange: How vlink/tlink communicates with the Catalog ====== **Interchange** is an Open Source perl application server targeted at e-commerce web applications.(([[http://www.icdevgroup.org]]))\\ This document describes how the web server communicates with the **Interchange** application server. Interchange version: 5.7.7\\ Webserver: Apache2 ===== Interchange Link Program ===== The Interchange **link program** links the **Interchange** application server to the web server via CGI. Interchange link programs come in three flavours: ^ Interchange Link Programs ^^^ ^ Type ^ Communicates via ^ Comment ^ | vlink | Unix domain socket | Local communication via a "socket file" | | tlink | Inet domain socket | Webserver and Interchange server can be on different hosts | | tlink.pl | Inet domain socket | tlink program (perl version) | The unix socket (vlink) or host/port (tlink) to be connected to is configured into the link program by the **compile_link** perl script. ((Dig into the compile_link script for the default values.)) More information:\\ [[http://www.icdevgroup.org/xmldocs/glossary/link-program.html]] ===== The complete flow chart ===== - The browser requests: **http://webhost.somedom.com/mycatalog/index.html** - **Apache2** processes the URL: - **/mycatalog** matches a **ScriptAlias** in the config file: **/etc/apache2/sites-available/webhost** ScriptAlias /mycatalog /export/home/appbox/cgi-bin/ic/mycatalog - **Apache2** invokes the CGI-program: **/export/home/appbox/cgi-bin/ic/mycatalog**((In this example the **Interchange** server and Catalogs are installed in a user's home directory:\\ /export/home/appbox)) - The **mycatalog** link program connects to the **interchange** daemon via a UNIX- or INET domain socket.((**mycatalog** is a copy of **vlink** or **tlink**.)) - The **interchange** daemon searches the **interchange.cfg** for a matching URL:((The **interchange.cfg** may include multiple config files.\\ E.g. (Debian package):\\ **include /var/lib/interchange/catalog.d/*.cfg**)) FullURL yes Catalog mycatalog /export/home/appbox/catalogs/mycatalog webhost.somedom.com/mycatalog - The **interchange** daemon uses the **cgi extra path information** to process the page: * URL: **http://webhost.somedom.com/mycatalog/index.html** * CGI extra path info: **/index.html** * CATROOT: **/export/home/appbox/catalogs/mycatalog** * Page to be processed: **CATROOT/pages/index.html** - The **interchange** daemon returns the processed page data to **Apache2** - **Apache2** passes the data to the web browser - The web browser displays the page. ====== . ====== Copyright (c) 2013 Integrated Services; Tux4u.nl\\ Author: Marjan Waldorp; ic-vlink-tlink2catalog 2013-07-17