当前位置:主页 > 管理论文 > 移动网络论文 >

基于Node.js的基础框架设计与实现

发布时间:2018-03-21 15:15

  本文选题:Node.js 切入点:高并发 出处:《北京邮电大学》2017年硕士论文 论文类型:学位论文


【摘要】:随着互联网的快速发展,Web应用变得与人们的衣食住行息息相关,逐渐面临着越来越大的高并发访问压力。传统的Java语言、PHP语言编写的Web应用因为其多线程的特征并不能很好的满足高并发、高性能的需求,因此2009年出现的Node.js获得了人们的关注。Node.js的事件驱动、异步I/O等特性使其天生具备处理高并发请求的能力,能够极大提升Web服务器的并发性能。但是与Node.js的火热程度相比,基于Node.js的Web开发框架并不成熟,因此研究基于Node.js的高性能基础框架具有重要意义。本文分析了 Web开发技术的发展历史,指出了当前Web应用所面临的挑战,并结合当前针对高并发、高性能的解决方案对一些大型网站技术架构做了总结。为了与实践相结合,本文设计并实现了一个基于Node.js基础框架的量化交易系统。首先对量化交易系统做了详细的需求分析,然后在此基础上对系统做了详细设计和实现,详细阐述了 Node.js基础框架的组成结构、系统的数据库和重点功能模块,最后对系统进行了部署。Node.js基础框架不仅具备处理高并发的能力,同时还可以满足Web应用对于快速开发和性能的要求。该基础框架主要从以下几点加强了 Node.js服务器的性能。第一,使用负载均衡技术弥补Node.js默认的单进程单线程运行模式所带来的不足,使其能够充分利用多核处理器。第二,集成了局域NPM仓库、缓存、RabbitMQ消息队列等技术,把Web应用纵向拆分为多个基于REST风格的微服务,极大地提升了 Web应用的性能和并发能力。第三,采用基于Token的鉴权机制替代session-cookie机制,实现了请求的无状态性,使基础框架更适应微服务的部署方式。为了验证基础框架的性能和处理高并发的能力,本文在真实环境中对基于基础框架实现的量化交易系统进行了压力测试,并与传统技术实现的Web服务做了对比,证明了本文的基础框架具有更好的处理高并发的能力,同时对可能成为系统性能瓶颈的RabbitMQ消息队列做了性能测试。最后,对基础框架开发过程中出现的问题和不足进行了总结,并给出了对于下一步工作的规划和展望。
[Abstract]:With the rapid development of the Internet, Web applications have become closely related to people's clothing, food, housing and transportation. The traditional Java language is written in Web because its multithreading features can not meet the needs of high concurrency and high performance. So in 2009, Node.js got the attention of event-driven .Node.js, features such as asynchronous I / O that gave it the natural ability to handle high concurrent requests and greatly improved the concurrent performance of Web servers. But compared with the popularity of Node.js, The Web development framework based on Node.js is not mature, so it is of great significance to study the high performance basic framework based on Node.js. This paper analyzes the development history of Web development technology, and points out the challenges that Web applications are facing. Combined with the current solutions for high concurrency and high performance, the technical architecture of some large websites is summarized. This paper designs and implements a quantitative trading system based on Node.js framework. The structure of Node.js basic framework, the database of the system and the key function modules are described in detail. Finally, the system is deployed. Node.js basic framework not only has the ability to deal with high concurrency. At the same time, it can meet the requirements of Web application for rapid development and performance. This basic framework mainly enhances the performance of Node.js server from the following points. First, Load balancing technique is used to make up for the shortage of Node.js 's default single-process single-thread running mode, which makes it make full use of multi-core processors. Secondly, it integrates local NPM warehouse, cache RabbitMQ message queue and so on. The vertical split of Web application into several microservices based on REST style greatly improves the performance and concurrency ability of Web application. Thirdly, the authentication mechanism based on Token is used instead of session-cookie mechanism to realize the statelessness of request. In order to verify the performance of the infrastructure and its ability to deal with high concurrency, the quantitative trading system based on the basic framework is tested in real environment. Compared with the Web services implemented by traditional technology, it is proved that the basic framework of this paper has better ability to deal with high concurrency, and at the same time, the performance test of RabbitMQ message queue which may become the bottleneck of system performance is made. The problems and shortcomings in the development of the basic framework are summarized, and the planning and prospect of the next work are given.
【学位授予单位】:北京邮电大学
【学位级别】:硕士
【学位授予年份】:2017
【分类号】:TP393.09

【参考文献】

相关期刊论文 前4条

1 许会元;何利力;;NodeJS的异步非阻塞I/O研究[J];工业控制计算机;2015年03期

2 高原;;服务器端javascript技术研究[J];信息与电脑(理论版);2012年01期

3 贺琛,陈肇雄,黄河燕;Web缓存技术综述[J];小型微型计算机系统;2004年05期

4 王婉菲,王欣,张志浩;数据库集群系统的研究与实施[J];微型电脑应用;2003年10期

相关硕士学位论文 前2条

1 陈瑶;基于Node.js高并发web系统的研究与应用[D];电子科技大学;2014年

2 于洋;基于Ajax/REST风格的Web Service的设计与实现[D];北京交通大学;2010年



本文编号:1644415

资料下载
论文发表

本文链接:https://www.wllwen.com/guanlilunwen/ydhl/1644415.html


Copyright(c)文论论文网All Rights Reserved | 网站地图 |

版权申明:资料由用户fa00c***提供,本站仅收录摘要或目录,作者需要删除请E-mail邮箱bigeng88@qq.com