Font Size: a A A

Design And Implementation Of Distributed System Messaging Mechanism Based On Zookeeper

Posted on:2017-05-03Degree:MasterType:Thesis
Country:ChinaCandidate:X J HuFull Text:PDF
GTID:2308330482995707Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the growing size of the computer system, we will focus on the deployment architecture for all business units in one or several mainframe has been increasingly unable to meet the needs of rapid development of the computer system. The tissue distribution of a hardware or software on a different computer network and a communication and coordination of distributed systems through messaging solved the problems caused by system size increases. ZooKeeper is one of the more popular distributed architecture at the moment; it is an open source distributed application coordination service. In a distributed cluster, the message is the carrier of a variety of data, mainly through the message queue, the sending process to send in batches. Similarly, in ZooKeeper cluster, the message is the most basic interactive elements, not only to complete the relevant operations in the cluster, and through the message queue, the distribution process will deliver outbound messages.The proposed messaging mechanism based on ZooKeeper distributed technology implemented to meet in some scenarios, the news from each room in the transmission of applications to unified messaging recipient, holding global ordering. The mechanism for receiving a message from the upstream client, the message will be received according to the IP address, it does not belong to the list of machines from the information in the file of the machine IP list be shielded, thereby improving messaging mechanism processing efficiency, reduce the abnormal message due to the human operator or other factors; after receiving a valid message, the message whill be delivery into the corresponding message queue according to the message type carried in the message, thereby triggering message sending process, send the message queues’ message to the specified downstream clients, meanwhile, according to the reception state of the client, the message which contains the content itself and added the status is added to the Redis database in order to be able to query the messages according to status. In the messaging mechanism, downstream clients unknown the true sender of the message, when the need to query the data source, you can find out the sender of the message through Redis databases.In the messaging mechanism proposed in the paper, in accordance with the order of the ZooKeeper in multiple threads access nodes, only one thread can access the node properties and temporary order of nodes, proposed a kind of file lock which the write lock has priority to meet the needs that in practical applications the operation to write the machine list file priority than read the list file, meanwhile to ensure the safety of the machine list file ender the concurrency state; in the messaging mechanism in accordance with the interim order of provisional order of nodes to achieve a FIFO message queue, meet the need of global message, the message not only sent out quickly but also reduce the using memory; according to the design principles of Master-Worker parallel mode to achieve a master-worker message distribution process, to achieve a plurality of message queues concurrent real-time messages, improving the efficiency of messages sent.
Keywords/Search Tags:ZooKeeper, messaging, message queue, distribution, sending process
PDF Full Text Request
Related items