3 ms·
I appreciate this post, thank you for writing it. There is something elegant about PHP and CGI. Just put file somewhere and query it by browser. How would you
by samsquire 4y ago
I appreciate this post, thank you for writing it.
There is something elegant about PHP and CGI. Just put file somewhere and query it by browser.
How would you fix the design of PHP and CGI to be scalable?
I wrote a userspace scheduler that multiplexes lightweight threads onto kernel threads. It is a 1:M:N scheduler since there is a scheduler thread that preempts other thread's loops. I think I can write a runtime that uses files. I also have an epollserver. If I merge them together and write a HTTP router, then in theory you could have a modern server runner that can execute in-process with threads.
I would need to think how to execute Ruby, Lua, Javascript code in a thread. Perhaps that's similar to NodeJs but it's a file runner rather than a server application.
https://github.com/samsquire/preemptible-thread https://github.com/samsquire/preemptible-thread
https://github.com/samsquire/epoll-server https://github.com/samsquire/epoll-server
- tyingq 4y ago>How would you fix the design of PHP and CGI to be scalable? A lot of sites get pretty far with just FastCGI. If that's not enough, then a user-space/mmap cache like Apcu. Then, if that's not enough, horizontal scaling and Redis or similar.