应用服务器启动时间比较?

发布于 2024-08-04 21:49:34 字数 1540 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(3

携余温的黄昏 2024-08-11 21:49:34

我认为您正在寻找“调查结果: Java EE 容器 – 天堂还是地狱?”,来自 JavaRebel JRebel 人员。

I think you are looking for the "Survey Results: Java EE Containers – Heaven or Hell?" from the JavaRebel JRebel guys.

情话墙 2024-08-11 21:49:34

有很多关于此的文章,因此很难具体知道您指的是哪一篇。

话虽如此,这实际上取决于技术堆栈。如果您想要完整的 J2EE 实现而不是仅仅 J2EE 容器,那么启动时间将会非常不同。

例如,Tomcat 可以在几秒钟内启动。在我的机器上大约需要 1-2 秒。当然这是一个J2EE容器。它不包括 EJB 等功能。但如今,谁真正需要那个。

完整的 J2EE 实现(例如 JBoss 和 Weblogic)将需要更长的服务器启动时间。一般在半分钟到几分钟左右。

再次强调,您确实需要确定您想要 J2EE 堆栈的哪一部分,如果您不打算完全使用它,那么 Tomcat 非常适合快速启动。

同样,即使您使用 Tomcat 进行开发,并不意味着您需要将其用于生产。这并不是说它不是一个好的生产服务器,它只是更轻量级。

There are a number of articles about this, so it's hard to know specifically which one you're referring to.

That being said, it really depends on the tech stack. If you want a full J2EE implementation versus just a J2EE container, then the startup times will be very different.

For example, Tomcat can be started in seconds. On my machine in about 1-2 seconds. Of course this is a J2EE container. It doesn't include features such as EJB's. But these days, who really needs that.

Full J2EE implementations like JBoss and Weblogic for example will require much longer server startup times. Generally in the half a minute to some minutes.

Again, you really need to decide exactly what part of the J2EE stack you want, and if you're not going to fully use it, then Tomcat is great for quick startups.

As well, even if you use Tomcat for development, doesn't mean you need to use it for production. That isn't to say it isn't a good production server, it's just lighterweight.

叹梦 2024-08-11 21:49:34

让我们从这样的想法开始:应用程序应该仅以完整的形式部署以进行集成测试。这种情况一天可能会发生两次。在所有其他时间,您都进行单元和本地集成测试(即使用实际数据库连接的 JUnit 测试),并且这些测试的启动时间几乎为零。

我的开发活动是这样的:

  • 同时编写(模拟)单元测试和代码;在代码运行之前,可能需要运行 20 次单元测试,因为我希望
  • 为主要情况编写本地集成测试;运行测试可能需要 3 或 5 次,然后我确定可以
  • 打包整个应用程序并通过 UI 演练场景一次或两次

在这样的时间分配中,启动时间并不会占用我太多时间表现。

因此,与其抱怨 AS,不如从一开始就努力组织开发过程。

Let's start with the idea that application should be deployed in complete form only for integration testing. That happens may be twice a day. All other times you do unit and local integration testing (i.e. JUnit test with actual database connection), and those tests have next to zero startup time.

My dev activity is like this:

  • write (mocked) unit tests and code at the same time; run unit tests may be 20 times before the code works as I expect
  • write local integrated tests for major cases; run the tests may be 3 or 5 times before I'm sure it's ok
  • package the whole application and do a walk-through of the scenario via UI once or twice

In the time allocation like that AS startup time doesn't take much of my performance.

So instead of complaining about AS it's better to make an effort to organize the development process in the first place.

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