0

It's possible to write queues, stacks, vectors, linked list, sets, etc. all in memcached. I'm wondering if there are any libraries that have implemented any of these data structures? We'll be in Java probably and will otherwise have a need to write some of these by ourselves.

"Thread-safety" is important, in that two processes living on different machines should be able to use the same library to manipulate these structures concurrently.

4

2 回答 2

1

假设我没有误解你的问题——这很有可能:)

您可以查看 HazelCast(Java API - 分布式地图、mutitmaps、集合、列表队列、主题)、Redis(Jedis Java API - 集合、地图、列表、主题等)。Hazelcast 复制非常简单(您必须指定是要使用基于 tcp 的复制还是多播复制)-使用 redis,您可以考虑使用消息传递进行复制(我认为集群在稳定版本中不可用,但您应该做自己的尽职调查)。

于 2012-07-03T16:22:47.513 回答
0

You may use Redisson. It implements distributed and scalable Java data structures (Set, Map, ConcurrentMap, List, Queue, Lock, AtomicLong, CountDownLatch, Publish / Subscribe) on top of Redis.

于 2014-01-17T15:00:04.287 回答