简体   繁体   English

用于Seam应用程序的JBoss AS或Tomcat? 为什么?

[英]JBoss AS or Tomcat for Seam Application? And why?

We're about to deploy a Java web application built using JBoss Seam as the application framework. 我们即将部署使用JBoss Seam构建的Java Web应用程序作为应用程序框架。 We'll be deploying in a clustered setup, as this is an e-commerce application and we're concerned about both high-availability and performance. 我们将在集群设置中进行部署,因为这是一个电子商务应用程序,我们关注高可用性和性能。 We've done all of our development and initial testing with the app deployed to JBoss 5.1, however we've recently become concerned about things like memory footprint and performance, and have debated moving to Tomcat. 我们已经完成了部署到JBoss 5.1的应用程序的所有开发和初始测试,但是我们最近开始关注内存占用和性能等问题,并且已经讨论过迁移到Tomcat。

Our application is an e-commerce application, using the typical multi-tiered app, using JSF for the view, EJB3 for the business layer, and JPA/Hibernate for persistence to a PostgreSQL database. 我们的应用程序是一个电子商务应用程序,使用典型的多层应用程序,使用JSF进行视图,使用EJB3进行业务层,使用JPA / Hibernate进行PostgreSQL数据库的持久化。 We also heavily utilize JBoss Cache 2.x for caching support, and Hibernate Search (Lucene) for search support. 我们还大量利用JBoss Cache 2.x进行缓存支持,并利用Hibernate Search(Lucene)进行搜索支持。

I'd love to hear the opinion of the community on which app server is best for Seam-based applications. 我很想听听社区对哪个应用服务器最适合基于Seam的应用程序的看法。 I realize that we'll have to make some changes to our application architecture (no EJBs, timer service->Quartz scheduler, JBoss Cache->ehCache, etc.) to support the migration. 我意识到我们必须对我们的应用程序架构(没有EJB,计时器服务 - > Quartz调度程序,JBoss Cache-> ehCache等)进行一些更改以支持迁移。 We're comfortable with making those changes, provided they are comparable to what we would get with JBoss. 我们很乐意做出这些改变,只要它们与JBoss的结果相当。

With JBoss, it seems as though the clustered setup is much easier. 使用JBoss,似乎集群设置更容易。 Would we be able to do a clustered setup with Quartz? 我们能用Quartz进行集群设置吗? ehCache? 的Ehcache? As I mentioned, we're currently deploying to JBoss 5.1. 正如我所提到的,我们目前正在部署JBoss 5.1。 Would JBoss 7 give us better performance and a smaller memory footprint? JBoss 7会给我们带来更好的性能和更小的内存占用吗? If we opt for Tomcat, we're leaning towards Tomcat 7. Is there any compelling reason to opt for Tomcat 6.x instead? 如果我们选择Tomcat,我们倾向于Tomcat 7.是否有任何令人信服的理由选择Tomcat 6.x?

I'd love to hear your opinions and experience with this type of setup. 我很想听听你对这种设置的看法和经验。 We've read the documentation. 我们已经阅读了文档。 We've done some proof-of-concept testing with all of the various platforms. 我们已经对所有各种平台进行了一些概念验证测试。 But, it's hard to know what we should run with in production, and don't want to make the wrong choice and then need to re-architect and test everything again because we've made the wrong choice. 但是,很难知道我们应该在生产中运行什么,并且不想做出错误的选择,然后需要重新设计并再次测试所有内容,因为我们做出了错误的选择。 Thanks for any opinions and advice you can provide! 感谢您提供的任何意见和建议!

I don't think anyone can give a definite answer to your question with such a broad definition of your system. 我认为任何人都无法用如此广泛的系统定义给出明确的答案。

I'm currently using Seam/JBoss 5 in a similar setup (oracle instead of postgres) mainly due to one reason: support. 我目前在类似的设置中使用Seam / JBoss 5(oracle而不是postgres)主要是由于一个原因:支持。 Having RedHat professional services support in the tightly integrated world of JBoss and Seam is in itself something you should not disregard. 在紧密集成的JBoss和Seam世界中拥有RedHat专业服务支持本身就是你不应该忽视的东西。 Especially in a production environment. 特别是在生产环境中。 Even if you don't have it now, it allows you the comfort to know that you can do so in the future (if needed). 即使您现在没有它,它也让您感到舒适,知道您将来可以这样做(如果需要)。

That said, opting for one or the other setup will probably require that you performance test your application first in order to discover where exactly you've got a problem (assuming you do). 也就是说,选择一个或另一个设置可能需要您首先对您的应用程序进行性能测试,以便发现您遇到问题的确切位置(假设您这样做)。 After all, is session size to the server's implementation or you storing too much information on the session? 毕竟,是服务器实现的会话大小还是在会话中存储了太多信息? Are you using session replication or not? 您是否正在使用会话复制? Do you do AJAX? 你做AJAX吗?

Most of the times, performance improvement comes from the implementation -> performance testing -> implementation cycle rather than from changing implementation technologies. 大多数情况下,性能改进来自实现 - >性能测试 - >实施周期,而不是来自实施技术的变化。 Hey, even Facebook uses MySQL for something everyone would immediately consider it unsuitable for (public profiles - 600+ million of them). 嘿,即使Facebook使用MySQL,每个人都会立即认为它不适合(公开的个人资料 - 其中有6亿多个)。

The answer is - 'It depends'. 答案是 - '这取决于'。

You can consider the following aspects for making an informed decision: 您可以考虑以下几个方面做出明智的决定:

  • Whether you want to code using only standard API (Java EE) or depend on implementation-specific features 是否要仅使用标准API (Java EE)进行编码或依赖于特定实现的功能
  • Ease of configuration and maintenance of your infrastructure 易于配置维护您的基础架构

From my personal experience - we deploy complex apps on JBoss and simple one on Tomcat/Jetty. 根据我的个人经验 - 我们在JBoss上部署复杂的应用程序,在Tomcat / Jetty上部署简单的应用程序。

Quartz supports clustering as well as Ehcache do. Quartz支持集群以及Ehcache。

For most of JBoss's servlet container service is managed by an internal tomcat container, this is until JBoss 6. 对于大多数JBoss的servlet容器服务由内部tomcat容器管理,这直到JBoss 6。

JBoss is a application server while tomcat is a servlet container. JBoss是一个应用程序服务器,而tomcat是一个servlet容器。 I hardly think you should make drastic change to your existing codes to adapt to Tomcat for this reason. 因为这个原因,我几乎认为你不应该对你现有的代码做出重大改变以适应Tomcat。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM