Node.js or Erlang

后端 未结 9 1404
你的背包
你的背包 2021-01-29 19:15

I really like these tools when it comes to the concurrency level it can handle.

Erlang/OTP looks like much more stable solution but requires much more learning and a lot

相关标签:
9条回答
  • 2021-01-29 20:09

    It looks like Erlang performs better for deployment in a relatively low-end server (512MB 4-core 2.4GHz AMD VM). This is from SyncPad's experience of comparing Erlang vs Node.js implementations of their virtual whiteboard server application.

    0 讨论(0)
  • 2021-01-29 20:11

    I would give Erlang a try. Even though it will be a steeper learning curve, you will get more out of it since you will be learning a functional programming language. Also, since Erlang is specifically designed to create reliable, highly concurrent systems, you will learn plenty about creating highly scalable services at the same time.

    0 讨论(0)
  • While I'd personally go for Erlang, I'll admit that I'm a little biased against JavaScript. My advice is that you evaluate few points:

    1. Are you reusing existing code in either of those languages (both in terms of source code, and programmer experience!)
    2. Do you need/want on-the-fly updates without stopping the application (This is where Erlang wins by default - its runtime was designed for that case, and OTP contains all the tools necessary)
    3. How big is the expected traffic, in terms of separate, concurrent operations, not bandwidth?
    4. How "parallel" are the operations you do for each request?

    Erlang has really fine-tuned concurrency & network-transparent parallel distributed system. Depending on what exactly is the project, the availability of a mature implementation of such system might outweigh any issues regarding learning a new language. There are also two other languages that work on Erlang VM which you can use, the Ruby/Python-like Reia and Lisp-Flavored Erlang.

    Yet another option is to use both, especially with Erlang being used as kind of "hub". I'm unsure if Node.js has Foreign Function Interface system, but if it has, Erlang has C library for external processes to interface with the system just like any other Erlang process.

    0 讨论(0)
提交回复
热议问题