我应该为客户端-服务器 osgi 使用哪个库
我正在考虑在典型的 java-swing 客户端-服务器应用程序中使用 osgi。
我想将服务器代码分解为 osgi 服务,然后将其中一些标记为“远程导出”,然后提供一个捆绑包,使这些服务可供客户端使用。客户端还将使用 osgi 并包含一个连接到服务器的捆绑包,并使导出的服务可用作本地服务。
我们目前使用一些类似 rmi 的代码,它仅通过套接字公开单个接口。
我调查过。
- r-osgi 最后发布于 2009 年 1 月,当我尝试时出现空指针异常,但不会自动出现本地注册服务
- cfx 似乎仅限soap/rest。而且我们有很大的有效负载
- ecf 使用外部 eclipse 时没有太多文档。不确定要下载什么或如何开始
其他注意事项: - 我们需要它来使用 ssl 并在连接时应用一些身份验证 - 如果服务器重新启动,则需要重新连接 - 代码实际上是 scala
我可以添加到我们现有的类似 rmi 的代码中,但我宁愿使用现有的库
感谢您的任何建议或经验
I am considering using osgi in a typical java-swing client-server application.
I would like to break the server code into osgi services and then mark some of them as 'remotely exported' and then have a bundle which makes these services avaliable to the client. The client would also use osgi and include a bundle which connects to the server and makes the exported services available as local services.
We currently use some rmi-like code which just exposes a single interface over a socket.
I have looked into.
- r-osgi last release Jan 2009, got a null pointer exception when I tried it, doesn't automatically register services locally
- cfx appears to be soap/rest only. and we have large payloads
- ecf Not much documentation when using outside eclipse. Not sure what to download or how to get started
Other points to note:
- We need it to use ssl and also apply some authentication on connecting
- It needs to reconnect if the server gets restarted
- The code is actually scala
I could just add to our existing rmi-like code but I'd rather use an existing library
Thanks for any advice or experiences
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
自OSGi 4.2规范以来,存在远程服务规范(第 13 章)。
到目前为止,只有 3 个框架实现了该规范:ECF、Apache CFX 和 Paremus。
我使用 ECF 是因为它是目前最成熟的开源实现。顺便说一句,ECF 包括 R-Osgi 作为可用的传输机制(R-OSGi 独立时不符合 OSGi 4.2)以及其他发现和分发机制(Zookeper、REST...)。 这里有一个很好的集成商指南。
OSGi 大师 Neil Bartlett 还向我推荐了(通过 twitter ;)Paremus 实现。他说这是最全、功能最齐全的,但要花钱。也许你应该看一下。
Since OSGi 4.2 specification, there exist Remote Services Specification (chapter 13).
By now, only 3 frameworks implements this specification: ECF, Apache CFX and Paremus.
I am using ECF because is the most mature open-source implementation right now. BTW, ECF includes R-Osgi as an available transport mechanism (R-OSGi is not OSGi 4.2 compliant as standalone) and other discovery and distribution mechanisms (Zookeper, REST...). There is a good integrators guide here.
OSGi guru Neil Bartlett also recommended me (via twitter ;) the Paremus implementation. He said that is the most complete and functional one, but it cost money. Maybe you should take a look.