Since the concept of Cloud Computing has been purposed, as a core component ofCloud Computing, Cloud Storage (Distributed filesystem) has been become a focus inrelated field rapidly. Different from the traditional storage, Cloud Computing provides amodel of networked online storage using millions of general computing node as datacenter. Moreover, Cloud Computing provides data storage and fault tolerant servicetransparently through redundancy and distribution of data How to design and implementdata storage in high performance has been played a key role in Cloud Computing.By discussing and summarizing the current distributed storage in details, this thesispurposes a distributed storage base on private cloud CStore, it’s composed of metadataservers, object storage devices and other relevant servers, provides a storage service forend-user efficiently. At last, the thesis designs and implements a Linux client base onCStore and POSIX semantics. The feature and novel idea of this client is described asfollows:Firstly, the client implements a filesystem driver in userspace base on FUSEprotocol. As a virtual filesystem, the program can run on it same as regular filesystem.In its internal, the client uses a pipeline model, and every module manages its data andbusiness by a thread. To achieve on asynchronous communication, UNIX socket andwait queue has been used between threads.Secondly, to reduce server overhead and network traffic, the thesis purposes anefficient algorithm to cache metadata in memory and local disk, cache file data inmemory. Moreover, the client organizes metadata through a directory-tree and file database on red-black tree and LRU replacement to manage its corresponding fragmentefficiently. While starting program, the client loads local metadata. While exitingprogram, the client saves all metadata locally.Thirdly, the client implements a network I/O frame using non-blockingasynchronous mechanism to communicate with server in high performance and finishesdisk I/O by thread pool with C++language. While communicating with kernel, theclient implements all data structures and business with C language. Fourthly, the thesis purposes an algorithm base on operation log from metadataserver regularly and implements the log to achieve consistency between server andclient.Lastly, to storage metadata locally, the client purposes a metadata storage modelbased on B+tree. With the strategy of building index of B+tree and appending data, theclient has solved metadata storage efficiently.The data of client has been showed by file system for user, and it can be frombackend servers, also can be extended from other client with P2P protocol. At last, ourexperiment studies show that our client outperforms other regular distributed filesystem. |