JavaEE应用服务器还是轻量级容器?
首先我要说的是,这不是我的实际情况,但我问这个问题更多是为了我自己的知识,并在这里听取其他人的意见。
我使用过 Spring 和 EJB3/JBoss,对于我构建的较小类型的应用程序,Spring(需要时+Tomcat)使用起来要简单得多。然而,当扩展到需要负载平衡和集群等功能的大型应用程序时,Spring 仍然是一个可行的解决方案吗?或者当您开始变得足够大而需要像 EJB3/JBoss 这样的解决方案时,是时候转向它了?我不确定我是否已经足够清楚地界定问题范围以获得一个好的答案,所以请让我知道。
谢谢, 杰夫
Let me preface this by saying this is not an actual situation of mine but I'm asking this question more for my own knowledge and to get other people's inputs here.
I've used both Spring and EJB3/JBoss, and for the smaller types of applications I've built, Spring (+Tomcat when needed) has been much simpler to use. However, when scaling up to larger applications that require things like load balancing and clustering, is Spring still a viable solution? Or is it time to turn to a solution like EJB3/JBoss when you start to get big enough to need that? I'm not sure if I've scoped the problem well enough to get a good answer, so please let me know.
Thanks,
Jeff
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我可以说,在我们相当大的项目(~500K LOC)中,出于性能考虑,我们已经放弃了 JBoss,转而使用 Spring/Tomcat。
J2EE 应用程序容器(以及作为实现的 JBoss)的关键功能之一是在不同类型的事务资源之间进行透明分布式事务的可能性。这是个好主意,它大大简化了 JMS 消息传递和数据库操作的协调。但当涉及到高贯穿的必要性时,这就成了一个问题。不幸的是,分布式事务以其速度慢而闻名。
从 JBoss 迁移到 Spring 并不是一件容易的事,但是这是可能的,而且除了极少数例外,Spring/Tomcat 可以被考虑作为 JBoss 的全功能替代品。
I could say that in our project which quite large (~500K LOC) we've got rid of JBoss in favour of Spring/Tomcat for a performance sake.
One of J2EE Application container (and JBoss, as an implementation) key features is a possibility of transparent distributed transactions among different kind of transactional resources. That is great idea and it simplifies coordination of, let's say, JMS messenging and database operations a lot. But when it comes to a necessity of high throughout it becomes a problem. Unfortunately, distributed transactions are notable for its slow speed.
It isn't an easy task to migrate from JBoss to Spring, however it's possible and Spring/Tomcat could be considered, with quite rare exceptions, as fully functional replacement for JBoss.
Tomcat 可以集群。
负载平衡通常是独立于应用程序服务器的硬件解决方案(例如 BigIP 或 Cisco ACE)。
Spring 可以是企业级的,就像 EJB 一样。没有任何分界线表明 Spring 无法处理它。
Tomcat can be clustered.
Load balancing is usually a hardware solution (e.g., a BigIP or Cisco ACE) that's independent of app server.
Spring can be enterprise, just like EJB. There's no dividing line that says Spring can't handle it.