Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
Programming

Ask Slashdot: Would You Consider a Low-Latency JavaScript Runtime For Your Workflow? (github.com) 131

Amazon's AWS Labs has created LLRT an experimental, lightweight JavaScript runtime designed to address the growing demand for fast and efficient serverless applications.

Slashdot reader BitterEpic wants to know what you think of it: Traditional JavaScript runtimes like Node.js rely on garbage collection, which can introduce unpredictable pauses and slow down performance, especially during cold starts in serverless environments like AWS Lambda. LLRT's manual memory management, courtesy of Rust, eliminates this issue, leading to smoother, more predictable performance. LLRT also has a runtime under 2MB, a huge reduction compared to the 100MB+ typically required by Node.js. This lightweight design means lower memory usage, better scalability, and reduced operational costs. Without the overhead of garbage collection, LLRT has faster cold start times and can initialize in milliseconds—perfect for latency-sensitive applications where every millisecond counts.

For JavaScript developers, LLRT offers the best of both worlds: rapid development with JavaScript's flexibility, combined with Rust's performance. This means faster, more scalable applications without the usual memory bloat and cold start issues. Still in beta, LLRT promises to be a major step forward for serverless JavaScript applications. By combining Rust's performance with JavaScript's flexibility, it opens new possibilities for building high-performance, low-latency applications. If it continues to evolve, LLRT could become a core offering in AWS Lambda, potentially changing how we approach serverless JavaScript development.

Would you consider Javascript as the core of your future workflow? Or maybe you would prefer to go lower level with quckjs?

Ask Slashdot: Would You Consider a Low-Latency JavaScript Runtime For Your Workflow?

Comments Filter:
  • no. (Score:4, Insightful)

    by snowshovelboy ( 242280 ) on Saturday May 17, 2025 @11:36PM (#65384217)

    Instead of using JavaScript, I would use a tool that suits the job at hand.

    • Exactly. Where I work we do a lot of datascience. Mostly Python. Its battletested and has some great libraries for handling huge datasets. We'd use R or julia, but nobody knows it, and thats fine. For our IOT telemetry we use a combination of Go (*excellent for servers, and absolutely nothing else) and C++ (excellent for almost everything but an absolute bitch to debug when things go wrong, and they *will* go wrong). Web shit, combination of python and js depending on the team, for back end and some nasty v

      • by will4 ( 7250692 )

        I do not want to use JavaScript on the server-side or embedded for these reasons:

        1. Language not designed for small environments
        2. Language defects - white space sometimes ending statements and sometimes not, modularity as an afterthought, lack of enforced at compile-time type checking, lax language syntax (parameters without a type declared), everything can have dynamic properties
        3. Single threaded by default
        4. Reliance on HTTP for communications instead of a connection oriented, type checked protocol
        5. Ov

        • 1. Language not designed for small environments

          It was, which it to say it wasn't but what was a big environment when it was designed is now a small environment. It dates from 1995, from Nutscrape version 2.0. According to the 'tubes it required what was a fairly lavish 8M of RAM.

          Stripped down version of Java, C#, go or Rust with most of the advanced language features removed

          Why are "advanced language features" bad? What would you remove from, say Java or Rust which would improve it for use on the server or

          • Linux required a tiny amount of RAM way back when. However, it and other libraries have grown. JavaScript has so many additions because of so many features demanded, that it has grown by orders of magnitude, where it may not be uncommon for apps to be using the maximum amount of RAM (1.4 GB to 2 GB) in Chrome.

            However, if one is looking for actual performance on a server, unlike a desktop where the CPUs are mainly isle and can handle a lot of processing, then one really needs to look at another language, p

            • Linux required a tiny amount of RAM way back when.

              I remember running Linux on a 386 with 4M of RAM. It wasn't awesome but it was mostly used to support a bunch of VT terminals to allow people to telnet to a bigger unix machine elsewhere.

              Of course Linux, and by that I mean Debian can still run fine in 8M:

              https://linux.slashdot.org/sto... [slashdot.org]

              JavaScript has so many additions because of so many features demanded, that it has grown by orders of magnitude, where it may not be uncommon for apps to be using the maximum

    • by Sique ( 173459 )
      Instead of answering the question, you posed it a second time.
    • If the job at hand is to take a larger always-on JS project and spin off a few on-demand processors to save money, then JS is probably the right tool for the job. The fact that there are some drawbacks does not necessarily mean it's not the right tool.

  • No (Score:4, Insightful)

    by theweatherelectric ( 2007596 ) on Saturday May 17, 2025 @11:44PM (#65384221)

    Use WebAssembly instead. It's higher performance than JavaScript and it brings every language to the web. Write in your language of choice and compile to WebAssembly.

    WebAssembly is the future for application development on the web. JavaScript should just stick to being a scripting language.

    If you need to do some scripting, use JavaScript. If you're developing an application, compile to WebAssembly.

    • If you need to do some scripting, use JavaScript. If you're developing an application, compile to WebAssembly.

      Or just use C++ and a good desktop UI toolkit like QT (you can even let the graphic designer play along with that QML goodness).

      Oh yeah....... I know, nobody wants desktop apps anymore. Jesus wept...

      • Or use C# and a UI toolkit like Avalonia and compile to both desktop and WebAssembly: https://avaloniaui.net/ [avaloniaui.net]

        • I'd go with C# or Java, compiling languages with strong typing.

          I hate runtime errors that a compiler should have caught. Script languages are especially sensitive to code rot, especially if you have many files. Change one, find two that are impacted by the change. Then at runtime around new year you'll find the one you missed.

    • Funny how so many non-web developers think web assembly is the future and web developers are like... Meh.

    • by leptons ( 891340 )
      This post isn't about "the web" or anything to do with webassembly. This is about AWS Lambda, and running Javascript on a server. I doubt the "LLRT" this post is about is going to run webassembly, as that is not what LLRT is for, and webassembly no doubt would hinder the startup time of LLRT programs.
  • by 93 Escort Wagon ( 326346 ) on Sunday May 18, 2025 @12:14AM (#65384251)

    You're gonna be using a compiled language, not something like this.

    • by jebrick ( 164096 )

      For the backend, this is my preferred choice. I have had to deal with a large AWS app that was written EXACTLY how AWS tells you to do it. It is slow as hell because it is too much scripting language. For services that you pay by the millsecond, why would you not want speed?

      Write the backend in Go or C# or Java. Your frontend can be all JS or Python.

  • I'll use javascript for web pages. All other environments have better options.
  • by drnb ( 2434720 ) on Sunday May 18, 2025 @01:29AM (#65384301)
    Using Javascript beyond webpages is a way of saying either:
    (1) The only programming language I know is Javascript.
    (2) My idiot boss made me use Javascript, would you like a copy of my Resume?
    • adding another point (Score:3, Interesting)

      by will4 ( 7250692 )

      None of the major organizations are interested in replacing the technology what is the plumbing.

      Browser makers - Nope - The want to keep going JavaScript with its defects, HTML with its defects (magic string matching of id values), and patches which keep perpetuating the bad parts (Typescript)

      ECMA - Nope - Spent too long fighting to make incremental JavaScript standards changes without addressing the fundamental problems with JavaScript

      W3C - Nope - Same with keep going with XML based web standards (HTML),

    • by leptons ( 891340 )
      (3) Context switching has a real const in developer time, and developer time is money.

      I can code in a dozen languages, but I prefer not to context switch if I don't have to, especially if Javascript is perfectly capable of getting the job done. Developers love to overcomplicate things, and using 2 or 3 languages when you could have just used one is an example of that.
      • by drnb ( 2434720 )

        (3) Context switching has a real const in developer time, and developer time is money.
        I can code in a dozen languages, but I prefer not to context switch if I don't have to, especially if Javascript is perfectly capable of getting the job done. Developers love to overcomplicate things, and using 2 or 3 languages when you could have just used one is an example of that.

        If context switches amount to a non-trivial amount of time, "knowing" the language sounds like resume-speak where folks list anything they ever touched.

        If I use Swift for an extended period of time, my first few minutes in C++ or Java may have a few absent semicolons. It quickly passes.

        • by leptons ( 891340 )
          Except some context switching is more difficult than others. Great if all the languages you use are C style syntax, that's a small win. But you can't just copy and paste code from front-end to back-end like you can with a pure javascript project. This does happen, sometimes logic is prototyped on the front-end and then I move it to the back-end. And I've created projects with Electron which fuses front-end and back-end into one seamless project, and it's honestly pretty awesome, it blurs the lines between f
          • by drnb ( 2434720 )
            Swift, C#, Java, C, C++ ... those are my "resume" languages, the general purpose languages based on platform or in the case of C/C++ portability. JavaScript and Python being my niche languages.

            Call it a strongly typed preference, part of a defensive programming orientation. Yes, JavaScript has some stronger typed variants, but that's not what people generally use.
            • by leptons ( 891340 )
              >Yes, JavaScript has some stronger typed variants, but that's not what people generally use.

              Typescript is definitely dominating the professional web development world. My company went from Javascript to Typescript almost overnight, for most projects, especially greenfield. We've converted plenty of projects from Javascript to Typescript in the last couple of years. Yes, it is what people are using today, and to say it isn't tells me you don't watch the front-end job market at all.
    • Bullshit. JS is find for many non-web apps. It's fast and well supported.

      People who say JS is just for the web are apparently too inexperienced to use JS without shooting themselves in the foot and that has made them angry at their own inadequacies that they now take out on JS.

      • by drnb ( 2434720 )

        Bullshit. JS is find for many non-web apps. It's fast and well supported.

        People who say JS is just for the web are apparently too inexperienced to use JS without shooting themselves in the foot and that has made them angry at their own inadequacies that they now take out on JS.

        Some of the people who say so are experienced with JavaScript and other languages.

        You are just offering the flip side of my other argument, that people with limited experience, who know know only one language tend to try to use it everywhere. Overusing that one language, missing more appropriate languages. JavaScript can appear on both sides, the one language known, or the language unknown. Both are quite different from a skilled programmer who knows multiple languages well and can pick and choose tools

  • The time of developers and infra admins cost way more than running the hardware.

    The extra complexity that this introduces either directly by configuration or indirectly by incompatibilities or even worse security vulnerabilities is not worth it.

    Once you get big enough that the HW cost become a significant factor, you should have enough capital to switch.

  • JS is one of the most prevalent PL in layer 7 these days. For good reasons, even if some of those are historic.
    - open standards (Web)
    - cross platform (FOSS Web)
    - lots of shiny clicky touchy stuff (Web)
    - lives in a space that is based on documents and static data and only introduces Turing as an afterthought (Web) ... and yes this _is_ an advantage!
    - the strict typing thing needed for bigger stuff is also an afterthought done with a trivially simple FOSS superset of JS that you can pick up and use in 5 Minut

  • There is no uniformity in the naming conventions
  • "rapid development with JavaScript's flexibility..."

    I just built something major using Javascript for the UI and Java for the server. The server part went ten times faster - literally. Reason: every time I change something about the design, the Javascript side has all kinds of issues that only pop up when running the app, but the Java side's compiler finds every issue right away. I pulled my hair out over the Javascript side. Yes, writing fresh code is 10% faster for Javascript, but getting things work as c

    • by leptons ( 891340 )
      You are doing it wrong. Javascript has no such problems for me, but I know what I'm doing with it. You seem to not be that good with Javascript, but that isn't a Javascript problem, that's a YOU problem.
      • Hi. What do you do when you realize that you have to change the type of something? How do you find all the places that pass and act on objects of that type?
        • by leptons ( 891340 )
          Who says I'm not using Typescript now? And that's never really been a problem for me even with plain old Javascript in 25 years using the language every single day at work and in personal projects.
          • Typescript is typesafe. I considered it, but it is a hassle because it requires an extra layer of tooling. I really wish that Javascript would be enhanced so that it conforms to typescript.
            • by leptons ( 891340 )
              If you aren't familiar with front-end tooling, then I can see how Typescript can be intimidating, but it's not that difficult as many people have tried to simplify it for you. I just followed suggestions from some blog posts and had it working pretty quickly. I don't doubt that Javascript will someday have optional typing baked-in, but today is not that day.

              Javascript did have an iteration called "Harmony" (ES4) that did have static types. I used it quite a bit back in the day. This was Microsoft's first
              • What didn't you like about Java?

                BTW, Java has evolved a lot. They have made it a little less verbose. But again, I find that the verbosity is more than made up for by the type safetynet. I have refactored large code bases and introduced zero errors - once it compiled, everything worked. I have done the same in Ruby but dozens of bugs resulted.

                Disclosure: I wrote Sun's enterprise Java textbook.

                • by leptons ( 891340 )
                  I embraced Javascript the first week it was released in Netscape. Before that I had programmed in a bunch of other languages, and I saw the internet before Javascript, and I remember telling a friend that "this thing really needs a scripting language". Javascript was the answer to those prayers, and I'm glad they made it accessible and easy to use without any boilerplate, with the source code easily readable by anyone who cared to look. It helped a lot of people get into programming. Now things have changed
    • It sounds like you were either targeting the DOM directly without any framework which I would not recommend to any but the most seasoned of web developers, or you were dealing with issues introduced by a poor framework.

      • Hi. I avoided a framework because the frameworks are huge and I would have to spend a week learning the framework. And in the end, the framework might get in the way. E.g. my app makes heavy use of SVG.
        • I'm actually with you there. Frameworks are 95% stuff I have no need for and 5% stuff made harder by the other 95%.

          But I've been doing web development for over two decades, so I sort of intuitively know how to structure UI code for maintainability. I definitely wouldn't blame JS as much as the DOM though.

          • Having used both typesafe (Pascal, C, C++, Ada, Scala, Module 2), and type unsafe languages (Javascript, Ruby, Go (yes, Go's "duck typing" is unsafe), and Python) for 50 years, my experience has been that type unsafe languages save ten seconds up front but cost 10 hours later... :-/
  • you know, with a UI consistent with the operating system youâ(TM)re already in, no constant twiddling on the backend without seeing an obvious update, things like that. Now, you kids get off my lawn.

  • Personally no that would be brain-dead. But.. is this maybe assuming tons of people will be writing crappy agent code and it should all run asynchronously on AWZ? If so that would not be too far off from say Salesforce's Flows which are built in a GUI and can be scheduled, or their async batch jobs which are both super anemic and are written in Apex (like Java). In that case, yeah I could envision a world where AWZ provides that. It gives me the heeby-jeebies to think of billions of instances of crummy and

  • What if..? And I'm just spitballing here... What if we had applications on the client that processed data stored on a server? A client/server application, if you will. A little similar to this, but using a language more native to the operating system that allowed for far greater flexibility and capability while also being several orders of magnitude faster and more memory efficient.

    Would that be something you'd consider using in your future workflow?

    Tangentially, I'm thinking about a new licensing model as

    • If you're processing lots of data located in AWS, running something inside their house is going to be much faster.

      Doing anything in AWS using Client/Server model is like pulling teeth. Wrong platform if that's what you want.

  • This model is begging for a Perl revival.

  • I'm curious. Why is GC versus manually managed memory an issue during startup? I wouldn't think allocating memory would be noticeably faster for either approach, the difference would be behavior when freeing. With GC, freeing is instantaneous until the GC runs. With managed memory, freeing takes some time. Depending on what's going on, it's not obvious to me which will launch a JS engine faster. Do lots of objects get freed when starting up a JS runtime?

    This is ignoring the obvious question: if milliseconds

    • I'm only speculating here, but I'm guessing GC has some initial bookkeeping setup that will be used later during allocation/freeing. Normally, this wouldn't matter cause your app is running for at least a few seconds. But in a lambda setup, your code might only be hot for 2ms, so any amount of initialization is going to eat performance.

  • Seeing a lot of Java developers here that bash on Node but apparently haven't actually worked with it. Node is super capable as a web server. It is inherently event driven with non-blocking I/O, and yes you can make Java do that but it is much more effort. JavaScript is relatively easy to learn and you can use the same language on both the client side and the server side - a huge win. If you are picky about strong typing you can just use TypeScript.

    And notice this article is about serverless computing, whic

  • If it were 100% up to me, I'd be using Rust for everything. I prefer SPARK or Ada, but that knowledge is limited, although it is nice to be able to prove all states an application can get in. Save Javascript for stuff that runs in the user's browser... the backend should be something that is compiled, just for performance reasons, as (IIRC), JavaScript is 10 to 100 times slower than C or C++.

    It will be nice when LLMs are able to figure out context and do inline assembly -- one step past a good optimizing

  • When a javascript program runs, who/what will figure out when to release the 2 GB of memory that huge array uses? The programmer didn't, because it's javascript and we don't explicitly return dynamically allocated memory in the javascript universe. If the garbage collector isn't around reclaim memory from out of scope objects, how does it get done? There's gotta be a thread somewhere doing something.

  • by PPH ( 736903 )

    I turn JavaScript off.

    Not running Web Assembly crap either. Bo run your avertisement apps on your own server. Not my PC.

  • It's just like much of the software you use, but it's all ours! : P
  • Something akin to Java Applets would solve many headaches of the industry. The applet engine had too many security holes, but I'm talking about the concept rather than Java's bad implementation.

    DOM and JS are just the wrong tool for the biz GUI job, and fixing them would break backward compatibility.

    Let's learn from our mistakes and try again. DOM/JS are bogged down.

FORTRAN is for pipe stress freaks and crystallography weenies.

Working...