Hacker News new | past | comments | ask | show | jobs | submit login

There are a bunch of things that still are language or language architecture specific.

How you do manage web servers and starting / stopping processes

Traditionally, PHP/Ruby/Python have had a process per request model but even then, how these processes are started and what memory is shared between requests is different

node.js when deployed on a server allowed one process to serve many requests through the use of the event loop but this has changed with the use AWS Lambda (one process per request) which has opened up more efficient approaches (cloudflare workers)

How do you manage database connections or other shared resources PHP and Laravel expect certain types of things (i.e. db connections) to be long running. How do you deal with scaling up/down your servers in this world?

Laravel has it's own ORM with it's own apis. Can these APIs be improved to allow things to be more easily scaled?

vercel

I think vercel has shown that a tight integration between React and Infrastructure can provide a lot of value to many types of teams. I would expect the same types of benefits could exist for laravel/php!




> Traditionally, PHP/Ruby/Python have had a process per request model

That's completely wrong for python/ruby (unless you're writing cgi scripts).

Regarding php, that's an assumption that's usually wrong as well.

Apache's mod_php will load the php interpreter within apache and keep it resident.

php-fpm will usually keep a number of processes around and not restart them unless you configure pm.max_requests to something above zero. See https://www.php.net/manual/en/install.fpm.configuration.php and look for 'pm.max_requests'

In my opinion the greatest tragedy of php is that most libraries and frameworks are written under the assumption that the whole environment will be thrown away and the whole process killed after the current request is served and thus that it's perfectly fine to litter the address space with garbage (and php's garbage collection is nothing fancy, really).

Php people should really start assuming the process executing their code will stay around (and that restarting processes is really an anti-pattern).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: