DistributedMap 作为与 Terracotta 集群的缓存
当选择合适的缓存实现与 Terracotta 集群时,我遇到了名为 DistributedMap 的单独的 Terracotta 集成模块,它提供了基本的缓存功能,例如支持不同的驱逐策略等。这种缓存实现似乎很容易配置,但是当涉及到生产时-就绪聚类我发现我需要找到一些问题的答案: 1. 有人用过这个TIM吗?有人尝试过使用这个TIM吗? 有什么谬误吗? 2. DistributedMap 很容易配置,但下一个场景如何:如果我们启动 2 个 Terracotta 客户端,并且每个客户端的 DistributedMap 的配置都不同,会怎样。 Terracotta 服务器会更新 client1 提供的现有配置还是保持不变。
When choosing suitable cache implementation to be clustered with Terracotta I've run into separate Terracotta Integration Module named DistributedMap wich provides basic caching abilities such as support for different eviction policies etc. This cache implementation seems to be easy configurable, but when it comes to production-ready clustering I've found that I need to find answers to some questions:
1. Have anyboby used this TIM before, is there anybody who've tried to use this TIM? Any fallacies?
2. DistributedMap gets easily configured, but how about next scenario: what if we start 2 Terracotta clients and each will have its DistributedMap configured differently. Will Terracotta server update existing configuration, provided by client1 or leave simply it unchanged.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我今天刚刚与一位在生产中使用 DistributedMap 的客户进行了交谈。
至于配置 - 我相信配置包含在实例中。 由于 DistributedMap 不包含共享状态与另一个实例重叠的任何根,因此每个实例都将彼此分离(这意味着您可以根据需要创建任意多个独立的 DistributedMap)。
请注意,直到您通过将 DistributedMap 添加到共享图使其成为集群之后,DistributedMap 才真正成为集群。 这可以通过将其添加到已经集群化的 POJO(您自己创建的,或者例如已经集群化的 HashMap)或将其标记为根(一种常见方法以及 文档)。
I just talked to a customer today using DistributedMap in production.
As for the configuration - I believe the configuration is contained within the instance. Since a DistributedMap does not contain any roots where shared state would overlap with another instance, each instance would be separate from one another (meaning you can make as many independent DistributedMaps as you like).
Note that a DistributedMap isn't really clustered until you make it clustered by adding it to a shared graph. This can be done by adding it to an already clustered POJO (of your own creation, or for example a HashMap already clustered) or by marking it as a root (a common approach and the one suggested by the docs).