From 0251ba5cc54cdd24092e442ab7ec364b97d42601 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 21 Sep 2023 05:57:24 +0000 Subject: More doc, complete? Signed-off-by: Laurent Bercot --- INSTALL | 4 +- doc/future.html | 104 ++++++++++++++++++++++++ doc/index.html | 30 +++++-- doc/quickstart.html | 11 +-- doc/tipideed.html | 180 ++++++++++++++++++++++++++++++++++++++++- examples/openrc/httpd-4.initd | 23 ++++++ examples/openrc/httpd-6.initd | 23 ++++++ examples/openrc/httpsd-4.initd | 23 ++++++ examples/openrc/httpsd-6.initd | 23 ++++++ src/tipideed/tipideed.c | 4 +- 10 files changed, 405 insertions(+), 20 deletions(-) create mode 100644 doc/future.html create mode 100644 examples/openrc/httpd-4.initd create mode 100644 examples/openrc/httpd-6.initd create mode 100644 examples/openrc/httpsd-4.initd create mode 100644 examples/openrc/httpsd-6.initd diff --git a/INSTALL b/INSTALL index 67c4439..124ce2b 100644 --- a/INSTALL +++ b/INSTALL @@ -6,8 +6,8 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 3.81 or later - - skalibs version 2.13.2.0 or later: https://skarnet.org/software/skalibs/ - - (optional but recommended): s6-networking version 2.5.1.3 or later: + - skalibs version 2.14.0.0 or later: https://skarnet.org/software/skalibs/ + - (optional but recommended): s6-networking version 2.5.1.4 or later: https://skarnet.org/software/s6-networking/ This software will run on any operating system that implements diff --git a/doc/future.html b/doc/future.html new file mode 100644 index 0000000..1a8c3e5 --- /dev/null +++ b/doc/future.html @@ -0,0 +1,104 @@ + + + + + + tipidee: the future + + + + + + +

+tipidee
+Software
+skarnet.org +

+ +

tipidee: the future

+ +

+ tipidee is fully functional, and you are encouraged to use it; however, it +is not yet considered complete. There are some optional features +of HTTP that would be nice to have, and that may be implemented at some point +down the line. +

+ +

Ranges

+ +

+ Ranges +are a useful part of HTTP when you are serving big files and connections may +be interrupted and restarted: supporting the Range: header can save +bandwidth, if the client only asks for the parts of the files that it's still +missing. +

+ +

+ It hasn't been implemented in tipidee yet because parsing the Range: +header is rather complex, and serving parts of files (as opposed to full files +sequentially) also requires some extra coding that wasn't deemed worth it for +an initial release. +

+ +

HTTP Basic Authentication

+ +

+ HTTP Basic Auth is ubiquitous; and even +busybox httpd +implements it. It sounds silly not to have it; it would be good to add to tipidee. +

+ +

+ However, how to implement HTTP basic auth in a secure way is not entirely obvious. +Credentials should not be stored under the document root; passwords should not +be stored in plain text; the credentials database should have more restrictive +permissions than the configuration database; and the credentials database +should be easily regenerated. +

+ +

+ I'm leaning towards a cdb credentials database, distinct from the configuration +file; but this requires a second offline text file processor, for the +credentials file, and adding support for a second cdb mapping in various +places in tipideed. That was more complexity than I +wanted for an initial release; it's not urgent, it can wait. +

+ +

ETags

+ +

+ETags are +unique identifiers for resources that clients can use to cache data, and only +download resources they do not have. Like ranges, ETags support can save bandwidth. +

+ +

+ The problem is that creating ETags is pretty resource-intensive on the server +side. You have to maintain an ETag database, and update it any time a document +changes; alternatively, you have to dynamically hash a whole resource before +deciding if you're serving it or not. Both paths are riddled with traps and +design challenges, and neither is appealing to a server like tipidee aiming at +simplicity and efficiency. ETag support may come one day, but it won't be soon. +

+ +

FastCGI

+ +

+ If tipidee compares to big Web servers performance-wise, which is the expectation, +it is quite possible that the performance bottleneck becomes the CGI protocol +itself, i.e. the need to spawn an additional process for a dynamic request. +In this case, it would be useful to support other methods of communicating with +dynamic backends. +

+ +

+ A module system, or embedding language-specific support into +tipideed, is out of the question, because it goes against +the design principles of tipidee; however, FastCGI support sounds like a possible +path to more performance. +

+ + + diff --git a/doc/index.html b/doc/index.html index 4a2b9b7..b30b01a 100644 --- a/doc/index.html +++ b/doc/index.html @@ -81,8 +81,11 @@ on what I want from a web server, which is: @@ -95,8 +98,10 @@ similar sites that need an intermediary web server.

And why "tipidee"?

- Because h-t-t-p-d is pretty tedious to say out loud. -Only keeping the last three syllables makes it easier. + Because h-t-t-p-d is already pretty tedious to say out loud, and +other web servers have a nasty habit of adding to it; it's much +nicer to make it shorter. And yes, you can take that as an indication of what +is going on with the code, too.

Installation

@@ -118,9 +123,14 @@ information via environment variables. It also defers to tools such as to provide access control and connection fine-tuning. And if you want to run an HTTPS server, you'll need something like s6-tlsserver -to manage the TLS transport layer. So, installing -s6-networking will make -your life easier in many ways. +to manage the TLS transport layer. It will make +your life easier. +

Licensing

@@ -182,6 +192,12 @@ the previous versions of tipidee and the current one.
  • The /etc/tipidee.conf file format
  • +

    Design notes

    + + +

    Related resources