海量消息推送系统的升级改进设计与实现

 2021-12-27 08:12

论文总字数:32413字

摘 要

在移动互联网时代,随着智能手机和iPad等移动终端设备的普及,人们逐渐习惯采用移动客户端进行上网,这种上网方式也已成为人们获取信息的主要渠道。在此背景之下,移动应用程序的开发成为了开发者的首选,而在移动应用程序中,如何进行消息推送成为了当前面临的主要问题。

上海群硕软件开发公司开发的海量消息推送系统可以帮助其他应用完成消息推送服务,但该系统具有一定的局限性。本文将对海量消息推送系统1.0版本的整体结构和系统组成进行深入分析,针对该系统存在的局限性,制定出该系统升级改进的方向,对系统进行升级改进。

升级改进的主要内容是在海量消息推送系统1.0版本的基础上增加性能监测和实时引擎两个模块。对于性能监测模块,分析影响系统性能的指标,通过对比不同方法的优缺点,选择最佳的方法进行系统监测,主要监测项包括响应时间、CPU和内存的使用情况及实时引擎部分实时数据的监测。对于实时引擎模块,添加基于WebSocket协议的实时引擎功能,使之可以实现服务器与客户端之间的双向通信。实时引擎分两部分,Pub/Sub模型实现一个简单的基于发布/订阅的通道,帮助集成海量消息推送系统的其他应用过滤和控制发送给其用户的消息。聊天模型主要实现了单聊、群聊、好友关系、离线消息等功能。最后,将以上两个升级改进后的模块集成到海量消息推送系统中,完成对现有系统的版本升级。

关键词:消息推送系统,性能监测,实时引擎,Pub/Sub,WebSocket

UPGRADE OF MASSIVE MESSAGE PUSH SYSTEM

Abstract

In the mobile Internet era, with the popularity of mobile devices like smartphones and the iPad, people are getting used to using a mobile client to access to the Internet, and the Internet has also become the main channel for people to obtain information. Under this background, the development of mobile application becomes the first choice for the developer, and in the mobile application, how to push the message is the main problem.

Massive message push system in Shanghai Augmentum software company can help other applications to complete the message push service, but the system has some limitations. This thesis makes a deep analysis and research on the overall structure and system composition of the massive message push system version 1.0. For the limitations of the system, we need to develop the direction of the upgrade for the system, and then upgrade the system.

The main contents of upgrade is adding performance monitoring and real-time engine modules. For performance monitoring module, analyze the impact of system performance indicators. Through comparison of the advantages and disadvantages of different methods to choose the best approach to system monitoring. Performance monitoring module is divided into three parts. There is response time monitoring, CPU and memory usage monitoring and real-time data monitoring. For real-time engine module, add WebSocket protocol based on real-time engine capabilities, making it possible to achieve two-way communication between the server and the client. The real-time engine is divided into two parts, the Pub/Sub model implemented a simple publish / subscribe channel. To help the applications which integrate massive message push system of filtering and controlling the message sent to their users. The chat model’s main functions are single chat, group chat, friend relationship, offline message and so on. Finally, Integrated the above two upgraded modules into the massive message push system to complete the upgrade of the existing system.

KEY WORDS: message push system, performance monitoring, real-time engine, WebSocket, Pub/Sub

目录

摘 要 I

Abstract II

第一章 绪 论 1

1.1 研究背景 1

1.2 课题研究目的及意义 1

1.3 论文开展的主要工作 2

1.4 论文组织结构 2

第二章 海量消息推送系统1.0版本分析与研究 3

2.1 相关技术 3

2.1.1 Linux操作系统 3

2.1.2 Node.js开发工具 3

2.1.3 CoffeeScript开发语言 5

2.1.4 MongoDB数据库 5

2.2 海量消息推送系统1.0版本整体框架及运行原理 6

2.2.1 系统整体架构 6

2.2.2 系统运行原理 8

第三章 性能监测模块的设计与实现 9

3.1 影响系统性能的因素 9

3.2 多种性能监测方法的对比 10

3.3 性能监测模块的设计与实现 10

第四章 实时引擎模块的设计与实现 14

4.1 海量消息推送系统1.0版本的通信机制 14

4.1.1 轮询 14

4.1.2 长轮询 15

4.1.3 流 15

4.2 基于WebSocket的实时引擎基本功能的设计与实现 16

4.2.1 WebSocket协议 17

4.2.2 Pub/Sub场景 18

4.2.3 聊天场景 20

4.2.4 认证用户 28

第五章 测试 30

5.1 硬件配置 30

5.2 推送测试 30

5.3 实时引擎测试 32

第六章 总结与展望 36

6.1 论文工作总结 36

6.2 下一步研究工作 36

致谢 37

参考文献(References) 38

  1. 绪 论

1.1 研究背景

随着智能手机和iPad等移动终端设备的普及,移动互联网已成为人们获取消息的主要渠道,逐渐改变着人们的日常生活。在此背景之下,移动应用程序的开发成为了开发者的首选,而在移动应用程序中,如何进行消息推送成为了当前面临的主要问题。一般消息的推送都是由移动应用的服务器完成的,所以也可以称之为服务器推送。服务器推送成为一种重要的应用需求。服务器推送技术就是在客户端没有主动请求的情况下,服务器主动地推送数据到移动客户端,以让用户更多的关注服务器提供的服务。例如,移动客户端下载一款旅游软件之后,通常仅当用户手动点击进入该应用后,才可以浏览相关旅游信息,但为了提高用户的关注度,当应用处于后台启动模式时,服务器会主动地将一些近期热门的旅游信息通过消息的形式发送给用户并显示在通知栏里,以便于用户就在不进入应用的情况下了解更多的旅游信息。目前国外已有一些推送方案,如Google的云推送、小米的MiPush,此外iOS、Windows Phone7/8也提供了类似的推送方案。通常这些推送方案的服务器大多部署在国外,仅有少数推送服务器(如Google的云推送)在国内部署,但由于某些原因在国内部署的服务器不太稳定,推送效果并不是很理想,所以国内近几年涌现出了很多专门为国人开发的推送服务。

剩余内容已隐藏,请支付后下载全文,论文总字数:32413字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;