httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Garey Smiley)
Subject Re: New feature: TGI?
Date Wed, 06 Dec 1995 22:01:42 GMT
On Wed, 6 Dec 1995 15:53:38 -0800 (PST) you wrote:

>	I don't think this answers the question. What makes this
>different from the API. Not what makes this different from CGI.  Lokos
>like verything you describe below can be done with the existing
>API. (Not that I don't think we need the added functionality of a
>protocol API, that is seperate.)

The following is a basic outline of how things work, just understand
I'm still learning this, so some of the details may be wrong.

- Apache with TGI is started as standalone.
	- The TGI module inits itself and allocates some shared 
	  memory for communications with TGI deamons.

- TGI deamons are started.
	- They register some number of URLs that they handle
	  with the TGI module in Apache along with a callback 
	  function related to that URL.
	- Such as "COUNT" for example.
	- All registered URLs are based off of a defined TgiAlias such as

- A browser retreives a page with the following html fragment.
	<b><center>You are the              
	<br><table border=1>                
	<img src=/tgibin/COUNT?page_id>     
	person to access this page.</center>

- The server sees "<img src=/tgibin/COUNT?page_id>" and calls the
callback function in the TGI deamon that was registered for "COUNT".

- The callback functions does something.
	- Lookup "page_id" in a database and retrive the number of hits.
	- Returns a binary data stream that is acually a GIF or JPG image 
	  generated in real time that is the number of hits plus one.
	- Fork off a process from the TGI deamon to increment the database.
	- The callback function ends.

Benefits as I see then: (this is open to interpertaion ;-)
	- Speed.
	- Allows for complex applications.
	- Any where you can put a URL (href, img, get, post, etc.) 
	  a TGI deamon can be called to do something.
	- TGI  deamons can be started and stoped as needed
	  without stoping the server.
	- Rights to access TGI URLs are still controlled by the 
	  server's standard access control (access.conf, .htaccess, etc.).

Garey Smiley
SoftLink Services
(216)848-1312 FAX/Data(216)699-4474

View raw message