← Back to context

Comment by dartos

3 days ago

For one, NodeJS doesn’t have concurrency. It’s a single threaded event loop.

It has concurrency with Promise; it doesn't have parallelism.

  • And these agents are all network I/O bound by the model services so a lot of use cases don't need threading.

    I would argue that python is the overrated language when it comes to building agents. Just because it's the language of choice for training models doesn't mean it should be for building apps against them.

    The dx typescript brings to these types of applications is nice.

    •     > The dx typescript brings to these types of applications is nice.
      

      Ironically, it only gets halfways there.

      What I've found is that teams that want TS probably should just move up to C#; they are close enough [0]. The main thing is that once you start to get serious with your backend API, then data integrity matters. TS types disappear at runtime and it's just JS. So you need a Zod or Valibot to validate the incoming data. Then your API starts getting bigger and you want to generate OpenAPI for your frontend. Now your fast and easy Node/Express app is looking a lot like Spring or .NET...without the headway and perf...the irony.

      [0] https://github.com/CharlieDigital/js-ts-csharp

  • No real concurrency. No scheduling. If you are not working with a lot of IO then js would be a poor choice. But in this case we talk about network calls, so definitely IO. The settimout, promise, request methods will do their job.