Font Size: a A A

Design And Implementation Of P2P-based File Cooperation Platform System

Posted on:2010-08-27Degree:MasterType:Thesis
Country:ChinaCandidate:J Y ZhangFull Text:PDF
GTID:2178360272497154Subject:Software engineering
Abstract/Summary:PDF Full Text Request
It is quite ironic that with the development of hardware, software and network, the traditional Client/Server(C/S) architecture network is becoming less and less suited to the recent situation due to the servers have taken too many tasks and responsibilities while resources in clients are mostly remained unused. If continuing, the network would confront a big"bottleneck"in the near future. At the point, adopting new network architecture becomes urgent. The Peer-to-Peer(P2P) network, in which every node is considered both server and client, offers us a good solution.Meanwhile, with the work more complex in the modern world, people have to cooperate to achieve some accomplishment. Under this circumstance, the Computer Supported Cooperative Work (CSCW), a whole new field in computer application, is invented and introduced. It did help corporations and organizations a lot. But the CSCW systems we usually use, which employ the C/S architecture, are problematic in some aspects. For example, the C/S would have difficulties in cooperating work within a large region, low fault tolerance, easy-involved in single-node failure and etc. Facing these problems, we try to introduce the P2P network in the CSCW system, and thus implement a"P2P File Cooperation System". In this system, any PC could serve as the client at the same time as the workspace servers, information could also be saved in the server PC. This architecture relatively reduces the burden of servers and thus largely improves the system's mobility and fault tolerance ability.To begin with,we propose the system's general design and analysis, then the utilized technology is described. In the general design, the project is consist of four modules—user interface(frame) module, business logic module, business kernel module and transport module. The frame module mainly achieves the user interface, and it calls the business logic to implement the background functions, such as login and etc. This module is implemented by Windows Template Library. The business logic module is in charge of the data storing and reading process. It uses the interfaces provided by the business kernel to implement the logic function and contains number of different functions: administrator management, message management, real-time message, audio call, device management module and contact module. Business kernel module is implemented for file corporation related function, interfaces for transportation and so forth. Transportation module achieves the transport function. Among all above, I design and implement the interface and file management modules.Frame module is a very important module for the whole project. It is directly related to the user experience of this program. We try to design the user interface comely as well as easy-operated. It includes four parts: login frame, main frame, workspace frame and real-time message. The login frame is the first user interface of this project, and it helps the user log into the system. In this program, we have to design different background logic because the login process includes online-login and the offline-login. The main frame, which is consisting of tools menu, contact tree and etc, would pop up after the login frame. It is the interchange frame and helps the user find the functions they want, such as real-time message, opening up a workspace and so on. The workspace frame is for file cooperating. One could do things like setting up a workspace, inviting a contact into the workspace, co-editing files in the workspace and etc. The real-time message frame is for online chatting, including the text chatting and audio chatting. In order to keep the foreground and background working smoothly, we adopt Windows Multi-thread technique in our User interface design and implementation.The file management module is the core part of this project. It mainly solves the file synchronization problem. That is assume some users are in the same workspace and one are editing the a file, if he/she completes and saves it, the delta data has to be transferred to the others'client so the file would be the same in every nodes. It includes the file monitoring, the delta date patching and merging operations. Now the main-stream method is comparison algorithm, including Xdelta, Rsync, bsdiff, unixdiff and etc. While in this project, there are several factors that have to be considered. Firstly, the file types in the workspace are not all the same. So we need to find a method that could be adapted on all the types. Secondly, the number of files may be huge, which requires that algorithm to avoid the duplication. In this paper, by introducing the hash function in Blizzard Inc. MPQ, we propose an algorithm that could be used in our workspace. Through testing, the algorithm works rather well with a good efficiency.Finally, we summarize this thesis, offer a conclusion, and look forward to the future.
Keywords/Search Tags:File Cooperation, CSCW, WTL, diff, MPQ hash
PDF Full Text Request
Related items