about summary refs log tree commit diff stats
path: root/doc/architecture.md
Commit message (Collapse)AuthorAgeFilesLines
* loader, forkserver: launch CGI processes from fork serverbptato2025-03-141-20/+20
| | | | | | | | | | Well, it's not much prettier... but it will be useful for keep-alive. (Hopefully.) Also, loader could now be locked down capsicum/pledge/seccomp, but I'm not sure if there's a point. The biggest potential threat it faces is cross-contamination of handles, and no amount of syscall filtering is going to protect against that.
* Update docsbptato2025-01-271-17/+21
|
* loader: use per-process control socketsbptato2025-01-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Previously, each message (load, resume, passFd, etc.) would open a new connection to loader's UNIX socket, and assumed the loader was dead when the loader did not respond (ECONNREFUSED). As it turns out, this model was hopelessly broken: POSIX does not specify when a UNIX socket can refuse connections, so while it happened to work on Linux (which just blocks if it can't accept right now), FreeBSD would randomly refuse connections whenever its listen queue was full. Instead, we now take a socketpair() from the loader in addClient, and pass on one half to the client (the other half stays in loader); this is the control stream, and all messages from the specific client are sent through it. If a message includes a new stream (e.g. lcLoad), then it sends a new socketpair through the control stream. Aside from not being completely broken (and being marginally more efficient), this arrangement has several other benefits: it removes the need for authentication, almost removes the need for sockdir (now only buffers use it), and will make it easier to add async message processing in the future.
* layout: cache sub-layoutsbptato2025-01-021-0/+4
| | | | | | | | Only root blocks for now; for non-roots, you'd have to cache exclusions too, and that is a fair bit harder. It isn't very noticable as an optimization, but it's a good first step towards a cached layout.
* loader/* -> serverbptato2024-11-241-3/+2
| | | | one less mystery
* js: reorganize modules, update docsbptato2024-11-151-13/+17
| | | | | | | most of it has already been moved to monoucha, and the rest fits better in other directories. also, move urimethodmap to config
* Update docsbptato2024-11-141-189/+202
|
* Update docsbptato2024-10-231-4/+2
|
* ftp: remove libcurl dependencybptato2024-10-011-3/+44
| | | | | | | | | | | | | This splits out sftp into a separate binary that *does* depend on libcurl. However, ftp now uses the same socket code as gopher. ftps is dropped, because I've never even tested it. Maybe I'll add it back when we have working OpenSSL bindings. This is still "doing the easy part first", now I have no clue how to handle sftp because my initial plan ("just use the sftp binary") doesn't work - sftp batch mode doesn't accept passwords. libssh2 remains the sole candidate, but that's what libcurl wraps anyway.
* Refactor img/*bptato2024-09-151-2/+0
| | | | | I've moved most image logic to adapter, so it doesn't really make sense to have this subdir anymore.
* loader: move back data URL handlingbptato2024-08-031-0/+3
| | | | | | | data URIs can get megabytes long; however, you can only stuff so many bytes into the envp. (This was thwarting my efforts to view pandoc- generated standalone HTML in Chawan.) So put `data:' back into the loader process.
* cssvalues, twtstr, mediaquery: refactor & fixesbptato2024-08-021-2/+2
| | | | | | | * cssvalues, twtstr: unify enum parsing code paths, parse enums by bisearch instead of hash tables * mediaquery: refactor (long overdue), fix range comparison syntax parsing, make ident comparisons case-insensitive (as they should be)
* Update docsbptato2024-07-291-8/+8
|
* Update docsbptato2024-07-031-11/+20
|
* Update docsbptato2024-06-021-10/+3
|
* Update docsbptato2024-04-241-8/+4
|
* Initial flexbox supportbptato2024-04-051-2/+2
| | | | | | | | | Still far from being fully standards-compliant, or even complete, but it seems to work slightly less horribly than having no flexbox support at all on sites that do use it. (Also includes various refactorings in layout to make it possible at all to add flexbox.)
* loader: constant time key comparisonbptato2024-04-021-4/+4
| | | | | GCC seems to generate something that strongly resembles a constant time comparison, so I guess this should be good enough.
* update readme, add doc/architecture.mdbptato2024-03-251-0/+328