With the development of Internet, tens of billions query were submitted every day. However, the old response mechanism of query which client submits query to server then server fetches data from database and sends data to client can't meet the requirements any more. We know the time of client to server request can't be cut down. To accelerate query speed, we have to avoid the costing time method that fetches data from database. Key-Value Store is popular today, but it has problems in Points barrels strategy and memory usage. In this paper, we propose a High-Performance Key-Value Query Solution which is based on hash dictionary and trie tree. Instead of fetching data from database, we construct a Key-Value dictionary in the memory to accelerate the whole query time. We use epoll of Linux to finish the asynchronous communication of client and server. For the dictionary, we design two different dictionaries like Hash dictionary, sorted dictionary based on trie tree. Hash dictionary uses Points barrels strategy and Minimal Perfect Hash Function. Sorted dictionary is based on trie tree. To illustrate performance of our solution, we test and record the performance of memory usage and query per second. It turns out that hash dictionary has more effective search time and sorted dictionary can hold more data. Keywords—key-value query; hash; tire tree
[1]
Anísio Lacerda,et al.
Minimal perfect hashing: A competitive method for indexing internal memory
,
2011,
Inf. Sci..
[2]
Arne Andersson,et al.
Improved Behaviour of Tries by Adaptive Branching
,
1993,
Inf. Process. Lett..
[3]
Martin Dietzfelbinger,et al.
Hash, Displace, and Compress
,
2009,
ESA.
[4]
Jin Li,et al.
SkimpyStash: RAM space skimpy key-value store on flash-based storage
,
2011,
SIGMOD '11.
[5]
Burton H. Bloom,et al.
Space/time trade-offs in hash coding with allowable errors
,
1970,
CACM.
[6]
Larry L. Peterson,et al.
HashCache: Cache Storage for the Next Billion
,
2009,
NSDI.
[7]
Abhinav Dutta.
Cheap and Large CAMs for High Performance Data-Intensive Networked Systems
,
.
[8]
Jin Li,et al.
FlashStore
,
2010,
Proc. VLDB Endow..
[9]
Edward A. Fox,et al.
Practical minimal perfect hash functions for large databases
,
1992,
CACM.