节点文献

基于穿越NAT网络的点到点数据通信的研究与实现

Research and Realization on P2P Communication Based on NAT Traversal

【作者】 银晶晶

【导师】 魏慧琴;

【作者基本信息】 北京交通大学 , 计算机科学与技术, 2012, 硕士

【摘要】 本文以家庭远程监控系统为研究背景,为在广域网上实现点到点高速可靠数据传输而展开研究。由于中国家庭的网络环境一般处于NAT之后,外网一般不能直接访问内网,为实现对等的点到点通信就必须过穿越NAT这一关。本文先对NAT种类和特性进行介绍,并在点到点应用中实现对NAT的穿越,针对不同的网络环境采用不同的NAT穿越技术:从家庭监控设备有公网IP时的主动直连,到家庭位于NAT之后而监控者处于公网的反向连接,从双方都处于EIMNAT时的UDP打洞,到能够穿越任何NAT但大量消耗服务资源的服务器中转,依次将当今主流NAT穿透技术应用于家庭远程监控系统以实现点到点的数据传输。在此基础上,为实现数据的可靠传输,在UDP打洞时,引入基于UDP的可靠数据传输协议UDT,在介绍如何使用UDT传输数据流的同时,对UDT进行改造以增强其对网络带宽的抢占能力。当使用公网服务器协助点到点通信双方穿越NAT时,为实现服务程序的高并发、快响应、长稳定,为满足服务程序开发维护过程中的高敏捷、低成本、易扩展,使用半同步/半异步的线程池调度模式作为服务程序的架构。本文更进一步的将半同步/半异步调度模式针对多核系统进行优化和改进,提出了基于任务关联度的任务分配策略和基于资源利用率的任务调度算法,以提高服务器响应速度,提升多核处理器的使用效率,使多核处理器负载更加均衡。

【Abstract】 This paper based on the background of home remote monitoring system, does research on the reliable and high efficient Peer-to-Peer Communication over WAN. In China, the communication endpoint located in home network is usually behind NAT, the endpoint from public network cannot directly access the inside one and have to establish P2P communication with the help of NAT traversal.This paper firstly introduces the different types of NAT behavior, and proposes a complete set of solutions for NAT traversal used in P2P applications:the client in the private network can initiate connection to the device which in the public and vice versa; if the two peers behind different EIM NATs, we use UDP Hole Punching to traverse NAT; if all of the above method won’t work effectively, we use a public server to relay messages to each other. All these technologies are widely used in nowadays, and we apply them to our home remote monitoring system.Further more, we introduce a reliable UDP based application level data transport protocol—UDT to transfer data reliably after punching UDP hole to traverse NAT successfully. We not only learn to use UDT but also improve it to enhance the ability to seize the bandwidth.When using a public server to assist the P2P communication to traverse NAT, how to implement high concurrency service app with response quickly and running stable is our purpose, how to develop agile service app with cost acceptable and easy to extend is our goal, the author according to the characteristics of multi-core processor, selected Half-Sync/Half-Async pattern as the research object, proposed the task allocating strategy based on correlation degree between tasks and the task scheduling algorithm based on resource utilization to improve Half-Sync/Half-Async pattern.

节点文献中: 

本文链接的文献网络图示:

本文的引文网络