开发者

Solutions for grouping and managing many different in-memory indexes

开发者 https://www.devze.com 2023-03-15 02:17 出处:网络
I have a list of Person objects, currently I use 5 different instances of associative structures (std::map/multimap, std::unordered_map) to provide efficient queries for various kinds of static result

I have a list of Person objects, currently I use 5 different instances of associative structures (std::map/multimap, std::unordered_map) to provide efficient queries for various kinds of static results, eg: all people within the age range of 20-40, or all people with a first name of john etc..

As the Person struct evolves, I find I have to deal with manually adding a new type of index, figuring out what the correct structure for it should be, etc and in short its getting very unmanageable.

In the future 开发者_如何学Pythonit seems that the queries are going to get more and more complicated. - We've gone down the DB/SQL approach, it is simple too slow for our needs, at the moment the current solution is fast enough, but it is becoming very unmanageable from a software engineering perspective.

My question is, are there any libraries or solutions that provide collective indexes (in-memory) for a list of objects in a manageable manner?


Would Boost.Multi-Index be of help?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号