4 ms·
Why is a NodeJS dependency necessary? PHP can handle and route requests just fine. Modern PHP even comes with its own server.
by krapp 9y ago
Why is a NodeJS dependency necessary? PHP can handle and route requests just fine. Modern PHP even comes with its own server.
- superasn 9y agoIt's because Aws Lambda doesn't support PHP natively just yet[1]. Maybe if anyone from Amazon is reading this, please add support for PHP in Lambda too. It's still quite relevant and useful to a lot of users. [1] https://aws.amazon.com/lambda/faqs/ https://aws.amazon.com/lambda/faqs/
- joecot 9y agoAWS Lambda doesn't support php natively currently. It came out with Node support, and has since added Python, Java, and C#. Of them Node generally has the fastest startup time, so if you want to run an unsupported language (like PHP), you build a binary for that language, and then write a small node script to call it and handle the input and output.
- sreque 9y agoEvery measurement I have made of startup time puts Python 2.7 at about half the startup time of Node.js.
- pritambarhate 9y agoNow that Go is also supported it would be interesting to know what kind of start up time it has.
- tracker1 9y agoas sreque mentions, Python is a bit faster than node. Though both are much faster than the other options.
- Can_Not 9y agoLamdba doesn't support PHP natively, so one of the natively supported options has to be used to bootstrap it.