客户端可以访问Corba IMR来获取服务器信息吗?

发布于 2024-07-29 02:59:32 字数 32 浏览 1 评论 0原文

客户端是否可以访问 IMR 来获取服务器的主机名?

Is it possible for a client to access the IMR to get the host name of the servers?

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

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

发布评论

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

评论(2

旧夏天 2024-08-05 02:59:32

这是间接可能的。 因为您将从 IMR(实施存储库)收到“位置转发”。 您的 ORB 必须能够从对象重定向中提取主机地址。

问题是:您想用这些信息做什么?

CORBA 是(应该)位置透明的...因此,不要添加位置相关的服务!

This is possible indirectly. As you'll receive a "location forward" from the IMR (implementation repository). Your ORB must be able to extract the host's address from the object redirection.

The question is: What do you want to do with this information?

CORBA is (shall be) location transparent... Thus, do not add location dependent services!

゛清羽墨安 2024-08-05 02:59:32

即使 tuergeist 建议的(主机地址)也不一定是服务器运行的位置。 首先也是最重要的,服务器可能实际上并未运行,但仍可能向 IMR 注册。 其次,主机名可能映射到许多IP地址; IP 地址可以使用某种附加的容错网络层解析为多台机器。 最后,如果 CORBA 的容错规范与 IMR 相结合,那么就会有另一层间接性。

teurgeist提出的问题是最恰当的,不添加位置依赖服务的建议是明智的。

作为脚注,依赖任何 IMR 行为也是不好的,因为 IMR 是 CORBA 规范中最不明确的方面之一。 基本上,它最终会说:“供应商可以提供一个,以下是它可以做的事情”。 就是这样。 因此,如果您依赖于特定行为或特定 API,您就会立即将自己与某个供应商的 IMR 特定实现联系起来。

Even what tuergeist suggests (the host address) isn't necessarily where a server is running. First and foremost, the server may not actually be running but may still be registered with the IMR. Second, the host name may map to many IP addresses; an IP address may resolve to multiple machines using some sort of additional fault-tolerance network layer. Finally, if CORBA's Fault Tolerant spec is combined with IMR, then there's another level of indirection.

The question raised by teurgeist is the most appropriate, and the advice of not adding location-dependent services is sage.

As a footnote, relying on any IMR behavior is also bad, because the IMR is one of the most underspecified aspects of the CORBA spec. Basically, it ends up saying, "a vendor can provide one, and here are the kinds of things it can do". That's about it. So, if you rely on specific behaviors or specific APIs, you've instantly tied yourself to one vendor's specific implementation of the IMR.

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