使用Java 6的嵌入式http服务器进行IPC

发布于 2024-12-10 08:34:18 字数 315 浏览 0 评论 0原文

我正在考虑使用 Java 6 的嵌入式 HTTP 服务器,用于带有 Java 守护进程的某种 IPC。它工作得很好,而且已经与所有 Java 6 安装捆绑在一起,这很好。不需要额外的库。

但是,我想知道是否有人在负载较重的生产环境中尝试过此操作。表现好吗?我应该寻找更强大的东西,例如 Tomcat 或 Jetty?

I am considering using Java 6's embedded HTTP server for some sort of IPC with a Java daemon. It works pretty well and it's nice that's already bundled with all Java 6 installations. No need of additional libraries.

However, I would like to know if someone has tried this with production environments with heavy load. Does it perform well? Should I be looking for something more robust such as Tomcat or Jetty?

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

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

发布评论

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

评论(2

泪意 2024-12-17 08:34:18

好吧,尽管说 Java 的坏话让我很伤心,但我真的不推荐将它用于生产用途或任何类型的大量使用场景。尽管它对于单元/集成测试之类的小东西效果很好,但当它被密集使用时,特别是当您同时将它用于大量连接时,它会出现很大的内存问题。我遇到了与此处描述的问题类似的问题:

http://neopatel.blogspot .com/2010/05/java-comsunnethttpserverhttpserver.html

出于同样的原因,Jetty 不太适合大量生产使用。如果我是你,我会选择 Tomcat。

作为替代方案,我相信您可以考虑使用 Java 消息传递服务作为进程间通信的替代方案,并且只需运行一个 JMS 服务器(如 Active MQ)

Well, as much as it saddens me to say bad things about Java, I'd really not recommend it for production use, or any kind of heavy use scenario. Even though it works well for small stuff like unit/integration tests, it has big memory issues when it is used intensivelly, especially when you use it for a big number of connections at once. I've had similar issues to the ones described here:

http://neopatel.blogspot.com/2010/05/java-comsunnethttpserverhttpserver.html

And Jetty is not that good for heavy production usage for pretty much the same reason. I'd go with Tomcat if I were you.

As an alternative, I believe you could consider Java Messaging Service as an alternative to Inter Process Communications and just have a JMS server running (like Active MQ)

美男兮 2024-12-17 08:34:18

如果您想要 Java 附带的东西,请查看 RMI 或 RMI/IIOP。

If you want something that ships with Java have a look at RMI or RMI/IIOP.

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