3 ms·
I wonder about the motives behind Facebook's (apparent) decision to continue investing in PHP. If I understand it correctly, most of their backend services are
by Nitramp 14y ago
I wonder about the motives behind Facebook's (apparent) decision to continue investing in PHP.
If I understand it correctly, most of their backend services are implemented in some other language, and their PHP code is mostly used as a more flexible templating language. If that's the case, it shouldn't be all too hard to migrate away from PHP, if the chose to do so.
It seems like they spend a lot of engineering effort in optimizing PHP, and probably also a lot of CPU cycles in executing it. I assume there is a tipping point somewhere, when the investment in PHP stops making sense, even given effort to port legacy code.
There are a lot of arguably nicer alternatives to PHP, and I bet they are not benefiting from the one really superior feature of PHP (easy deployment on shared hosting).
- Trufa 14y agoI am honestly asking, is there a simple reason why, lets say python, can't be easily deployed on shared hosting. Let's take Heroku, probably the easiest way. It will take some persistance: https://devcenter.heroku.com/articles/quickstart https://devcenter.heroku.com/articles/quickstart + https://devcenter.heroku.com/articles/python https://devcenter.heroku.com/articles/python and that's just the hello world. So my question is why is like that, can it be solved? What are the technical limitations for it? I know complicated things are complicated and if there would be some simple other way around it, it would already be like that, but then again what is the reason?
- gtani 14y agoDo you mean like how erlang, haskell and ocaml can be run on bare Xen slices? http://corp.galois.com/blog/2010/11/30/galois-releases-the-haskell-lightweight-virtual-machine-halv.html http://corp.galois.com/blog/2010/11/30/galois-releases-the-h... http://halvm.org/wiki/ http://halvm.org/wiki/ http://anil.recoil.org/papers/2010-hotcloud-lamp.pdf http://anil.recoil.org/papers/2010-hotcloud-lamp.pdf http://erlangonxen.org/ http://erlangonxen.org/
- gsnedders 14y agoNo: with PHP you can upload a bunch of files over FTP and you're done. With Python you pretty much always need to ssh into the server after pushing the files to the server. For someone who knows nothing, this makes PHP much easier.
- rsynnott 14y ago> I am honestly asking, is there a simple reason why, lets say python, can't be easily deployed on shared hosting. The standard execution model for PHP apps is, request comes in, code is executed, code goes away, resources returned. PHP is optimised to suit this model. For nearly anything else, you have one or more long-running processes which take requests, thus skipping the code loading/interpreting/compiling stage, which tends to be expensive. It's quite easy to do python CGI on shared hosting without concerns, but it's not going to be fast. Once you start looking at things like FastCGI or WSGI, you have a process which, at least some of the time, is persistent.
- simonw 14y agoThis topic has been covered quite extensively on Quota - here's a relevant thread: http://www.quora.com/Why-hasn-t-Facebook-migrated-away-from-PHP http://www.quora.com/Why-hasn-t-Facebook-migrated-away-from-...