{"id":28756791,"url":"https://github.com/wx-chevalier/node.js-notes","last_synced_at":"2025-06-17T03:08:48.771Z","repository":{"id":48564009,"uuid":"222409906","full_name":"wx-chevalier/Node.js-Notes","owner":"wx-chevalier","description":":books: 深入浅出 Node.js 全栈架构，语法基础，框架使用，工程实践，全栈开发，实时通信，数据库","archived":false,"fork":false,"pushed_at":"2025-03-13T08:00:48.000Z","size":2891,"stargazers_count":49,"open_issues_count":47,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-13T09:19:11.501Z","etag":null,"topics":["nodejs"],"latest_commit_sha":null,"homepage":"https://ng-tech.icu/books/Node.js-Series","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wx-chevalier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-18T09:24:26.000Z","updated_at":"2025-03-13T08:00:50.000Z","dependencies_parsed_at":"2023-01-21T08:01:59.819Z","dependency_job_id":"f47f670d-d0bf-4e30-96f8-86583c307ac3","html_url":"https://github.com/wx-chevalier/Node.js-Notes","commit_stats":null,"previous_names":["wx-chevalier/node.js-notes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wx-chevalier/Node.js-Notes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wx-chevalier%2FNode.js-Notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wx-chevalier%2FNode.js-Notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wx-chevalier%2FNode.js-Notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wx-chevalier%2FNode.js-Notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wx-chevalier","download_url":"https://codeload.github.com/wx-chevalier/Node.js-Notes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wx-chevalier%2FNode.js-Notes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260281524,"owners_count":22985630,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs"],"created_at":"2025-06-17T03:08:48.292Z","updated_at":"2025-06-17T03:08:48.750Z","avatar_url":"https://github.com/wx-chevalier.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n\n\u003c!-- PROJECT LOGO --\u003e\n\u003cbr /\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/wx-chevalier/Node-Notes\"\u003e\n    \u003cimg src=\"https://s2.ax1x.com/2020/01/15/lLHrpq.png\" alt=\"Logo\" width=\"150\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n  \u003ch3 align=\"center\"\u003e深入浅出 Node.js 全栈架构\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://ng-tech.icu/books/Node-Notes\"\u003e\u003cstrong\u003e在线阅读 \u003e\u003e \u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/wx-chevalier/Node-Notes\"\u003e速览手册\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/wx-chevalier/Node-Notes/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/wx-chevalier/Node-Notes/issues\"\u003e参考资料\u003c/a\u003e\n\n  \u003c/p\u003e\n\u003c/p\u003e\n\n# Introduction\n\nNode.js 为前端开发者开拓了更广阔的应用空间，前端和后端开发的一种语言和技术，以及出色的性能; 但是没有并发和繁重的 CPU 处理问题，以及高级数据库抽象。\n\n## NodeJS 的潜在缺陷探讨\n\n- 在虚拟机层面 node.js 基于的 v8 VM 看起来很不错，但和 Java 的 VM 一比，差距甚远。在服务器领域，特别是拥有众多 CPU 和大量内存的环境下，Java 的 VM 几乎是你能在地球上找到的最好的 VM。而 v8 既不能充分利用多 CPU 的性能，也不能将内存充分利用。你唯一能做的事情就是开很多个 node.js 实例来缓解，但这进一步带来了更多的问题。\n\n- 在语言层面 JavaScript 本身的设计让你感觉很灵活，因为它基本上是不对类型进行约束的，只有当运行过程中发生了错误才会提示你，毕竟在浏览器环境内，这算不上什么问题；但在一个团队内进行协作时，你会深刻的明白类型系统如果能在运行前就帮你找出那些低级的类型错误问题，将会节省你多少的时间和金钱。特别是别忘了，系统总是在演进的，一个稍微复杂些的业务系统就拥有几十个乃至上百个类型，而类型修改又往往很频繁，想想这个过程里会发生些什么你就明白了。\n\n- 在领域应用层面 node.js 在 Web 开发领域特别是其中的前端部分已经达到了惊人的繁荣程度，甚至有不少重要系统的后端部分也基于 node.js 完成。但如果仅凭这些就轻易的认为 node.js 将会一统全栈打败包括 Java 在内的其它语言是很幼稚的。首先，在一个大型的系统架构中，整个系统是拆分成很多很小的业务系统的，这些系统往往通过消息队列(如 RabbitMQ、Kafka 等等)相互连接起来。也许在小型 Web 站点中，你从来没用过这些。但相信我，在但凡稍微大一些的业务系统中，都是这么干的。这些消息队列服务存在的理由就是将各个子系统解耦。这样一来，你可以在前端部分应用 node.js 进行快速开发，在业务处理部分使用 Java 来完成。数据分析系统却可以使用 Python/Scala (例如基于 Spark)实现。大型业务系统的架构者们都是些经验丰富的老手，他们知道每个语言/系统的利弊，也知道世界总在变，今天是 node.js、明天也许就是另一个新秀，因此在整个业务系统中，你要做的根本不是“统一”，反而是“分离”。这样的设计才能够预留出扩展和变更的机会。\n\n# Nav | 关联导航\n\n本书的精排目录导航版请参考 [https://ng-tech.icu/books/Node-Notes](https://ng-tech.icu/books/Node-Notes)，更多 Web 开发相关请参阅[《现代 Web 全栈开发与工程架构](https://ngte-web.gitbook.io/i/)》。\n\n# About | 关于\n\n\u003c!-- CONTRIBUTING --\u003e\n\n## Contributing\n\nContributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\n1. Fork the Project\n2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the Branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## Copyright \u0026 More | 延伸阅读\n\n笔者所有文章遵循[知识共享 署名 - 非商业性使用 - 禁止演绎 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc-nd/4.0/deed.zh)，欢迎转载，尊重版权。您还可以前往 [NGTE Books](https://ng-tech.icu/books-gallery/) 主页浏览包含知识体系、编程语言、软件工程、模式与架构、Web 与大前端、服务端开发实践与工程架构、分布式基础架构、人工智能与深度学习、产品运营与创业等多类目的书籍列表：\n\n[![NGTE Books](https://s2.ax1x.com/2020/01/18/19uXtI.png)](https://ng-tech.icu/books-gallery/)\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n\n[contributors-shield]: https://img.shields.io/github/contributors/wx-chevalier/Node-Notes.svg?style=flat-square\n[contributors-url]: https://github.com/wx-chevalier/Node-Notes/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/wx-chevalier/Node-Notes.svg?style=flat-square\n[forks-url]: https://github.com/wx-chevalier/Node-Notes/network/members\n[stars-shield]: https://img.shields.io/github/stars/wx-chevalier/Node-Notes.svg?style=flat-square\n[stars-url]: https://github.com/wx-chevalier/Node-Notes/stargazers\n[issues-shield]: https://img.shields.io/github/issues/wx-chevalier/Node-Notes.svg?style=flat-square\n[issues-url]: https://github.com/wx-chevalier/Node-Notes/issues\n[license-shield]: https://img.shields.io/github/license/wx-chevalier/Node-Notes.svg?style=flat-square\n[license-url]: https://github.com/wx-chevalier/Node-Notes/blob/master/LICENSE.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwx-chevalier%2Fnode.js-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwx-chevalier%2Fnode.js-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwx-chevalier%2Fnode.js-notes/lists"}