In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how key-value implements the list function. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
How to realize list function by key-value
If you use value in key-value to store list, you can only achieve the simplest list function (sorted by id or chronological order, such as using memcache's append or prepend protocol). Other list operations can only rely on the client operation, the performance is very poor, if the amount of data is large, the operation time is unacceptable, concurrency will also encounter great challenges).
The mighty (internal R & D) persistence layer framework we are using to operate on list is based on memcache's appendprepend protocol to realize the simple operation of id list, which meets most of the simple list scenarios. The disadvantage is that when there are more update operations that affect sorting, the hit rate of cache will drop sharply.
What is key-list?
The "value" corresponding to the key-list system key is a list (eg.setlist), which can operate on a single item in the list. An ideal key-list requires the following characteristics:
1.list can be massive and efficient.
2.list can be ordered and can be dynamically adjusted.
What are the usage scenarios of key-list
List of topics and replies in the forum
User follow list, user feed list, user follow feed list in Weibo
Recent access list
Set operation: finding intersection, union and difference sets (sdiffsintersunion)
Friend recommendation
Ranking list
Open source key-list system
Redis
Redisisanopensource,advancedkey-valuestore.Itisoftenreferredtoasadatastructureserversincekeyscancontainstrings,hashes,lists,setsandsortedsets.
Redis was also included in the key-list system because redis supports list operations, as timyang said in his blog: different interpretations of the role of Redis determine the way you use Redis.
At present, websites such as sinaalibabadigg are already using redis.
Memlink
Memlink is a high-performance, persistent, distributed Key-list/queue data engine developed by Tianya Community.
Thank you for reading! This is the end of the article on "how to achieve the list function of key-value". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.