Hacker News new | ask | show | jobs
by jpdlla 3533 days ago
This. I've recently been working with a large project using Node. I find myself constantly thinking about how I'd build it if I were using DRF.
1 comments

> This. I've recently been working with a large project using Node. I find myself constantly thinking about how I'd build it if I were using DRF.

You wouldn't need to think about promises or callbacks at first place, which would make things way easier. That's the main reason I gave up NodeJS for Go when working with APIs. Async programming is noise. CSP is a better paradigm.

Scala, Akka, and Play say hi!
Don't you still need Futures for async stuff in order to not block the thread, or is each request handled by a lightweight 'fiber' (erlang process/goroutine)?
That's correct, blocking operations within an actor need to be wrapped in a Future[1]. But Akka itself can be extremely performant if the bulk of your processing is non-blocking. Any non-blocking or long-running operations should be executed in a separate thread pool (if there are many), or just a separate thread.

[1]: http://doc.akka.io/docs/akka/2.4/general/actor-systems.html#...