Which in memory Db should be used to cache a Tree, used majorly for read?

Which in memory Db should be used to cache a Tree, used majorly for read?



Use case: We have a Trie Data Structure which will be accessed over 100k times a day. Traverse this trie(based on input params) and return the JSON stored at leaf node.



Issue/Concern: Initially, I tried storing this Trie in Redis and perform the traversal logic using LUA script.
However, while it executes, LUA script blocks the whole Redis server. Therefore, some times it hits performance of my system.



Question: I have two questions:




2 Answers
2



Both of our database systems, eXtremeDB (closed source) and Perst (Open Source) offer Patricia Trie indexes. There's no need to implement your own and cache it.



100,000 accesses per day, whether heavily read-only or not, is not a heavy workload. Could be something wrong with your Redis implementation; I'm sure someone else will chime in w.r.t. that.



Disclaimer: I represent the vendor of eXtremeDB and Perst.





Thanks for replying. The issue is not with the workload. Rather, at the same time there can be multiple threads trying to read this data and if I use a LUA script, then it blocks all instances of Redis server, slowing down the response for other waiting threads.
– Shashank Singh
Jul 31 at 7:37






I'm not an expert with Redis, but as far as I understand, Redis supports concurrent readers. Hopefully, someone more familiar with Redis will chime in.
– Steven Graves
Jul 31 at 22:01





It does. However, while running a LUA script, it works like a transaction and blocks access until transaction is completed.
– Shashank Singh
Aug 3 at 11:20



We are going ahead with using 'near cache' with Redis. Redisson provides this capability.
If Redisson causes problems, we will try Hazelcast, which by default provides near cache.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế