缩放和聚类JPA [英] Scaling and Clustering JPA

查看:153
本文介绍了缩放和聚类JPA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将jboss7上的常规Java EE应用程序放在一起,它将在数据层中使用JPA。我想使这个应用程序,以便它与负载扩展。虽然很明显如何扩展Web层:创建更多的机器并将它们抛在负载均衡器之后,扩展数据层的程度却不那么大。

I am putting together a regular Java EE application on jboss7 that will use JPA in the data tier. I would like to make this application such that it scales up with load. While it is pretty clear how to scale up the web tier: create more machines and throw them behind a load balancer, scaling up the data tier is less so.

我可以可能是我的数据库集群(MySQL)。 Stil,使JPA层保持非聚集状态。理想情况下,JPA将通过使用由MySQL支持的(集群)内存缓存来扩展。

I can probably cluster my database (MySQL). Stil, that leaves the JPA layer unclustered. Ideally, JPA will scale up by using in (clustered) memory caching backed by MySQL.

当我环顾四周时,有关JPA扩展的所有信息似乎都是3 - 4年旧。人们谈论ehcache,memcached和infinispan。我不确定这是否仍然是最新的。

When I look around, all information around JPA scaling seems to be 3-4 years old. People talk about ehcache, memcached and infinispan. I am not sure if this is still current.

有人能告诉我Java EE集群和扩展的最新技术,特别是在数据层中。

Can someone tell me the state of the art in Java EE clustering and scaling, especially in the data tier.

推荐答案

各种缓存策略仍然是扩展JPA / Hibernate的方法(您基本上将问题命名为最受欢迎的选项)。据我所知,自从这个领域4到5年以来,没有什么特别的事情发生。你没有提到的另一个选择是JBoss Cache。所以JPA / Hibernate的二级缓存仍然是这个领域的规则。

Various caching strategies are still the way to scale JPA/Hibernate (you basically named the most popular options in your question). Nothing extraordinary happend since 4-5 years in this field, as far as I know. One more option you haven't mentioned is JBoss Cache. So the Second Level Cache for JPA/Hibernate still rules in this area.

为什么这里没有进展?我的猜测是,首先需要可伸缩应用程序的人往往会在需要高性能的领域忽略JPA和Hibernate。通常人们会穿着Spring Framework JDBCTemplate帮助程序和事务管理。然后可扩展性就是这个领域的数据库功能问题。

Why no progress here? My wild guess is that first of all people, who need scalable application tend to ignore JPA and Hibernate in areas where high performance is needed. Usually people go with SQL dressed in Spring Framework JDBCTemplate helpers and transaction management. Then scalability is the matter of database capabilities in this area.

另一个趋势是使用No-SQL数据库。有一些解决方案:MongoDB,CouchoDB,Cassandra,Redis,仅举几例。这些通常是谷歌BigTable像键值存储(这是过于简单化,但它或多或少是这种方法背后的想法),如果你接受他们的限制(关系不再容易管理,等等),他们可以扩展到地狱。

The other trend is to use No-SQL databases. There is plany of solutions: MongoDB, CouchoDB, Cassandra, Redis, to name a few. These are usually Google BigTable like key-value storages (this is oversimplification, but it is more or less the idea behind that approach) and they scale as hell, if you accept their limitations (relations are no longer managed easily, etc.).

这篇关于缩放和聚类JPA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆