Font Size: a A A

Design And Implementation Of WEB Service For High Concurrency Grain Monitoring System

Posted on:2019-05-17Degree:MasterType:Thesis
Country:ChinaCandidate:W T ChengFull Text:PDF
GTID:2348330545498835Subject:Electronic and communication engineering
Abstract/Summary:PDF Full Text Request
The issue of food security has always been closely related to people.With the popularity of 4G network and the rise of cloud computing technology,there are webpage clients,computer clients and Android clients.With the increasing number of users,in the face of a large number of user access and high concurrent requests,the system is easy to wait for long time,failure,failure of page Jump,and data error,which brings great inconvenience to the user,so it needs to improve the system and send performance.In order to improve the concurrent performance of the system,in the hardware aspect,large websites achieve the goal of stabilizing the running system by improving the performance of the server and expanding the size of the server cluster.In the internal performance of the system to deal with high concurrency.In the aspect of HTTP server,static server separation and load balancing are used.In terms of database performance,there are methods such as database clustering,library table hashing,and so on.In cache,we can reduce the pressure to read and write requests to the database through the combination of cache and database.When the existing grain measurement and control system operates the database,the multi thread connection pool mode and the C++ deque are used to deal with concurrent requests.Not only the utilization rate of CPU is not high,a large number of server resources are occupied,but the queue waiting time is long.In view of the current situation of the project and the use of existing hardware resources,the following research work is carried out to improve the concurrency performance of the Web server.(1)Through in-depth study of Node technology,the technical characteristics of single thread,non blocking I/O and event driven mechanism are analyzed.Single thread saves server memory and realizes macro concurrency,and the operating system has no time overhead for creating and destroying threads.The core utilization of non blocking I/O is very high.Almost half of the bottom code of Node is used for the construction of event queue and callback function(priority)queue.Event driven mechanism can be used to complete the task scheduling of servers.(2)Using the advantage of Node to make full use of CPU,the single core single thread Node is extended to multi-core CPU environment.Through the research of Node multi core technology,the disadvantages of load imbalance and redundancy are analyzed,and a new multi-core solution is designed,which combines the advantages of the mature Equilibrium Algorithm and the disadvantage of communication in the reverse proxy server.It uses the Node server as the reverse proxy to reduce the problem of the burden of communication in the work.The barrier load is balanced.The scheme can not only make full use of the performance advantages of Node in high concurrency,but also improve the efficiency of program execution.Most importantly,it can improve the utilization of multi core CPU resources under the premise of guaranteeing the load balance.(3)In order to improve the concurrency performance of the grain monitoring and control system,a Node technology is used to design a high concurrent Web server architecture suitable for the measurement and control system of grain,and the overall architecture of four modules,including HTTP server,MongoDB database,Redis cache and RabbitMQ message queue,is designed for functional requirements.The module is designed and implemented.In order to realize the load balance of HTTP multi core server,monitor the status information of the sub process and prevent the loss of the subprocess from losing,this paper makes a detailed design of the distributor process and worker process of the HTTP multi core server based on Node.Using MongoDB performance advantages and scalability,as well as its shell client,data format and JavaScript matching advantages,design and implement the MongoDB interface layer and update service.Using Redis on the back end data storage,an efficient hierarchical caching mechanism can be implemented to improve the hit rate of the cache,reduce the advantage of the I/O operation of the database,and use Redis for the design of the cache layer.In addition,the RabbitMQ message queue is designed for the cache update service and the database update service by using the advantages of RabbitMQ with high performance,support message persistence and alleviating the rate inconsistency among various levels in the system.(4)The improved Node multi core server and the Web server designed in this paper are tested for pressure.Compared to the Web server of IIS,Node mononuclear server and the original system,the Web server based on Node based grain condition measurement and control system can improve the system throughput and reduce the average response time.In summary,the design of Web client based on node,compared with the traditional system Web client,has high concurrency performance advantages,after the actual test,has the promotion and practical application value.
Keywords/Search Tags:Grain Monitoring, High Concurrency, Node, Event Driven, Web Service
PDF Full Text Request
Related items