old-www/HOWTO/Tango-HOWTO-2.html

72 lines
3.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Tango 2000 HOWTO: The Basics</TITLE>
<LINK HREF="Tango-HOWTO-3.html" REL=next>
<LINK HREF="Tango-HOWTO-1.html" REL=previous>
<LINK HREF="Tango-HOWTO.html#toc2" REL=contents>
</HEAD>
<BODY>
<A HREF="Tango-HOWTO-3.html">Next</A>
<A HREF="Tango-HOWTO-1.html">Previous</A>
<A HREF="Tango-HOWTO.html#toc2">Contents</A>
<HR>
<H2><A NAME="s2">2. The Basics</A></H2>
<P>
<H2><A NAME="ss2.1">2.1 Tango Application Sever</A>
</H2>
<P>
<P>Tango Application Server, aka TAS, runs as a daemon process. Tango 3.x
is 'tangod' and Tango 2000 is 'tango4d'. Tango 2000 also runs a seperate Server
Watcher process. Tango is a 'green threaded' application; it spawns a series
of threads, but manages the threads itself. This means that a single TAS will
not take advantage of multiple processors. However, Tango 3.6 and Tango 2000
include load splitting capabilities which allow you to run multiple TAS daemons
on one box.
<H2><A NAME="ss2.2">2.2 TAS, Web Server and Web Client</A>
</H2>
<P>
<P>The Tango Application Server is never contacted directly by the web browser;
nor does it ever send information directly to the web browser. The browser
only ever makes requests of the web server, which then forwards the request
to the TAS through either a CGI or a web-server specific plugin. There are
several advantages to this scheme. First, nothing on the browser side needs
to be updated; no plugins, Active-X objects, client side Java, or anything
are required. Second, the CGI/Plugin allows the Tango Server to be on a machine
other than the web server, or indeed on several machines other than the webserver.
<H2><A NAME="ss2.3">2.3 TAS Life Cycle</A>
</H2>
<P>
<DL>
<DT><B>Born</B><DD><P>Tango Server is instanced, and loads it's configuration files
and what not. No user requests are accepted.
<DT><B>Startup</B><DD><P>Tango Server first looks for a StartupURL. If one is specified,
a request is generated. A successful return will allow Tango to move to the
next stage. If the request cannot be sent, or if there is no URL specified,
Tango Server moves on to the 'Running' stage.
<DT><B>StartupURL-Response</B><DD><P>Tango Server stays in this stage until a response
is received from the StartupURL, or until the request times out.
<DT><B>Running</B><DD><P>This is the normal operating state for Tango Server; user
requests are accepted, Tango Cron jobs are run, and so on.
<DT><B>Shutdown</B><DD><P>When a shutdown request is received, or generated by Tango
itself on a fatal exception, a ShutdownURL is looked for, and run if it exists.
Otherwise, it moves on to the Waiting for Running Threads stage.
<DT><B>ShutdownURL-Response</B><DD><P>Tango stays in this stage until either a response
is received from the URL requested, or it times out.
<DT><B>Waiting</B><DD><P>Tango Server waits for threads already running to finish,
but no longer than the specified waiting period.
<DT><B>Dead</B><DD><P>Tango Server kills all still running threads, cleans up, and
exits.
</DL>
<HR>
<A HREF="Tango-HOWTO-3.html">Next</A>
<A HREF="Tango-HOWTO-1.html">Previous</A>
<A HREF="Tango-HOWTO.html#toc2">Contents</A>
</BODY>
</HTML>