首页 >  2008, Vol. 12, Issue (1) : 70-76

摘要

全文摘要次数: 4001 全文下载次数: 78
引用本文:

DOI:

10.11834/jrs.20080110

收稿日期:

修改日期:

2006-10-12

PDF Free   HTML   EndNote   BibTeX
WebGIS中跨网段文件传输的设计和实现
南京大学地理信息科学系GIS教研室 江苏 南京 210093
摘要:

针对WebGIS中利用组播跨网段传输文件需要网关开设IGMP协议的不足,提出了在网段里动态设置组播代理,利用TCP协议从服务器获取数据,在本网段里组播数据.为了提高服务器负载量和传输效率,采用完成端口管理客户端的SOCKET连接;使用线程池和内存池处理在线用户请求;在每个网段里构建对等网实行补包,以弥补组播丢包的不足.

Design and Implementation of File Transfer Crossovers Network Segments in WebGIS
Abstract:

In order to usemulticast to transfer file crossoversnetwork segments inWebGIS system, every gateway has to open IGMP protoco,l which unavoidably leads to hidden security trouble such as network storm, W ith using TCP to transfer file, serverhas to send data to clients in turn, which decreases efficiency and engrossesmore bandwidth.To solve this problem, MAP(multicast agent protocol) was established to transfer data. The MAP dynamically selected onemulticast agent in every subnet. When an agent received data from serverviaTCP protoco,l itmulticast files into localsubnetwithoutopening IGMP protoco.l By thiswaymulticastcould play such advantages, withoutopening IGMP router protoco.l The key steps are as follows:Firstly, every client joins the p2p network, and gets the newest resources from their friends to make resourcesmi ultaneously. In the nextplace, client looks up themulticast agent and takes part in the agent election. Ifwins, the agent connects the server to get the newest resource. And then, the server ofWebGIS transfers the resource tomulticast agent in turn byTCP protoco.l The agentmulticasts the resource in local segment. At last, if there is losing package, it willbe compensated by the p2p network. Then the update task of all the clients is finished quickly.The load of the multicast was greater than common nodes. When agent finded that there was one client whose performancewas better or quited the system normally, it demised the privilege of agent to more suitable node. The parameters ofperformance included the value ofCPU, the size ofmemory and the available space ofhard disk.When an agent quited abnormally, its connected nodes would receive the FD_CLOSE message, then these nodes would launch the campaign ofmulticastelection in local segment. However, therewas one special situation thatagentand its connected nodes quited almost at the same tmi e abnormally, if that happened, the campaign couldn’t be executed.\nThis problem can be solved in thisway that every node who sent node to quit sended amessage to search agent in p2p network. If failed, the node launches the campaign ofmulticast election activity.Due tomulticastunreliability, some clientswould lose the packetorquitabnormally orwhen it logined in the system\nthe agentbegan to translate data. All of these situation would lead some clients to lack packets. Consequently in every subnet segmentp2p neworkwas constructed to compensate packet, which lightened the burden ofmulticastproxy greatly. After logined in system, each clientsentmessage to local segmentbymulticast to look up friend. When the clients in the same local segment received thismessage, they checked the numberof their friend and then theywould connect them\nif the numberwas less than three, otherwise reject thismessage. And this clientonly received three relative request. For this client, if thewaiting tmi ewas out, itmeaned that itwas the first node in local segment, then itwas themulticast agent. It should connect theWebGIS server mi mediately.In thisway, the local p2p network was constructed. The shape of the network was hexagon. Every peer had three friends and there onlywas one supernodewhomanaged the p2p network. Its taskwas to calculate information and update data and so on. Generally thatwasmulticast.In order to increase the server’s load and in tmi e accept client’s connection, completion portwas used tomanage socket connection between server and client. To mi prove the transfer efficiency, thread poolwas adopted to response to clients’on-line requestandmemory poolwasused tomanage resourcewhichwas allocated to restore clients’information.We compareMAP with TCP by abundant and exact expermi ents. The results showswe find that there is a linear relation between the numberof segmentand the tmi e of transfer inMAP protoco.l Ithas nothing to dowith the number of clients in subnet, which demonstrates thatMAP exceedsTCP greatly. Additionally, metadatawasused to converse among server、multicastproxy andcommon clients, which can support to transfer files from broken dot.

本文暂时没有被引用!

欢迎关注学报微信

遥感学报交流群