Erlang OTP 监督 Java 应用程序
我最近熟悉了 Erlang/OTP 技术,我想将其应用于以下方面来监视和监督 Java 应用程序:
- 检测它们的可用性、
- 启动和停止它们
换句话说,我希望 Erlang OTP 管理基础设施能够看到 Java 应用程序作为一个常规的 Erlang 应用程序,可以由这些主管进行管理(发送心跳、按需停止和启动)。可行吗?如果是,我必须使用什么工具?
为了简单起见,我们假设 Java 应用程序是一个指定了 Main 类的简单 jar。允许检测/扩展这些应用程序。
I have recently become familiar with Erlang/OTP technology and I would like to apply it to monitor and supervise Java applications in terms of:
- detecting their availability
- starting and stopping them
In other words I would like Java applications to be seen by Erlang OTP supervisor infrastructure as a regular Erlang apps that can be managed by those supervisors (sending heartbeats, stopping and starting on demand). Is it feasible? If yes, what tools do I have to use?
For simplification, let's assume that a Java application is a simple jar with Main class specified. Instrumenting/extending those applications is allowed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
除非您需要使用现有的 Erlang 应用程序,否则我建议使用 Akka 库,该库深受OTP 将允许您仅使用 JVM 创建主管层次结构。
Unless there's an existing Erlang application that you need to use, I'd suggest using the Akka library, which is greatly influenced by OTP and will let you create supervisor hierarchies using just JVMs.