4 ms·
I'm actually working on this now: [1][2] CGI was abandoned because of the slowness of process forking, but with modern kernels, new compiled languages, and bet
by fuball63 9y ago
I'm actually working on this now: [1][2]
CGI was abandoned because of the slowness of process forking, but with modern kernels, new compiled languages, and better reverse proxy servers, I believe that the speed difference is trivial in regards to the advantages:
- Deployment can be done by simple file upload.
- Process isolation adds security and reliability.
- CGI scripts/binaries are vendor agnostic and can be run/tested locally
- CGI scripts can use any language, are stateless, promote hyper modular design (aka functions) and are generally minimalistic in nature.
[1] https://bigcgi.com/ https://bigcgi.com/
[2] https://github.com/bmsauer/bigcgi https://github.com/bmsauer/bigcgi
- tangent128 9y agohttps://bigcgi.com/development https://bigcgi.com/development - "Fast-CGIish Integration" Are you thinking something like "FastCGI, except over stdin/out instead of a listening socket"? Since that sounds like it could work pretty efficiently if (unlike nginx's fcgi implementation) it supported multiplexing.
- fuball63 9y agoI think what I meant by that was basically building a generic FCGI wrapper that could automatically scoop up generic CGI scripts and run them in a shared process automatically. Like this: https://github.com/gnosek/fcgiwrap https://github.com/gnosek/fcgiwrap I like the idea of communication via stdin/stdout though, I'll add that to my notes. I actually was going to remove that from the roadmap entirely, because lately I really like the process isolation and statelessness of regular CGI. Thanks for your comment!
- girvo 9y agoThose first two points apply (almost) to PHP. Probably the nicest parts of it are ease of deployment, and the isolated “throw the world away” process model per-request. I’ve played with SCGI myself in Nim, it’s quite fun to explore.
- fuball63 9y agoAfter working all day deploying webservers in applications in containers in container management environments in virtual networks in virtual servers, its really nice just to drop files in a folder and update a webapp. I've always loved PHP for this, and that's basically what bigCGI is supposed to be about.
- markroseman 9y agoHa! You know what they say, if we just add one more level of abstraction, all of our problems will be solved! Nobody will even have to know what's going on inside. Famous last words.
- setquk 9y agoThis was the best thing with PHP. In comparison, I spent most of Thursday digging through a problem with log4net which causes it to block all other web server threads if someone throws an exception and it has to do heavy reflection to generate the log message. This cascaded up into a complete process failure. Shared state and locks are evil.