基于发布订阅中间件的分布式系统监控工具

 2022-02-02 09:02

论文总字数:25606字

摘 要

随着互联网技术和分布式应用的发展,对于某些需要对外界刺激做出响应的、需要异步通信或多对多通信的情况,迫切需要一种新的体系结构来进行系统的开发。发布/订阅作为一种架构方式,具有松耦合、异步、支持多对多通信、高扩展性等特点,可以很好地解决以上问题,为构建良好的系统打下基础。基于发布订阅中间件的分布式系统一般以数据为中心,由于发布方和订阅方之间的松耦合关系以及中间件自身的特点,通常无法从系统中直接获取通信的详细信息。为了能够对系统运行状况有及时、准确的了解,需要专门的软件对分布式系统进行系统级的监控以获得实时运行状态信息并通过数据挖掘从中获取更多对于系统运行情况、系统设计和实现等方面有用的信息。

本课题在此基础上实现了一款基于DDS系统的监控工具。该监控工具可以对分布式系统的信息流、状态流、应用组件状态等信息进行实时监控。并且能够通过信息挖掘得出应用组件间的发布订阅关系、发布订阅活动变化趋势、组件间的对比信息等有价值的结果。监控工具最终通过可视化的动态图形图表将这些信息展示给用户。

监控工具通过在DDS系统中设置监控代理获取原始的监控信息。通过监控主题的发布/订阅实现监控代理和监控工具分析处理程序间的数据传输。后台采用Qt多线程编程方式保证监控工具分析处理的性能。为体现软件可视化特点,将Qt GUI技术与Web前端技术相结合实现基本界面和图形图表的构建。为实现前端显示模块和后台分析程序间的交互,综合利用了信号-槽机制、JSON表示法、自定义URL信号传输等方法和技术。最终通过前端异步编程方式和图形图像处理的优化工作实现大数据量下监控工具的实时分析和展示功能,给予用户更清晰直观的监控体验。

最后对监控工具的各项功能进行了展示,并进行了大数据量下发布订阅关系显示功能的测试和多组件、短周期条件下实时发布订阅趋势显示功能的压力测试。展示和测试的结果表明该监控工具能够以清晰直观的方式对发布订阅系统进行系统、全面的监控,并从基本通信中得到更多分析信息,且性能稳定,具有良好的扩展性。

关键词:发布/订阅,中间件,监控, DDS,可视化

Distributed System Monitoring Tool

Based on Publish/Subscribe Middleware

Abstract

With the development of Internet technology and distributed applications, for some of the need to respond to external stimuli, the demand of asynchronous communication or many-to-many communication, developers need a new architecture for system development. Publish/subscribe architecture as a way with a loosely coupled, asynchronous, many-to-many communication support, high scalability and other characteristics, can solve the above problems and build a good system foundation. Publish/subscribe middleware for distributed systems is generally data-centric, but due to the loosely coupled relationship between the publisher and subscriber and the characteristics of middleware, generally can not collect detailed information from the system directly. In order to learn more about a distributed system in time, a specialized software is needed to carry on system-level monitoring of running status, and then more useful information about the design and realization of the system can be found through data mining.

On this basis, a monitoring tool based on the DDS system is implemented. The tool can monitor the real-time information flow, the state flow, application component status information of distributed systems. Through data mining, publish/subscribe relationship between application components, publish/subscribe activity trends, comparative information between the components can be shown. Monitoring tools eventually through visual graphic chart display information to users.

Monitoring tools get the raw information by setting the DDS monitoring agent. Through the publish/subscribe activity, monitoring information can be transferred between monitoring agent and the analysis program in the monitoring tool. Rear-end program uses Qt multi-threaded programming to ensure performance for analysis and processing. Qt GUI programming and Web front-end technology are mixed to reflect the characteristics of visualization.

To achieve the interaction between rear-end and front-end display module, there is a utilization of signal - slot mechanism, JSON notation, the custom URL signal transmission. The ultimate realization give users a more clear and intuitive monitoring experience by front asynchronous programming mode and some majorization of visual graphic in the condition of large amounts of data.

Finally, the various functions of the monitoring tools were shown, and the capability of publish/subscribe relationship display and immediate publish/subscribe trend function were tested in pressure conditions.Results show that the monitoring and testing tool can reach a clear and intuitive way to give out a system, comprehensive monitoring of publish/subscribe system, analysis and get more information from the basic communication, and stable performance, good scalability.

KEY WORDS: Publish / Subscribe; Middleware; Monitoring; DDS; Visualization

目录

摘要 I

ABSTRACT II

第一章 绪论 1

1.1课题背景 1

1.2基于发布/订阅中间件的系统的基本原理和特点 2

1.3数据可视化 2

1.4可视化监控工具的作用 3

1.5论文章节安排 3

第二章 需求分析 4

2.1信息监控需求 4

2.2信息分析处理需求 4

2.3性能需求 4

2.4可视化需求 5

2.5适应性需求 5

第三章 概要设计 6

3.1开发环境选择 6

3.2可视化技术选择 6

3.3 基本模块设计划分 7

第四章 监控工具的实现 12

4.1监控信息的获取 12

4.2对于信息进行分析挖掘 12

4.2.1确定组件发布订阅关系 12

4.2.2得到发布/订阅的实时趋势 13

4.2.3主题分布情况的计算 14

4.2.4组件、节点之间的横向比对 14

4.2.5其他一些有价值的挖掘方向 14

4.3 Qt结合Web前端技术进行可视化开发 15

4.3.1 Qt显示前端资源 15

4.3.2 Qt传递监控数据给JS 16

4.3.3 JS传递交互信息给Qt 16

4.4 可视化界面的编写 18

4.5监控信息的过滤 19

4.6性能提升和代码优化 19

4.6.1后端采用多线程并发方式提升计算效率 19

4.6.2前端采用异步编程方式 20

4.7大数据量下清晰显示的解决方案 21

4.8节点位置固定的应用场景 23

第五章 成果展示及相关测试 24

5.1基本界面 24

5.2 其他特定功能视图展示 25

5.3 性能和压力测试 27

5.3.1实时发布订阅趋势监控的性能测试 27

5.3.2实时发布订阅关系监控的大数据量测试 27

第六章 总结和展望 29

6.1总结 29

6.2展望 29

参考文献(References) 30

致谢 32

第一章 绪论

1.1课题背景

随着计算机技术的发展,软硬件性能不断提升,网络传输逐渐克服各种限制,带宽不断增大。计算机技术不再局限于特定行业,而是越来越广泛地渗透于金融、医疗、通讯、电子等各行各业。在应用场景不断变化、性能需求不断提高的情况下,一些传统的软硬件体系结构已经难以应对很多新出现的场景和问题。

发布/订阅[1]作为一种优秀的设计模式,定义了一种一对多的依赖关系,让多个订阅者对象同时监听某一个主题对象。这个主题对象在自身状态变化时,会通知所有订阅者对象,使它们能够自动更新自己的状态。

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

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

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