News for hackers. Stuff that matters.
Re:The beauty of CGI and simple design by wizzwizz4 on Saturday January 07, 2023 @07:00AM (#34287271)
> What if your persistent process hangs or crashes for whatever reason?

You've got the same problem with your web server, and your operating system kernel. Simply write a program that can't hang or crash – at least, not due to an application bug. It takes attention to detail, but this is a lot easier than writing a program that always behaves correctly; if you limit the syscalls you make, use timeouts appropriately, and don't segfault, it's often achievable.

Re:The beauty of CGI and simple design by scotty79 on Saturday January 07, 2023 @08:27AM (#34287785)
I don't think any mainstream framework in any mainstream language has these kinds of precautions.

Rails? Django? Express? .NET? Do they kill long running requests so they don't affect whole application?

Can the application still mostly work despite syntax error in one of the files?

Another thing is level of trust. I trust Linux kernel, I trust apache webserver. But some webserver written in scripting language few years ago? Not so much.

Re:The beauty of CGI and simple design by Semaphor on Saturday January 07, 2023 @08:39AM (#34287860)
> .NET? Do they kill long running requests so they don't affect whole application?

Not sure about the built-in .net server, but IIS does exactly that. It supports timeout and error/time based restarts for the persistent process.

Re:The beauty of CGI and simple design by alerighi on Saturday January 07, 2023 @02:00PM (#34291358)
Well try in a nodejs server to put a `while(true);` in a request handler. Do you know the answer? The whole process blocks, since nodejs is single process.

I trust more the code that I wrote than the code written from others... not because I'm better than others, but because I know what it does, and I know how to fix it if it breaks.

Re:The beauty of CGI and simple design by scotty79 on Saturday January 07, 2023 @02:18PM (#34291562)
It still wouldn't hurt if the framework just killed it after 3 seconds with timeout message.
Re:The beauty of CGI and simple design by rusebor on Sunday January 08, 2023 @02:32AM (#34296939)
Erlang