Hacker News new | ask | show | jobs
by metaphyze 3382 days ago
Another disappointing limitation is being restricted to Node.js. AWS Lambda lets you write your code in Node.js, Python, Java, or C#. This is particularly useful for tuning your Lambdas based on their expected usage. If you have a Lambda that is being constantly invoked, it might be better to write it in Java. It has a longer start up time but has better performance after the initial startup. However, if your Lambda is invoked infrequently (and thus is frequently shutdown from inactivity), it would better to write it in Node.js or Python to take advantage of the snappier start up time.
4 comments

Firebase engineer here.

Additional languages will come, but we're starting with Node.js. We'd rather take the approach of doing one language really well than a bunch of languages with a poor developer experience.

How does Cloud Functions for Firebase handle node modules with native code add-ons?
Image magick's binaries are already installed on the image. Any native binary node module that has a preinstall script should work too. If you hit an unsupported syscall error, contact firebase support at firebase.google.com/contact/troubleshooting and we'll triage.
404. That's an error.

The requested URL was not found on this server. That's all we know.

For the record, you can also write Lambda programs in C, Haskell, Rust, Ocaml, Go, or basically whatever compiled language you want, as long as you can manage to produce a binary whose dynamically linked library paths are compatible with Amazon Linux, which is quite easily done either by building on EC2 or using a Docker image with the Amazon Linux file system --- or building static binaries.
Well...there's ways to call into Go, Rust and C++ from Node with very little performance penalty. Rust and C++ can even build native Node modules with no need to even write a single line of glue code in JavaScript. If you need performance, Node gives you quite a few options.
Agreed. I still hate JS