[ $davids.sh ] โ€” david shekunts blog

๐Ÿ’ A New Runtime Milestone for Node.js ๐Ÿ’

# [ $davids.sh ] ยท message #211

๐Ÿ’** A New Runtime Milestone for Node.js **๐Ÿ’

Yes, it's still beta and you may have already heard, but I'm hyped

#nodejs #serverless #go

  • @ [ $davids.sh ] ยท # 1110

    Wow, they really pulled something off!

    So, (1) Node.js's single-thread limitation is somewhat addressed by serverless, but (2) self-hosted serverless is complex, (3) the code needs to meet Lambda requirements, and (4) starting a container to run your function is a very time-consuming process.

    I read a while back that some folks were developing an interesting concept: they'd pre-warm a bunch of Node.js runtimes (V8) and run your Lambdas directly on them (like an "eval").

    Turns out, this is Cloudflare Workers, and they've RELEASED THIS RUNTIME OPEN SOURCE!!!

    https://github.com/cloudflare/workerd

    Serverless is cool, of course, but I honestly don't care much about it (it's a great technology, will be useful, we'll use it, but most of the time, I personally just don't need it). Node.js and Python have already won there and will continue to evolve.

    The coolest thing about this technology, folks, is a multi-threaded Node.js runtime with heap and cross-lambda communication... they're fulfilling my dream โ€“ a bastardized Go written in TS ๐Ÿ˜๐Ÿ˜๐Ÿ˜

    (And I'm not kidding)

    I really hope people pick up this concept and continue to develop it (and I'd love to build a service for testing on it). We'll see, JS is the stack where people love concepts so much that I might invest in the development of my own unique runtime.

  • @ [ $davids.sh ] ยท # 1112

    Ah yes, @arutyunov, this is your dream too: PHP.js - a runtime instead of Apache, and Node becomes purely a scripting language

  • @ Artur G ยท # 1113

    CF runtime has a browser in their lambdas. ๐Ÿ˜ That's quite a shift in mentality.

    There are also functions on wasi. I don't remember the company name.

  • @ [ $davids.sh ] ยท # 1114

    Judging by the code, they modified V8 (for example, there's no DOM, renderer, or anything like that), which seems more like a stripped-down Node.js than a browser to me.

    The shift is 100% and I don't think it's the last one.

    I'm ready to predict: (1) that even if not this runtime, a similar one will appear, (2) official Node.js will start leaning away from async/await towards generators/fibers, (3) TS will learn to compile to WASM and its own virtual TS machine will appear, (4) another 850 frontend frameworks will be released (although by the time I wrote this comment, they've probably already been released, gained 50,000 stars, and been deprecated).

  • @ Kirill Arutyunov ยท # 1115

    We already have Roadrunner, just so you know.

  • @ [ $davids.sh ] ยท # 1116

    Wow, first time seeing this, interesting

    Are these in use?