From Newsgroup: comp.lang.tcl
TL;DR: I just published an application server written entirely in Tcl.
This server was developed using an AI assistant, but its initial shape
was determined by a white paper I had drafted entirely myself. The
development process was, by design, mostly TclOO-based, and components
were developed in manageable installments so that I could review them
(and, as a matter of fact, in many cases I demanded that components be entirely rewritten, drafting coding standards in the process). At a
later stage of development, I got into the habit of making changes
myself and asking the assistant to review them and check for regressions.
Longer description
Tclwire is a multithreaded server implementing multiple protocols,
virtual hosts, programmable internal chores, and environments:
configurable, preloaded components that can, in principle, emulate other application servers. One of these environments is named 'rivet' and
allows Rivet applications to run seamlessly.
Tclwire is not intended as a direct competitor to larger, established
servers such as Apache HTTP Server or NaviServer. Its strength is
simplicity and ease of deployment, while its configurable environments
provide a way to reproduce the application interfaces and behavior of
other servers.
The code is available from:
https://github.com/mxmanghi/tclwire/
Tclwire development stemmed from the need for a server that could work
with the test suite for the tclcurl-ng extension, a major rewrite of tclcurl-fa.
From this initial effort, I envisioned a multithreaded, general-purpose application server that implements HTTP(S) 1.1 and FTP(S), and can also
work as a proxy. Tclwire dispenses with the strict separation between
worker threads, such as that implemented in Apache. Worker threads are
just Tcl threads controlled by a thread pool manager and can exchange information using the usual Tcl inter-thread communication mechanisms.
The idea was to have a server that is simple to deploy for small
programmable applications that don't need the full-fledged complexity of
the Apache framework. Moreover, it often happens that such app servers
run on virtual systems in hidden networks and are accessible through specialized proxy servers tailored to enforce connection rules and
handle certificates.
Its strengths are therefore simple configuration and minimal external dependencies (basically Tcllib, unix_sockets and Thread). It depends on
Tclx if you want to run Tclwire as a system server capable of switching
user and group at startup.
To test a minimal functional Tclwire installation, clone the repository
and then run:
$ tclwire/tcl/tclwire.tcl --docroot /tmp/twdocroot
If the document root does not yet exist, Tclwire creates it and seeds it
with a series of technical white papers. You may read these pages by
pointing a browser to
http://localhost:8990/
Many options can be configured from the command line (run with the
--help option to see them), but for more complex systems, Tclwire can
also store its configuration in a TOML file.
I'm still in the process of writing decent documentation for Tclwire
(and I'm very far behind on it). Basically, the collection of white
papers copied into an empty document root is all you have.
-- Massimo
--- Synchronet 3.22a-Linux NewsLink 1.2