TIL - The Tcl ICE Library

TIL Components

TIL is composed of both a set of libraries and a set of binaries. The libraries provide a number of components (often network-oriented) to developers, while the utilities provide either a supporting layer to these libraries, either administrative and interactive oriented functionalities to end-users.

1. Libraries

1.1. Network Oriented Components

The network oriented libraries are, in summary, the following:

  • The command server provides facilities to implement server that respond to commands according to a line-based textual protocol.
  • The permanent client is the client-side of the above facility and provides features such as automatic reconnection.
  • The DNS resolver improves (and replace) the facility that is already in the Tcl library.
  • The remote parameter storage facility is a specific command server, together with its client-side, to store, retrieve and access pairs of key and values in a distributed manner.
  • The java library facilitates communication with java servers and clients that follows the UTF8 set of communication methods.
  • The mass URL fetching provides facilities to simultaneously fetch many URLs simultaneously through a host-based queue system.
  • The URL information and content caching provides facilities to implement the cache of a web-aware application such as a browser.
  • The tiny HTTP server is a continuation of code from Steve Uhler's minihttpd.tcl with a number of improvements and the possibility to implement as many servers as possible.
  • The RSS library provides facilities to parse RSS feeds and continuously watch feeds for addition and removal of items.
  • The port number allocator implements a sort of name service that maps service names to ports in a unique and reproductible manner.

1.2. Interactive Components

The components of the library which are aimed at interactive applications are the following:
  • The MIME type guessing library provides facilities to guess the MIME types of files through their extensions and/or through peeking some of their initial content.
  • The playlist library implements a playlist storage facility, complemented with play, pause, etc. operations on top of the snack library.
  • The error handler provides ways for applications to catch some errors and continue in an ordered fashion.

1.3. System Components

The system components of the library are mostly aimed at disk operations of many sorts. In summary, they are the following:
  • The disk utilities provides a number of additional facilities on top and around the file command.
  • The cron package provides facilities to schedule procedure for regular execution.
  • The log watch package provide facilities to monitor the content of log files.
  • The log file output provides facilities to create and rotate log files.
  • The spool library provides facilities to treat directory structure as spools: new files placed in the inbox will be moved in the outbox or the error directory upon treatment.
  • The time stamping facility handles millisecond time stamp strings.
  • The process library provides facilites to handle processes created outside of the Tcl space.

2. Binaries and Utilities

TIL is also composed of a number of binaries and utilities. While some of these binaries provides a run-time backend to the remainder of the library, some other utilities are of generic use. Most of these binaries perform a well defined task and act as a server providing a number of operations around that task.

2.1. Utilities to run and supervise other tasks

A number of utilties are aimed at the control of other applications:
  • The starter is a service handle that ensure that a number of applications (usually non-interactive, but not necessarily the case) continuously run on a given machine.
  • killapp is a special client to the starter, aimed at restarting and killing applications that are placed under its control.
  • The daemon takes on single application and ensure its continuous run. It is placed at a lower level than the starter described above. 
  • tclsvcd is a companion application to the daemon and is aimed at starting services, via the daemon, during the boot up phase of a UNIX machine.
  • crond is a cron implementation in Tcl that is able to host (and run) procedure (i.e. dynamic code) at regular intervals, and also act as a normal cron daemon.

2.2. Support for componentised Applications

A number of utilities attempt to support the idea of one-task-one-process componentisation. These are:
  • A distributed parameter server that allows several applications to store and share <key,value> pairs.
  • The multiplexer multiplexes any command-line based protocol between several servers and clients and can act as a hub in-between.
  • The bridge reencapsulates command-line based protocol packets in safe environments where firewalls impair the free usage of ports.

2.3. Miscellaneous Utilities

TIL also provides a number of other utilities:
  • The prompt is an interactive command-line prompt for applications servers that follow a line-based protocol where the first keyword is a command.
  • The timestamper is an application that timestamps that output of applications piped into it and writes and rotates this output to log files. 
  • The URL watching server watches remote and local URLs for modifications and notifies clients.
  • The URL cache caches remote URLs to the local disk and only refetches these when they have changed.
  • The port number allocator uniquely allocates port numbers to services (represented by strings).

theme by Chris M