[英]Java persistent key-value store
I know this may have been asked a zillion times before but I cannot seem to find the golden solution for my exact use case. 我知道这可能已被问过无数次,但我似乎无法找到我的确切用例的黄金解决方案。
I only have one data structure, a map where the key is a string. 我只有一个数据结构,一个地图,其中键是一个字符串。 The objects of the map are maps themselves but this time the values are simple objects/primitives such as string, int, double, etc. So a map of maps. 地图的对象是地图本身,但这次的值是简单的对象/基元,如string,int,double等。所以地图的地图。 The keys of the innermost map is constant, ie no entries are ever added/removed from the innermost map except when created. 最里面的地图的键是常量,即除了创建之外,没有从最里面的地图添加/删除任何条目。 So it is kind of like a traditional table, albeit each row may have arbitrary columns. 所以它有点像传统的表,尽管每行可能有任意列。
I need this data structure to be persistent and replicated. 我需要这个数据结构是持久的和复制的。
Here are my requirements: 这是我的要求:
The application in question never needs to store anything but the above data structure, ie it will not have a future uncovered need for other persistent data structures. 有问题的应用程序永远不需要存储除上述数据结构之外的任何内容,即它不会具有其他持久性数据结构的未来发现需求。 Hence it sounds fair to optimize based on this particular data structure. 因此,基于这种特定的数据结构进行优化是合理的。
I've looked at Berkeley DB Java edition but it fails on requirement #6. 我查看了Berkeley DB Java版本,但它未能满足要求#6。 I've looked at TokyoCabinet/KoyotoCabinet but it fails on requirement #1. 我看过TokyoCabinet / KoyotoCabinet,但它没有达到要求#1。
So what would you recommend? 那么你会推荐什么?
Have a look at HazelCast
. 看看HazelCast
。 It meets most of your requirements, except that it's distributed. 除了分发之外,它满足您的大多数要求。
I think Chronicle Map is a good match for your case 我认为Chronicle Map非常适合你的情况
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.