Font Size: a A A

Design And Implementation Of The Memory Barrel Model In Metro Traffic Ticket Income Distribution System

Posted on:2006-11-28Degree:MasterType:Thesis
Country:ChinaCandidate:B WuFull Text:PDF
GTID:2168360152991510Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
In order to alleviate the increasing traffic pressure, the metro traffic in the Chinese big city is developing rapidly at a surprising speed at present.The construction course of the city metro involves different investors, builders and managers. With the constant enlargement of the scale of the traffic network, more and more persons will take different lines by one ticket because the crosses of lines. So we need a Ticket Income Distribution System to distribute the ticket income reasonably, promptly and accurately to the relevant line managers.In the Ticket Income Distribution System, how to deal with the large numbers of trade data is a problem, and the difficult one is the I/O overload problem. In traditional way, we use concentrate treatment to store all data into the database and then to deal with them, this method increases I/O load and need time to manage data. As the data amount of ticketing service of every day is rising constantly, and the bearing capacity of the system is limited. If we do not adopt an efficient solution, the result will be calamitous. For this reason, a treatment by using memory optimizes is proposed in this paper. We store the distributing results in memory temporarily. Using this method can reduce the I/O load of the system effectively and speed up the transaction.In order to realize the memory optimizes, we has designed and realized a memory barrel model. Each relevant company will has a memory barrel in memory and the distributing result of rude trade data will store in the corresponding memory barrel. When the barrel is full, all the data will be written into the database. Each function module will be realized by one subprocess. We use interprocess communications in UNIX and semaphore mechanisms to manage the subprocesses to operate memory barrels. We also used Oracle Pro*C/C++ to implement Embedded SQL in the program to operate database.After adopting the memory optimizes, parts of distributing data are in memory and others have already been written into database when system crashes, thus the inconsistent phenomena of the data will take place. So we need certain recovery method to restore data urgently, otherwise the memory optimize method cannot be applied in practical production.Because the disaster recovery policy in the current real system can't resolve the above problem perfectly, a quick recovery policy is proposed in this paper. This policy can implement quick recovery of the data. By using this recovery policy, the recovery workload decreases remarkably, and the system recovery time is greatly reduced.Comparing the memory barrel model with the traditional way by experiments, it is shown that the memory barrel model can decrease I/O operation time and data distribution time remarkably. In this paper, we also researched the influence of parameters of the memory barrel on the characteristics of the model. The optimum value obtained from the experiment is provided. The principle for choosing these parameters is analyzed which can supply references for practice.
Keywords/Search Tags:Metro Traffic, Ticket Income Distribution, IPC, Embedded SQL, Disaster Recovery
PDF Full Text Request
Related items