python有类似jndi的服务吗?
我想知道python是否有类似Java的JNDI的服务。
更具体地说,我想要一种服务,提供者可以自行注册,然后消费者可以询问某些提供者端点在哪里。
例如,假设我想为我所有的朋友实现一个邮箱。他们每个人都有自己的终点,所以friend1,friend2,friend3每个人都有自己的终点。此外,每个端点都可以随着时间的推移而变化,因此,如果最初,我们从以下开始:
friend1 -> end-point1
friend2 -> end-point2
friend3 -> end-point3
在某个时刻之后,我们可能会:
friend1 -> end-point1
friend2 -> end-point3
friend3 -> end-point4
服务发现守护进程应该愿意适应系统中的这些动态变化。
I wanted to know if python had any service like Java's JNDI.
More specifically, I want a service where providers can register themselves and then consumers can ask fro where certain provider end-points are.
For example, assume that I want to implement a mailbox for all my friends. Each of them have their own end-point, so friend1, friend2, friend3 each have their own end point. Furthermore, each end-point can change over time, so if initially, we start off with:
friend1 -> end-point1
friend2 -> end-point2
friend3 -> end-point3
We may, after some point have:
friend1 -> end-point1
friend2 -> end-point3
friend3 -> end-point4
The serice discovery daemon should willing to accomodate these dynamic changes in the system.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有完全相同的内容,但您可以阅读这项研究来大致了解什么可用的。请记住,如果您想同时使用 Python 和 Java 技术,您始终可以使用 Jython。
最后,我倾向于同意@msw,JNDI 可能有点矫枉过正。
You don't have the exact equivalent, but you can read this study to get an overview of what available. Remember you can always use Jython if you feel like using Python and Java tech together.
In the end, I tend to agree with @msw, JNDI is probably overkill.