I respect Graham and recognize how important mod_wsgi was, we ran it back at my first python job. That said the posts read like they were mostly AI generated and feel dead and without value. They seem designed to serve a purpose but feel clumsy and soulless to me.
[3 hidden]5 mins ago
The LLM-generated writing is incredibly tedious to read, but I like the idea of pre-loading the application and then forking the workers (kind of like Android's Zygote), while, as the LLM puts it, "Muru also takes care to freeze the garbage collector's view of the preloaded objects before forking", or, as it's more concisely put in the code, "gc.freeze()".
A variation on that theme that I would like to try is forking a worker per user (or per session), which would be sandboxed (e.g. with Capsicum in FreeBSD) and only have access to that user's credentials. A separate process would route requests to these per-user workers and provide them with the appropriate credentials. This could then be combined with PostgreSQL's row-level security, with each user having their own user in PostgreSQL, and the per-user worker only having access to that particular user's database credentials.
I feel like this should significantly limit the consequences of both SQL injection vulnerabilities and RCE vulnerabilities. It wouldn't solve stored XSS, I suppose, but I believe that is handled by using a template language for HTML (one that encodes parameters automatically on output). It also probably wouldn't scale to a planet-scale mass-market web application, but there are lots of apps that don't need that kind of scale but do need to be secure.
Maybe this sort of thing has already been done and written about (by humans)?
[3 hidden]5 mins ago
The prefork model is pretty common.
The process model you’re describing is also what’s old is new again; a lot of the web frontend on a database RAD tool systems like 4D did this in the late 90s, as did the IBM HTTP server on AS/400 (basically the whole family of “stuff that originally spawned a process for a terminal user session and got ported to web.”). I think some of the more session oriented frameworks like Wt did this too, although a lot of others preferred to use multiple session handler continuations in a single OS process since things were so expensive back then.
[3 hidden]5 mins ago
one process and one db connection per user would be very expensive wouldn't it?
[3 hidden]5 mins ago
> The AI may be doing a lot of the work on the surface, but deciding what isn't good enough yet is still down to me...
We've gone from talking about giving agency to AI (agents) to us having some agency over them.
How the turn tables!
[3 hidden]5 mins ago
A fairer quote:
> AI gets rid of the grunt work that can be so frustrating, and leaves me with the ideas and the satisfaction of seeing them work.
[3 hidden]5 mins ago
I am noticing a trend, some software developers when they create something now they vouch themselves and designate their work by “creator of xyz before AI”, why? Is this to say you’re not slopping your work? I don’t think this matters now, did you use AI or not? If you did, great, you used a tool to speedup your work, if you didn’t, also great trying to have a principle, but either way none really matters now, it just sounds like a desperate attempt to signal that you’re better than the slop, which, you most likely used anyway.
[3 hidden]5 mins ago
I think so too. tbf it does seem to work. Had this not been on Simmon Willson's blog and the creator having good track-record, I wouldn't have bothered to have a look.
Although I personally give more weightage t to "Creator of xyz" part than the "pre AI" part.
[3 hidden]5 mins ago
People always did this though. It is just that now LLMs produce at speed so you see it more often.
[3 hidden]5 mins ago
the guy added about the same amount of code he had created the 15 years before to his "old" codebase. Which he now orphans for a full rewrite?
A variation on that theme that I would like to try is forking a worker per user (or per session), which would be sandboxed (e.g. with Capsicum in FreeBSD) and only have access to that user's credentials. A separate process would route requests to these per-user workers and provide them with the appropriate credentials. This could then be combined with PostgreSQL's row-level security, with each user having their own user in PostgreSQL, and the per-user worker only having access to that particular user's database credentials.
I feel like this should significantly limit the consequences of both SQL injection vulnerabilities and RCE vulnerabilities. It wouldn't solve stored XSS, I suppose, but I believe that is handled by using a template language for HTML (one that encodes parameters automatically on output). It also probably wouldn't scale to a planet-scale mass-market web application, but there are lots of apps that don't need that kind of scale but do need to be secure.
Maybe this sort of thing has already been done and written about (by humans)?
The process model you’re describing is also what’s old is new again; a lot of the web frontend on a database RAD tool systems like 4D did this in the late 90s, as did the IBM HTTP server on AS/400 (basically the whole family of “stuff that originally spawned a process for a terminal user session and got ported to web.”). I think some of the more session oriented frameworks like Wt did this too, although a lot of others preferred to use multiple session handler continuations in a single OS process since things were so expensive back then.
We've gone from talking about giving agency to AI (agents) to us having some agency over them.
How the turn tables!
> AI gets rid of the grunt work that can be so frustrating, and leaves me with the ideas and the satisfaction of seeing them work.
Although I personally give more weightage t to "Creator of xyz" part than the "pre AI" part.