Earlier quoted context omitted.
Submit that to them then?
It might be a good idea, although I fear that if I only fix one node framework and keep the rest intact it will create a false impression that that framework is somehow amazing. Still better than a false impression that nodejs is somehow slow. They really need some QC though.
A 7KB AWS lambda Node.js library with zero runtime dependencies
51–60 of 63 posts
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#52Not knowing this myself, could someone explain the attraction in using a web scripting framework for stuff like this? I get that this particular example makes the whole thing seem fairly straightforward, but have never really heard why people like adapting Node.js and similar to non-web environments beyond "you can". Is there anything more to it than that?
My application (https://operatr.io/) is Clojure (JVM / Back-end), Clojurescript (Browser / Front-end), Clojurescript (AWS Lambda) - there's enormous leverage is using one language in all cases.
I have at least one function that exists in all three environments, but more than that I have one common language for delivery.
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#53Earlier quoted context omitted.
It might be a good idea, although I fear that if I only fix one node framework and keep the rest intact it will create a false impression that that framework is somehow amazing. Still better than a false impression that nodejs is somehow slow. They really need some QC though.
Maybe we'll have to disagree because I'm still pretty sure nodejs is somehow slow.
you can run ./tfb --test express-postgres and compare.
If you can't wait for all the tests to complete, a representative one can be obtained more quickly by running
./tfb --test express-postgres --type db --query-levels 10 --concurrency-levels 128
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#54Earlier quoted context omitted.
Node is especially good at handling async stuff. It’s in the JavaScript DNA. Whether through callbacks, Promises or async/await. As many backend apps are basically tying together 3rd party and 1st APIs it’s actually a very logical choice.
Kind of silly in a lambda though, as lambdas do not run concurrently. A bash script would suffice.
Very async.
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#55Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#56Earlier quoted context omitted.
Kind of silly in a lambda though, as lambdas do not run concurrently. A bash script would suffice.
Lambda for NodeJs doesn't / won't run multiple requests in the same process but different V8 contexts at the same time? That sounds wasteful, and imo makes Cloudflare's Serverless tech superior for strictly network-io bound workloads. Lambda, to be fair, supports way many event triggers and all sorts of runtime and user-space constructs, but still manages warm start times <10ms which is really impressive.
AWS Lambda uses their Firecracker micro-vm tech which supports more runtimes, environments and triggers than just Node and also runs container workloads. [2]
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#57Not knowing this myself, could someone explain the attraction in using a web scripting framework for stuff like this? I get that this particular example makes the whole thing seem fairly straightforward, but have never really heard why people like adapting Node.js and similar to non-web environments beyond "you can". Is there anything more to it than that?
Node is not a web scripting framework, though the fact that JS is used as the main language for web front end is a big part of the attraction; as it lets frontend and backend share code and be served by the same language competency.
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#58Not knowing this myself, could someone explain the attraction in using a web scripting framework for stuff like this? I get that this particular example makes the whole thing seem fairly straightforward, but have never really heard why people like adapting Node.js and similar to non-web environments beyond "you can". Is there anything more to it than that?
Node is especially good at handling async stuff. It’s in the JavaScript DNA. Whether through callbacks, Promises or async/await. As many backend apps are basically tying together 3rd party and 1st APIs it’s actually a very logical choice.
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#59Not knowing this myself, could someone explain the attraction in using a web scripting framework for stuff like this? I get that this particular example makes the whole thing seem fairly straightforward, but have never really heard why people like adapting Node.js and similar to non-web environments beyond "you can". Is there anything more to it than that?
Re: A 7KB AWS lambda Node.js library with zero runtime dependencies
#60If you’re looking for more full-featured middleware functionality targeted at Lambda, also check out Middy: https://github.com/middyjs/middy