Where node compared to traditional server technology stack difference?


Copyright reserved by the authors. Commercial reprint please contact the author authorized, non-commercial reprint please indicate the source.

the reason

people:

Node with a lot of people, quite a lot, but the number of package npm ranks first among the audience, but the main users of the front-end node, such as express to the library, I think half of the downloads is used in the front-end server-side framework rendering and webpack the HMR, and not used in the development of a true server-side play the leading role in.

Another point, except for a few node cattle, most of the user node server knowledge is too scarce, what hierarchical, multi-threading, concurrency, IPC basically no knowledge of the operating system may just stay on several bash command, saying that white node but although many users are not true server-side developers (mostly easily write a front-end node), in fact, working alone node in the number of service personnel living in the end very little, leading to its practice in the industry is not as to his community as hot.

performance:

To see the performance of two aspects, one is io performance, on the one hand is to calculate the performance node is the guy to settle down i / o burst table, event-driven features make node of the i / o is very remarkable, otherwise it can not be the original invention come out.

cpu computing performance is indeed a node of weakness, with the java / c # naturally can not be compared, but web developers in most cases worse is i / o, and node performance than java / c # difference does not mean worse than other languages ​​than ruby / python still many times faster, and can call the c / c ++ modules to handle cpu-intensive tasks (python and other languages ​​generally poor performance practice), the following is a personality can refer to the website.

In summary node i / o has its superior aspect, cpu intensive task, but is fatal weakness node.


Types of:

Can I understand the reason is because the static type strongly typed language can better avoid errors, improve project quality, I think the reason should be relatively small.

On the one hand typescript + node is standard on many companies, though typescript just statically typed, but to write almost as c # with the brothers, not the local node disadvantage in this regard.

On the other hand, it does not mean that dynamic can veto a weakly typed language, I'm not the world's best big PHP language?


accumulation:

This problem can be with the people in conjunction with this reason, the node community has always been popular, but in practice, the industry's popular with their communities compared to a lot of difference, of course, a lot of domestic and foreign manufacturers already have some practice, such as domestic cattle node Ali, but let alone play the leading role of the node or lack of practice, in many cases as the rendering layer appeared, such as Taobao real back-end java or play the leading role, do the rendering node.

We can analogy golang same period appears, golang hot, with the success of many industry practices gradually hot up, which makes the user golang in recent years, year after year by the developers welcome, Stack Overflow survey done in most preferred language is go, most users did not want to try the language is go, go practice enough accumulated in the cloud plus docker this killer app blessings belong step by step out of the fire.

Different node, belongs to a popular out on half of the sky, front-end developer who detonated the whole community, but for so many years in the industry killer is not proportional to the level of application and practice with their popular level, but lead to a lot of dull momentum now.


To be a summary of it:

With the development node has had a lot to take off his black spots, such as single-threaded: Actually cluster out for a long time multi-threaded practice is no problem, such as callback hell: this es6 + With the popularity there are numerous solutions, such as dynamic type, typescript very mature.

Instead node has many advantages, such as i / o intensive, event-driven, community activists, front and rear end unified language and so on.

The real problem is not the language or the type of problem node, but the real node practitioners too (although multi-user), the lack of a large number of mature industry practice.


ps: node-related books too scarce, and now is best seen Park Spirit <nine shallow a depth node.js> or 4 years of work, the principles associated node, the other node related books are not talking too shallow is mediocre, to teach you to get hold of a lot of chat room to teach you to get hold of blog, the other hand people java <java concurrent programming> <depth java virtual machine> <java programming ideas>, look at the book you are talking about other people's What?


Guess you like

Origin blog.51cto.com/14516511/2433412