{"id":219924,"date":"2021-07-15T08:17:16","date_gmt":"2021-07-15T00:17:16","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=219924"},"modified":"2021-06-29T15:17:43","modified_gmt":"2021-06-29T07:17:43","slug":"node-js-relative-merits","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/node-js-relative-merits.html","title":{"rendered":"Node.js \u4f18\u7f3a\u70b9\u4ee5\u53ca\u5e94\u7528\u573a\u666f"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u6d4f\u89c8\u5668\u5916\u8fd0\u884c V8 JavaScript \u5f15\u64ce(Google Chrome \u7684\u5185\u6838)\uff0c\u5229\u7528\u4e8b\u4ef6\u9a71\u52a8\u3001\u975e\u963b\u585e\u548c\u5f02\u6b65\u8f93\u5165\u8f93\u51fa\u6a21\u578b\u7b49\u6280\u672f\u63d0\u9ad8\u6027\u80fd\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\"\"<\/p>\n

\u4e00\u3001\u662f\u4ec0\u4e48<\/strong><\/div>\n

Node.js \u662f\u4e00\u4e2a\u5f00\u6e90\u4e0e\u8de8\u5e73\u53f0\u7684 JavaScript \u8fd0\u884c\u65f6\u73af\u5883
\n\u5728\u6d4f\u89c8\u5668\u5916\u8fd0\u884c V8 JavaScript \u5f15\u64ce(Google Chrome \u7684\u5185\u6838)\uff0c\u5229\u7528\u4e8b\u4ef6\u9a71\u52a8\u3001\u975e\u963b\u585e\u548c\u5f02\u6b65\u8f93\u5165\u8f93\u51fa\u6a21\u578b\u7b49\u6280\u672f\u63d0\u9ad8\u6027\u80fd
\n\u53ef\u4ee5\u7406\u89e3\u4e3a Node.js \u5c31\u662f\u4e00\u4e2a\u670d\u52a1\u5668\u7aef\u7684\u3001\u975e\u963b\u585e\u5f0fI\/O\u7684\u3001\u4e8b\u4ef6\u9a71\u52a8\u7684JavaScript\u8fd0\u884c\u73af\u5883
\n\u975e\u963b\u585e\u5f02\u6b65<\/p>\n

Nodejs\u91c7\u7528\u4e86\u975e\u963b\u585e\u578bI\/O\u673a\u5236\uff0c\u5728\u505aI\/O\u64cd\u4f5c\u7684\u65f6\u5019\u4e0d\u4f1a\u9020\u6210\u4efb\u4f55\u7684\u963b\u585e\uff0c\u5f53\u5b8c\u6210\u4e4b\u540e\uff0c\u4ee5\u65f6\u95f4\u7684\u5f62\u5f0f\u901a\u77e5\u6267\u884c\u64cd\u4f5c
\n\u4f8b\u5982\u5728\u6267\u884c\u4e86\u8bbf\u95ee\u6570\u636e\u5e93\u7684\u4ee3\u7801\u4e4b\u540e\uff0c\u5c06\u7acb\u5373\u8f6c\u800c\u6267\u884c\u5176\u540e\u9762\u7684\u4ee3\u7801\uff0c\u628a\u6570\u636e\u5e93\u8fd4\u56de\u7ed3\u679c\u7684\u5904\u7406\u4ee3\u7801\u653e\u5728\u56de\u8c03\u51fd\u6570\u4e2d\uff0c\u4ece\u800c\u63d0\u9ad8\u4e86\u7a0b\u5e8f\u7684\u6267\u884c\u6548\u7387
\n\u4e8b\u4ef6\u9a71\u52a8
\n\u4e8b\u4ef6\u9a71\u52a8\u5c31\u662f\u5f53\u8fdb\u6765\u4e00\u4e2a\u65b0\u7684\u8bf7\u6c42\u7684\u65f6\uff0c\u8bf7\u6c42\u5c06\u4f1a\u88ab\u538b\u5165\u4e00\u4e2a\u4e8b\u4ef6\u961f\u5217\u4e2d\uff0c\u7136\u540e\u901a\u8fc7\u4e00\u4e2a\u5faa\u73af\u6765\u68c0\u6d4b\u961f\u5217\u4e2d\u7684\u4e8b\u4ef6\u72b6\u6001\u53d8\u5316\uff0c\u5982\u679c\u68c0\u6d4b\u5230\u6709\u72b6\u6001\u53d8\u5316\u7684\u4e8b\u4ef6\uff0c\u90a3\u4e48\u5c31\u6267\u884c\u8be5\u4e8b\u4ef6\u5bf9\u5e94\u7684\u5904\u7406\u4ee3\u7801\uff0c\u4e00\u822c\u90fd\u662f\u56de\u8c03\u51fd\u6570
\n\u6bd4\u5982\u8bfb\u53d6\u4e00\u4e2a\u6587\u4ef6\uff0c\u6587\u4ef6\u8bfb\u53d6\u5b8c\u6bd5\u540e\uff0c\u5c31\u4f1a\u89e6\u53d1\u5bf9\u5e94\u7684\u72b6\u6001\uff0c\u7136\u540e\u901a\u8fc7\u5bf9\u5e94\u7684\u56de\u8c03\u51fd\u6570\u6765\u8fdb\u884c\u5904\u7406<\/p>\n

\u4e8c\u3001\u4f18\u7f3a\u70b9<\/strong><\/div>\n
\u4f18\u70b9\uff1a<\/strong><\/span><\/div>\n

\u5904\u7406\u9ad8\u5e76\u53d1\u573a\u666f\u6027\u80fd\u66f4\u4f73
\n\u9002\u5408I\/O\u5bc6\u96c6\u578b\u5e94\u7528\uff0c\u6307\u7684\u662f\u5e94\u7528\u5728\u8fd0\u884c\u6781\u9650\u65f6\uff0cCPU\u5360\u7528\u7387\u4ecd\u7136\u6bd4\u8f83\u4f4e\uff0c\u5927\u90e8\u5206\u65f6\u95f4\u662f\u5728\u505a I\/O\u786c\u76d8\u5185\u5b58\u8bfb\u5199\u64cd\u4f5c<\/p>\n

\u56e0\u4e3aNodejs\u662f\u5355\u7ebf\u7a0b\uff0c\u5e26\u6765\u7684\u7f3a\u70b9\u6709\uff1a<\/strong><\/span><\/div>\n

\u4e0d\u9002\u5408CPU\u5bc6\u96c6\u578b\u5e94\u7528
\n\u53ea\u652f\u6301\u5355\u6838CPU\uff0c\u4e0d\u80fd\u5145\u5206\u5229\u7528CPU
\n\u53ef\u9760\u6027\u4f4e\uff0c\u4e00\u65e6\u4ee3\u7801\u67d0\u4e2a\u73af\u8282\u5d29\u6e83\uff0c\u6574\u4e2a\u7cfb\u7edf\u90fd\u5d29\u6e83<\/p>\n

\u4e09\u3001\u5e94\u7528\u573a\u666f<\/strong><\/div>\n

\u501f\u52a9Nodejs\u7684\u7279\u70b9\u548c\u5f0a\u7aef\uff0c\u5176\u5e94\u7528\u573a\u666f\u5206\u7c7b\u5982\u4e0b\uff1a
\n\u5584\u4e8eI\/O\uff0c\u4e0d\u5584\u4e8e\u8ba1\u7b97\u3002\u56e0\u4e3aNodejs\u662f\u4e00\u4e2a\u5355\u7ebf\u7a0b\uff0c\u5982\u679c\u8ba1\u7b97(\u540c\u6b65)\u592a\u591a\uff0c\u5219\u4f1a\u963b\u585e\u8fd9\u4e2a\u7ebf\u7a0b
\n\u5927\u91cf\u5e76\u53d1\u7684I\/O\uff0c\u5e94\u7528\u7a0b\u5e8f\u5185\u90e8\u5e76\u4e0d\u9700\u8981\u8fdb\u884c\u975e\u5e38\u590d\u6742\u7684\u5904\u7406
\n\u4e0e websocket \u914d\u5408\uff0c\u5f00\u53d1\u957f\u8fde\u63a5\u7684\u5b9e\u65f6\u4ea4\u4e92\u5e94\u7528\u7a0b\u5e8f
\n\u5177\u4f53\u573a\u666f\u53ef\u4ee5\u8868\u73b0\u4e3a\u5982\u4e0b\uff1a<\/p>\n

    \n\u7b2c\u4e00\u5927\u7c7b\uff1a\u7528\u6237\u8868\u5355\u6536\u96c6\u7cfb\u7edf\u3001\u540e\u53f0\u7ba1\u7406\u7cfb\u7edf\u3001\u5b9e\u65f6\u4ea4\u4e92\u7cfb\u7edf\u3001\u8003\u8bd5\u7cfb\u7edf\u3001\u8054\u7f51\u8f6f\u4ef6\u3001\u9ad8\u5e76\u53d1\u91cf\u7684web\u5e94\u7528\u7a0b\u5e8f
    \n\u7b2c\u4e8c\u5927\u7c7b\uff1a\u57fa\u4e8eweb\u3001canvas\u7b49\u591a\u4eba\u8054\u7f51\u6e38\u620f
    \n\u7b2c\u4e09\u5927\u7c7b\uff1a\u57fa\u4e8eweb\u7684\u591a\u4eba\u5b9e\u65f6\u804a\u5929\u5ba2\u6237\u7aef\u3001\u804a\u5929\u5ba4\u3001\u56fe\u6587\u76f4\u64ad
    \n\u7b2c\u56db\u5927\u7c7b\uff1a\u5355\u9875\u9762\u6d4f\u89c8\u5668\u5e94\u7528\u7a0b\u5e8f
    \n\u7b2c\u4e94\u5927\u7c7b\uff1a\u64cd\u4f5c\u6570\u636e\u5e93\u3001\u4e3a\u524d\u7aef\u548c\u79fb\u52a8\u7aef\u63d0\u4f9b\u57fa\u4e8ejson\u7684API<\/ul>\n

    \u5176\u5b9e\uff0cNodejs\u80fd\u5b9e\u73b0\u51e0\u4e4e\u4e00\u5207\u7684\u5e94\u7528\uff0c\u53ea\u8003\u8651\u9002\u4e0d\u9002\u5408\u4f7f\u7528\u5b83<\/p>\n","protected":false},"excerpt":{"rendered":"

    Node.js \u662f\u4e00\u4e2a\u5f00\u6e90\u4e0e\u8de8\u5e73\u53f0\u7684 JavaScript \u8fd0\u884c\u65f6\u73af\u5883 \u5728\u6d4f\u89c8\u5668\u5916\u8fd0\u884c V8 JavaScri […]<\/p>\n","protected":false},"author":1898,"featured_media":219928,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[564],"class_list":["post-219924","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread","tag-node-js"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/219924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1898"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=219924"}],"version-history":[{"count":10,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/219924\/revisions"}],"predecessor-version":[{"id":221700,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/219924\/revisions\/221700"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/219928"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=219924"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=219924"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=219924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}