开发者

Solutions for grouping and managing many different in-memory indexes

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜