If you need your own cache in your system, what way is it?

zhaozj2021-02-16  56

Quote: I am doing auditing software, I need to collect a lot of financial data, and analyze it, this massive data is not general, so I have been thinking of a set of caching. In fact, the database server, the application server has a cache. Then then the cache we designed should be for system. Some methods upstairs are not told. Here, I offer some of my ideas. The system needs to cache performance in two aspects, first, frequent database query access, and the content is often the same; second, massive data, but not all rely on memory. The cache I think is from the Cache thought of the CPU, according to the memory, local file, and data access to establish a three-level access mechanism. In addition, from the concept of the operating system, you can learn from the concept, page storage concept. First maintained a segment page table in memory, and maintain a certain amount of object number (set the size of the first level cache according to the system's memory situation), and then query local files in the segment page table when the system has access to the memory. Is there a related object, there is this load (local IO access is naturally fast than accessing the database through the network); if not, remote database access is performed. In general, to do two more important issues to solve two more important issues, the first is the release mechanism of caching objects (exactly the time film, advanced first out, the recent number of visits is small, etc. need to be considered, It is best to have a different implementation); second, it is to distribute distributed exchange and processing issues for large systems; third, that all updates need to be cached. JCS is a relatively good, but did not see its source code, so I don't know how to implement it. The above is a thinking, and I am just thinking about the stage (there is currently no such pressure pressure), and the truly implementation is not a person. Only for reference only!

转载请注明原文地址:https://www.9cbs.com/read-17624.html

New Post(0)