News for hackers. Stuff that matters.
Re:I recommend CGI instead of web frameworks by speedgoose on Sunday August 22, 2021 @02:39PM (#28268201)
It's a bit better but one process can only process one request at a time. You need a lot more processes compared to a http framework processing http requests in parallel.
Re:I recommend CGI instead of web frameworks by jagged-chisel on Sunday August 22, 2021 @02:48PM (#28268282)
How do those web frameworks gain the ability to process things in parallel? What prevents a ‘single process’ from adopting those same methods?
Re:I recommend CGI instead of web frameworks by speedgoose on Sunday August 22, 2021 @03:09PM (#28268494)
Those web frameworks are lower level and have an embedded HTTP server designed to process things in parallel. It's in the standard library in golang or nodejs for example.
Re:I recommend CGI instead of web frameworks by jagged-chisel on Sunday August 22, 2021 @05:03PM (#28269586)
Sounds like one can use libuv in a CGI project and gain the same parallelization.
Re:I recommend CGI instead of web frameworks by samus on Monday August 23, 2021 @01:26AM (#28272576)
... and end up with something like Node.js or Vert.x.
Re:I recommend CGI instead of web frameworks by samus on Monday August 23, 2021 @01:26AM (#28272574)
Usually you have a thread pool (threads have startup costs too), monitor the server socket and assign incoming connections to one of the worker threads. Nonblocking architectures that do everything in a single thread also exist.

It's very common even to do this: just use Apache `mod_proxy` (or something more specialised) to forward requests to a backend server such as Apache Tomcat.

Re:I recommend CGI instead of web frameworks by smaudet on Thursday August 26, 2021 @08:30AM (#28314105)
Most people don't need to worry about 'parallel' - that's the point of the OP.

Need a site to order XYZ? Unless you are a mega chain, small biz doesn't need to do anything more complex than serve its 100 customers reliably. Most 'modern' stuff is wasted abstraction for complexity which does not exist.

Re:I recommend CGI instead of web frameworks by alisonkisk on Sunday August 22, 2021 @04:02PM (#28269041)
how many features can your process accumulate before it's called a framework?
Re:I recommend CGI instead of web frameworks by technothrasher on Sunday August 22, 2021 @02:56PM (#28268374)
Fcgi apps can handle requests in parallel in a single process just fine, as long your environment supports it.
Re:I recommend CGI instead of web frameworks by speedgoose on Sunday August 22, 2021 @03:12PM (#28268524)
You are right, fastcgi supports multiplexing. It seems that it's not implemented very often though.