★ wanayoo — archive 1999 http://dev.scriptics.com/software/tclhttpd/Nouvelle recherche | Portail wanayoo
Developer Site
Getting StartedTcl AdvocacySoftware ResourcesDocumentsServicesCommunity
Home
Login | Tcl/Tk | TclPro | Tcl Plugin | Tcl/Tk Ports | Java | Applications | Extensions | Tools | CVS | Bug DB
Search 

The current version is 3.0.3 June 14, 2000.
The 3.0.0 and 3.0.1 releases had a nasty security bug that would let the server return files outside the URL tree. Version 3.0.2 had a similar bug, but only if you used Doc_AddRoot. If you grabbed any of those versions, please upgrade to 3.0.3 June 14, 2000. This bug was not present in the 2.3.7 or earlier releases.

Download and patch information.
Reference guide.
Tech Notes.
A book chapter explains the server architecture. (PDF format)
The Tcl/2k USENIX paper (pdf) is similar to the book chapter, but has some performance graphs that compare TclHttpd with Apache, AOLserver, IIS and Netscape. (The power point slides)
Live status information. Current hit counters, connection counts, etc.
Historical status snapshots. The server runs for months between restarts. We save status pages before restarts.

ServerWatch Ranking gives the Tcl Web Server 5-stars for reliability!

What is the Tcl Web Server? It is a pure-Tcl implementation of an HTTP protocol server. It runs as a script on top of a vanilla Tcl interpreter. Early versions worked with Tcl versions 7.5 and higher, but the latest requires Tcl 8.*.

How does it work? The Tcl I/O system provides event-driven I/O facilities and a primitive that copies data from one I/O channel to another. The server does the HTTP protocol handling and then simply directs the I/O system to blast data from disk to a network socket. The Tcl runtime handles all the I/O in a non-blocking fashion so the server easily multiplexes multiple clients without the complexities of threading. The server has suprisingly good performance because of Tcl's sophisticated I/O system.

Why is it interesting? The HTTP protocol is perhaps the least interesting aspect of the server. The cool stuff is the framework for generating dynamic page content, and the support for embedding the server directly into legacy applications to "web-enable" them.

From a technical standpoint, a Tcl-based web server is ideal for embedding because Tcl was designed to support embedding into other applications. The interpreted nature of Tcl allows dynamic reconfiguration of the server. Once the core interface between the web server and the hosting application is defined, it is possible to manage the web server, upload Safe-Tcl control scripts, download logging information, and otherwise debug the Tcl part of the application without restarting the hosting application.

How do you use it?

I have started to hear of many uses of Tcl Httpd. Let us know about your use so we can list sample applications.

Basic Features

As a stand-alone application, the Tcl web server supports these basic server features:

  • CGI. The standard CGI interface is supported. However, there is high overhead in CGI because of the cost of spawning an external process to handle each request. The server provides alternatives described later.
  • Server-side include. The NCSA include facility is supported so you can compose a page from various parts, statically. Again, this is not always the best approach, but we support it.
  • Basic Authentication. This is the "scrambled password" standard that is widely used even though it is relatively easy to crack if you can watch network packets. Support for SSL is planned and will be incorporated based on customer demand. SSL provides strong authentication between the client and the server as well as encryption of data.
  • Image Maps. Image maps are processed directly by the server to reduce processing overhead.
  • Standard logging and monitoring facilities.
  • HTTP 1.0 and HTTP 1.1 keep-alives for efficient use of socket resources.

Advanced Features

The server architecture lets the application plug into the URL processing path at several locations. Many standard modules are provided, and you can mix and match modules and provide your own in order to build a fully custom server. These are the hook points:

  • Handlers for whole sub-trees of the URL hierarchy. For example, /status and /debug are implemented by the server itself to provide live status pages and debugging hooks. /cgi-bin is another example.
  • Handlers for different document types. You can define a Tcl procedure to process files of certain types before data is returned to the client.
  • Handlers for authentication schemes.
  • The server also supports a template-based system for dynamic page generation. This includes support for session semantics.
  • SNMP integration. The server can generate pages containing information from SNMP MIBs, and forms that let you configure SNMP devices. This uses the Scotty network management extension for Tcl.
  • The server works nicely with TclPro Debugger to let you debug your web applications.
  • Tcl libraries to facilitate the implementation of Application-Direct URLs by OEMs.
  • SSL via the TLS Tcl extension.

Availability

Latest Release: 3.0.3 June 14, 2000

The Tcl web server is being made freely available. You can download the server (compressed tar file) (zip file), and for SNMP you also need the Scotty network management Tcl extention.

The Tcl/TclHttpd/TclLib/Thread (gzip) (zip) bundled distribution gives you:

  • TclHttpd - the web server source.
  • Tcl/Tk 8.3.1 - a compatible version of Tcl/Tk
  • TclLib 0.5 - a compatible release of the Standard Tcl Library
  • Thread 2.0 - A C-level extension that adds threads to Tcl.
  • And build scripts to put everything together.

About SSL

For https/SSL service, you need to use the TLS extension by Matt Newman and either OpenSSL or the BSAFE libraries. Furthermore, at this time you need the latest TLS sources from our CVS tree. There is a snapshot available at tcl1.3.cvs.tar.gz. Also, Tcl 8.3.1 and TLS together have some bugs that are addressed in what is currently the "core-8-3-1-branch" CVS branch, that will ultimatlely become a Tcl 8.3.2 release. If you want SSL now, your best bet is to get TLS and the branch from CVS.

I collect patches and enhancements to the server. If you use the server and fix it or add something cool you want to share, please let us know at tcl-httpd@scriptics.com

The current sources are visible at the Scriptics netCVS repository.

You can benefit from some of the advanced features like the site wide consistent design exhibited on this site by using the Tcl Template mechanism, libraries and standalone converter: alpha release tml10a2-src.tar.gz or tml10a2-src.zip). If this standalone support for automatic html page generation interests you, contact Laurent.Demailly@sun.com.

Top of page
Developer Home | Ajuba | Getting Started | Tcl Advocacy | Software Resources | Documents | Services | Community
Search | Site Map | Feedback | Contact Us | webmaster@ajubasolutions.com
Increase page width
© 1998-2000 Ajuba Solutions. All rights reserved. Legal Notice | Privacy Statement

Last modified: March 09, 2000