3 ms·
> can have shared state for database connections but the main interpreter is not a separate process but simply a function call. > It would have to be multithre
by rav 3y ago
> can have shared state for database connections but the main interpreter is not a separate process but simply a function call.
> It would have to be multithreaded, it could communicate with nginx via domain socket as php-fpm does.
If we define the communication with nginx over domain socket to be HTTP/1.1, then you have basically reinvented Rails / Flask / Django / Hyper / ... - you can define each script as a Python/Ruby/Rust function and everything runs in shared processes so you can cache database connections and other things if you fancy.