Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search
Next Previous Contents

2. The Basics

2.1 Tango Application Sever

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.

2.2 TAS, Web Server and Web Client

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.

2.3 TAS Life Cycle

Born

Tango Server is instanced, and loads it's configuration files and what not. No user requests are accepted.

Startup

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.

StartupURL-Response

Tango Server stays in this stage until a response is received from the StartupURL, or until the request times out.

Running

This is the normal operating state for Tango Server; user requests are accepted, Tango Cron jobs are run, and so on.

Shutdown

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.

ShutdownURL-Response

Tango stays in this stage until either a response is received from the URL requested, or it times out.

Waiting

Tango Server waits for threads already running to finish, but no longer than the specified waiting period.

Dead

Tango Server kills all still running threads, cleans up, and exits.


Next Previous Contents