用于服务管理的 Java 开源框架 [英] Java Open Source Framework for Service Management

查看:33
本文介绍了用于服务管理的 Java 开源框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在基于 Java 的大型分布式系统上工作,因此会有多个服务在多台机器上运行......

Working on a Java-based large distributed system, so there will be multiple services running across multiple machines .....

寻找能够管理这些服务的开源框架(例如启动/停止服务、远程安装新服务等)

Looking for an open source framework to be able to manage these services(e.g. start/stop a service, install a new a service remotely etc.)

Apache Karaf 似乎是一个不错的选择,但在它下面使用了我很难真正理解的 apache felix(一个 OSGi 参考实现)包.特别是在felix中定义和注册一个服务似乎很容易,但是如何远程调用这样的服务呢?您是否需要一个单独的 RPC 机制来实现这一点?似乎很少有链接描述它.一般而言,人们如何使用 OSGi?Apache felix 过时了吗?

Apache Karaf seems to be a good choice, but underneath it uses apache felix (an OSGi reference implementation) bundle which I have a hard time to really understand. In particular, it seems to be easy to define and register a service in felix, but how do you invoke such a service remotely? Do you need to have a separate RPC mechanism to achieve that? There seems to be very few links describe it. In general how do people use OSGi? Is Apache felix out of date?

假设我将拥有自己的 RPC 层(例如基于 RMI 或基于 Netty),还有其他可用于管理服务的框架吗?

Any other framework that can be used to manage services assuming I will have my own RPC layer (say RMI based or Netty based)?

推荐答案

我想您必须指定定义服务的方式.有一些服务,例如使用 RPC 机制的远程服务,例如 EJB 远程调用.定义服务的另一种方法是谈论 Web 服务,使用 SOAP(XML) 或 JAXRS(JSON) 作为传输协议.OSGi中有服务的定义,这只是意味着API(服务定义)和实现的分离.总之,您可以将 OSGi 定义为同一虚拟机中应用程序的 SOA.(它提供了更多,但这是从服务角度看待它的一种方式)

I guess you have to specify the way you define a service. There are services, like remote services that use RPC mechanism, for example EJB remote calls. Another way to define services is to talk of Web-Services, either using SOAP(XML) or JAXRS(JSON) as transport protocol. And there is the definition of services in OSGi which just means a separation of API (service definition) and implementation. As sum-up you could define OSGi as a SOA for Applications within the same VirtualMachine. (it gives much more, but this is one way to look at it from a service perspective)

Apache Karaf 是一个 OSGi 服务器,可与应用程序服务器相媲美,但仅适用于 OSGi 应用程序.它在一个可选的 OSGi 框架之上带来了许多便利的技术.那将是 Apache Felix 或 Eclipse Equinox.两者都是 OSGi 框架,在同一 JVM 中提供基本的 OSGi 基础架构 - SOA.
现在它还有很多其他好处,比如启动和停止服务、更新服务.

Apache Karaf is a OSGi server that is comparable to a Application Server, only it works for OSGi applications. It brings a lot of convenience technologies on top of a choosable OSGi framework. That would be either Apache Felix or Eclipse Equinox. Both are OSGi frameworks that provide the basic OSGi infrastructure - SOA in the same JVM.
Now there are a lot of other benefits of it, like starting and stoping services, updating services.

考虑到 RPC,这可以很容易地实现,例如通过将 OSGi 服务与 CXF 相结合.它可以轻松配置为将 OSGi 服务导出为 CXF 服务.(这是非常 Karaf/CXF 特定的)

Taking the RPC into account this can easily be achieved, by combining OSGi-Services with CXF for example. It can easily be configured to export an OSGi service as CXF service. (this is very Karaf/CXF specific)

Apache Karaf 本身也支持使用 Apache Karaf Cellar 进行集群,它还提供 DOSGi 服务,以便更轻松地跨集群组进行服务通信.DOSGi 代表分布式 OSGi,也可以通过使用 CXF 和许多其他实现来实现.

Apache Karaf itself also supports clustering with Apache Karaf Cellar, which also provides a DOSGi service for easier communication of services across cluster groups. DOSGi stands for Distributed OSGi, which can also be achieved by using CXF and much other implementations.

Apache Felix 和 OSGi 总体上还远未过时.许多 Java EE 应用服务器使用 OSGi 作为其底层技术,以实现模块化和更小的占用空间.
那将是 GlassFish、Websphere、Geronimo 等...

Apache Felix and OSGi in general are far away of being out-of-date. A lot of Java EE Application servers use OSGi as their underlying technology to be modular and have a smaller footprint.
That would be GlassFish, Websphere, Geronimo etc...

这篇关于用于服务管理的 Java 开源框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆