W
W
WebDev2015-01-06 20:08:13
JavaScript
WebDev, 2015-01-06 20:08:13

What are the disadvantages of node.js?

Everyone says that fast, good, asynchronous, but what are its disadvantages? Why are there very few really serious projects on it?

Answer the question

In order to leave comments, you need to log in

7 answer(s)
S
Sergey, 2015-01-06
@kirill-93

In the same, what are its pluses.
Asynchrony ... it's not there. There is an event loop that allows you to write extremely efficient programs in terms of working with I / O (which is very good for the web) and not worry about things like thread safety, locks, etc. And if you also run several application instances - let's say one per core, then the utilization of computing power will be quite good. But we can no longer parallelize something within a single worker process. We can’t calculate something, analyze it, process a fat picture right when processing a request, because our worker process is also processing a couple of dozen more requests, and while we satisfy the needs of one, everyone will be idle. The node is good when everything consists of elementary operations that do not take much time, all the fat must be taken out of the main process and sorted out in queues, etc. This problem has a lot of solutions in fact, but everything is already becoming more complicated and the node is losing its beauty. It's better to use Java/c#/Python for this (and don't mention jokes about multithreading in CPython here).
callback-hell. Actually, the presence of an event loop also dictates the rules on how the program should be written. Heaps of callbacks, the inability to debug normally and get a clear stack trace from the error. Yes, there are promises that solve the first problem, yes, there are some like zone.js that solve the second and partially the first problem ... but all this is not a trivial matter.
Actually... the development of large and complex projects on a node is possible... but it requires the developer to have good knowledge and understanding of how his platform works. And this increases the cost of development, while you can take more efficient tools in this regard.

T
Taras Labiak, 2015-01-06
@kissarat

JavaScript is underdeveloped. With the advent of ECMAScript 6, everything can change

G
globuser, 2015-01-06
@globuzer

Node.js is fast, but there are things you need to know to use it correctly.
In fact, a node is a powerful thing, specially tailored for a certain range of tasks, high-load systems, and the like. Any incorrect or even incompletely correct use of it turns into a big minus on large projects, which was actually asked in the question above. To avoid all such minuses, you need to practice and learn from your own and other people's mistakes, and only with time and experience you can really understand how good this tool is.
Ownership of a node in pluses or minuses in most cases depends on the completeness of his knowledge, theory, practice, possession and ability to apply this technology in general to many projects.

V
Veniamin Lytkin, 2015-01-06
@Epsil0neR

Node.js is a JavaScript library, and JavaScript is an interpreted language, not a compiled one. Also, JavaScript is not typed, which makes it difficult to write large projects. As far as I know, JavaScript is Single thread (single-threaded) - that is, it uses only 1 processor core.

L
lega, 2015-01-07
@lega

As they said above - it is not desirable to develop a large project on node.js because of the complexity (compare 2 pseudo-examples ), - you will have more problems, spend many times more time.
In most cases, asynchrony is needed for 0-5% of the project, so it is not necessary because of these 5%, the remaining 95% should be made asynchronous.
Asynchrony is not needed everywhere.

A
Alexander Aksentiev, 2015-01-06
@Sanasol

Because it is young and relatively slowly developing (namely the core
)

A
Alexander Sadovnikov, 2015-01-06
@sad0vnikov

in Node.js, it seems to me that it is difficult to write large projects. There is no established practice yet (although it may seem so to me), to design an application in such a way that it is difficult to maintain it. Asynchrony can also go sideways (again, in architectural terms). And does a typical web project (conditional WordPress blog) need it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question