Webtrix back end

The Tomcat servlet engine wrapped as a Beatrix application has these actors:

Service administrator
Issues warrants for use by a site owner.
Site owner
Someone who wishes to run a Web site, which is made up of several WAR files. For each WAR they specify a ``context path'' which maps a URL path prefix to that WAR. Uploads WAR files into Webtrix, or gives a warrant to a storage system where the WARs are kept. (This latter option is not yet implemented.) Is able to get a back end warrant to give to an HTTP service, so the HTTP service can make the site available.
Front end
An HTTP service uses Webtrix to get the WAR files and their context paths, thus making the site available.
Webtrix uses netlets as follows. A key feature is that when an HTTP front end binds to Webtrix the access point netlet it gets is a complete Tomcat servlet engine. Thus the servlet engine is in the same place as the HTTP server.

Manager
Stores contracts. Stores what WAR files a contract has and what context paths map to what WARs. Receives uploaded WARs and sends each one to a single random worker.
Worker
Uses disk space to store the WAR files redundantly. Since a WAR is sent from a manager to one worker, every so often each worker synchronises with the others with the help of a manager.
Access point
Two types: (1) Simple proxy for the service administrator and site owner.

(2) An HTTP front end downloads a more complex access point. This is actually Tomcat wrapped with some Jtrix functionality. It operates in five steps: (a) Binds a disk resource from the HTTP service. (b) Downloads the relevant WARs from a worker and stores them in the local disk space. (c) Sets up the context paths as set by the site owner. (d) Starts Tomcat, mapping these context paths to the relevant WARs. (e) Tells the front end it AJP13-compliant and gives it its AJP13 address, so the front end can use it as Tomcat normally. The AJP13 networking is made available via the default socket factory which every netlet can access. This is the IP address made available by the -shared option of jnode. Even if this IP address is 127.0.0.1, that is fine for this purpose, since the access point and the front end worker netlet binding it are on the same machine.

Nik Silver 2002-03-09