0

Terracotta 用于扩展 JVM 应用程序。以下是维基百科的简短描述:

Terracotta 是用于 Java 的开源 JVM 级集群软件。它将集群作为运行时基础架构服务提供,通过在应用程序下方集群 JVM,而不是集群应用程序本身,简化了集群 Java 应用程序的任务。

如果您想扩展 Java SE 应用程序,我明白为什么应该使用 Terracotta。

我的问题:如果您还使用 Java EE 应用程序服务器(例如 WebSphere AS),那么使用 Terracotta 是否有意义,它已经支持应用程序集群?什么时候应该同时使用两者,为什么?

4

2 回答 2

4

Suresh,Terracota 在 Java EE 应用程序服务器中使用时确实提供了显着的性能提升。

The Terracotta Server can be thought of as a shared L2 for all machines to leverage. Access to the L2 costs more than access to the L1—in the case of Terracotta, this is due to the fact that the L2 is across a network connection from all JVMs—but the L2 is cheaper than other I/O such as database or messaging that would otherwise be invoked.

相比之下,Zing Platform (Azul-Systems) 通过消除堆大小限制进行扩展,允许每个实例无缝且弹性地扩展到数百 GB 的堆内存和数十个内核。传统的 JVM 无法扩展到超过 2-3 GB。

应用服务器集群不提供缓存。集群用于负载平衡和故障转移,并简化了一些管理任务。集群提高了水平可扩展性,缓存提高了垂直可扩展性。两者兼备是一个杀手组合:)

于 2011-03-23T10:57:23.120 回答
0

分布式缓存是 Terracotta 最有用的用例之一,但不仅如此。Terracotta 为 Java 运行时提供集群(真正意义上的),作为基础设施级别的服务。这意味着通过网络部署在不同 Java 堆上的应用程序感觉就像它们在同一个 JVM 中运行,访问同一个堆。您可以将 Terracotta 视为一种将 J2SE 转换为 J2CE(Java 2 集群版)的技术。

于 2011-03-23T09:31:17.200 回答