DistributedMap 作为与 Terracotta 集群的缓存

发布于 2024-07-23 12:17:04 字数 323 浏览 5 评论 0原文

当选择合适的缓存实现与 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦屿孤独相伴 2024-07-30 12:17:04

我今天刚刚与一位在生产中使用 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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文