登录

  • 登录
  • 忘记密码?点击找回

注册

  • 获取手机验证码 60
  • 注册

找回密码

  • 获取手机验证码60
  • 找回
毕业论文网 > 毕业论文 > 计算机类 > 计算机科学与技术 > 正文

基于Netty的RPC通信代码生成器设计毕业论文

 2021-12-22 09:12  

论文总字数:19473字

摘 要

随着计算机技术的迅速发展,底层操作系统和文件系统不断改良I/O操作,例如文件锁定、非阻塞I/O,就绪性选择和内存映射等,因此I/O操作的效率在某些场景下得到了很大的提升。在此基础上,Java语言也在JDK 1.4版本的发布中推出了NEW I/O(NIO),JSR 51的实现标志了NIO的诞生,这些工具类可以充分调动操作系统的读写能力。但是,nio包提供的API以及SPI较难使用。因此,JBOSS社区构建了一个开源的网络通信框架Netty,其自定义了新的缓冲区API,异步线程池API以及常用的网络工具,用户可以依托这些特性快速开发高性能的服务端及客户端应用。

本设计旨在利用Netty提供的诸多特性以及解决方案进行进一步的抽象,以实现一个简便易用的RPC(Remote Procedure Call)通信模块,系统中的其他模块可以通过这个封装良好的模块进行网络通信。同时开发者有时需要自己设计特定的应用层协议,因此应当允许开发者通过给定的配置方式提供自定义协议,并通过代码生成器的方式将自定义协议融入此通信模块中。

本文从阐明课题的背景、意义出发,分别从系统需求分析、系统总体设计、系统详细设计以及系统测试多个方面详细的介绍了RPC通信代码生成器的设计与实现过程,并对项目的完成情况进行总结。

关键词:代码生成器 网络通信 Netty RPC

The code generator for rpc communication based on Netty

Abstract

With the rapid development of computer technology, the underlying operating system and file system continue to improve I / O operations, such as file locking, non-blocking I / O, readiness selection, and memory mapping. Therefore, the efficiency of I / O operations in certain scenarios has been greatly improved. On this basis, the Java language also introduced NEW I / O (NIO) in the release of JDK 1.4. The implementation of JSR 51 marks the birth of NIO. These tool classes can fully mobilize the read and write capabilities of the operating system. Unfortunately, the API and SPI provided by the nio package are more difficult to use. Therefore, the JBOSS community has incubated an open source network communication framework Netty. Netty has customized new buffer API, asynchronous thread pool API and commonly used network tools. Users can rely on these features to quickly develop high-performance server and client applications.

This design aims to use the many features and solutions provided by Netty for further abstraction to achieve a simple and easy to use RPC (Remote Procedure Call) communication module, other modules can use this module to facilitate network communication. In many scenarios, developers need to design a specific protocol to achieve communication, so developers are allowed to provide a custom protocol through a given configuration method, and integrate the custom protocol into this communication module through a code generator.

This paper introduces the design and implementation process of the RPC communication code generator in detail from the aspects of project requirements analysis, system design, detailed design and project testing, starting from the analysis of the background, significance and requirements of the topic. Finally summarize the completion of the project.

Key words: Code generator; Telecommunication; Netty; RPC

目 录

摘 要 I

Abstract II

第一章 引言 1

1.1 选题背景 1

1.2 国内外研究现状 1

第二章 系统分析 2

2.1 需求分析 2

2.1.1 系统的功能需求 2

2.1.2 系统维护需求 2

2.2 可行性分析 2

2.2.1 技术可行性 3

2.2.2 经济可行性 4

2.2.3 操作可行性 4

2.3 系统运行环境 4

第三章 系统总体设计 6

3.1 总体功能 6

3.2 通信模块设计 6

3.2.1 应用接口设计 7

3.2.2 Netty处理模型 7

3.2.3 通信协议 8

3.3 代码生成器设计 8

第四章 系统详细设计 11

4.1 代码生成器设计 11

4.1.1 配置管理器 11

4.1.2 代码生成类管理器 12

4.1.3 注解 12

4.2 XML解析模块设计 17

4.2.1 配置项 17

4.2.2 XML文件解析 18

4.3 系统启动设计 19

第五章 系统调试与测试 21

5.1 程序调试 21

5.2 程序测试 21

5.2.1 测试的重要性及目的 21

5.2.2 测试的步骤 22

5.2.3 测试用例 22

第六章 结论 24

6.1 系统评价 24

参考文献 25

致谢 26

请支付后下载全文,论文总字数:19473字

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

企业微信

Copyright © 2010-2022 毕业论文网 站点地图