Inhoud

Interchange: How vlink/tlink communicates with the Catalog

Interchange is an Open Source perl application server targeted at e-commerce web applications.1)
This document describes how the web server communicates with the Interchange application server.

Interchange version: 5.7.7
Webserver: Apache2

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. 2)

More information:
http://www.icdevgroup.org/xmldocs/glossary/link-program.html

The complete flow chart

  1. The browser requests: http://webhost.somedom.com/mycatalog/index.html
  2. Apache2 processes the URL:
    1. /mycatalog matches a ScriptAlias in the config file: /etc/apache2/sites-available/webhost
      ScriptAlias /mycatalog /export/home/appbox/cgi-bin/ic/mycatalog
    2. Apache2 invokes the CGI-program: /export/home/appbox/cgi-bin/ic/mycatalog3)
  3. The mycatalog link program connects to the interchange daemon via a UNIX- or INET domain socket.4)
  4. The interchange daemon searches the interchange.cfg for a matching URL:5)
    FullURL  yes
    Catalog  mycatalog  /export/home/appbox/catalogs/mycatalog  webhost.somedom.com/mycatalog
  5. 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
  6. The interchange daemon returns the processed page data to Apache2
  7. Apache2 passes the data to the web browser
  8. The web browser displays the page.

.

Copyright © 2013 Integrated Services; Tux4u.nl
Author: Marjan Waldorp; ic-vlink-tlink2catalog 2013-07-17

2)
Dig into the compile_link script for the default values.
3)
In this example the Interchange server and Catalogs are installed in a user's home directory:
/export/home/appbox
4)
mycatalog is a copy of vlink or tlink.
5)
The interchange.cfg may include multiple config files.
E.g. (Debian package):
include /var/lib/interchange/catalog.d/*.cfg