发布/订阅Lib for Python? [英] Publish/Subscribe Lib for Python?
本文介绍了发布/订阅Lib for Python?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有人知道能够让我使用
发布/订阅通讯的框架或库?我想创建一个服务器(使用Python)
在Unix机器上运行,它将接受客户端连接(来自GUI使用wxPython构建的
)并向它们发布实时数据更新。关于从哪里开始的任何
建议?
谢谢。
AB
Does anyone know of a framework or library that will enable me to use
publish/subscribe comms? I want to create a server (using Python)
running on a Unix box that will accept client connections (from GUIs
built with wxPython) and publish realtime data updates to them. Any
advice on where to start?
Thanks.
A.B.
推荐答案
>>>>> "阿德里安" == Adrian B< bo ** @ swirve.com>写道:
Adrian>有没有人知道一个框架或库将
Adrian>让我使用发布/订阅通讯?我想
Adrian>创建一个在Unix机器上运行的服务器(使用Python)
Adrian>将接受客户端连接(来自使用
Adrian> wxPython构建的GUI)并向其发布实时数据更新。任何
Adrian>关于从哪里开始的建议?
这对于任何特殊的图书馆来说都很简单,如果它确实你只需要b
。
一些选项:
- 客户端打开TCP套接字到服务器作为订阅,服务器转储
所有更改所有连接的TCP套接字。
- 客户端注册其主机,端口添加器与服务器,服务器发送
更新到UDP数据包中的所有订阅客户端。
- UDP广播也可以工作,没有尝试过。
或者,你可以使用类似CORBA(omniORB)的东西更复杂
场景。
谷歌搜索还透露:
http://aspn.activestate.com/ASPN/Coo...n/Recipe/81614
但要注意:该配方所依赖的OSE似乎是在QPL下获得许可的
。
-
Ville Vainio http://tinyurl.com/2prnb
>>>>> "Adrian" == Adrian B <bo**@swirve.com> writes:
Adrian> Does anyone know of a framework or library that will
Adrian> enable me to use publish/subscribe comms? I want to
Adrian> create a server (using Python) running on a Unix box that
Adrian> will accept client connections (from GUIs built with
Adrian> wxPython) and publish realtime data updates to them. Any
Adrian> advice on where to start?
This is easy w/o any special libraries, if it is indeed all you have
to do.
Some options:
- Clients open TCP socket to server as a "subscription", server dumps
all the changes to all the connected TCP sockets.
- Clients register their host, port addrs with server, server sends
updates to all the subscribed clients in UDP packets.
- UDP broadcasts might work too, haven''t tried it.
Or, you could use something like CORBA (omniORB) for more complicated
scenarios.
Googling also revealed:
http://aspn.activestate.com/ASPN/Coo...n/Recipe/81614
But beware: OSE, which that recipe relies on, seems to be licensed
under QPL.
--
Ville Vainio http://tinyurl.com/2prnb
查看Twisted Matrix或可能Spread(使用Python)。快速谷歌
搜索应该有所帮助。
享受,
迈克
Adrian B.写道:
Look to Twisted Matrix or possibly Spread (with Python). Quick google
search for either should help.
Enjoy,
Mike
Adrian B. wrote:
有没有人知道一个框架或库可以让我使用
发布/订阅通讯?我想创建一个服务器(使用Python)在Unix机器上运行,该机器将接受客户端连接(来自使用wxPython构建的GUI)并向它们发布实时数据更新。关于从哪里开始的任何建议?
谢谢。
AB
Does anyone know of a framework or library that will enable me to use
publish/subscribe comms? I want to create a server (using Python)
running on a Unix box that will accept client connections (from GUIs
built with wxPython) and publish realtime data updates to them. Any
advice on where to start?
Thanks.
A.B.
_______________________________________
Mike C. Fletcher
设计师,VR水管工,编码器
http://members.rogers.com/mcfletch/
_______________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://members.rogers.com/mcfletch/
Adrian B.写道:
Adrian B. wrote:
有谁知道一个框架或库,使我能够使用
发布/订阅通讯?我想创建一个服务器(使用Python)在Unix机器上运行,该机器将接受客户端连接(来自使用wxPython构建的GUI)并向它们发布实时数据更新。关于从哪里开始的任何建议?
谢谢。
AB
Does anyone know of a framework or library that will enable me to use
publish/subscribe comms? I want to create a server (using Python)
running on a Unix box that will accept client connections (from GUIs
built with wxPython) and publish realtime data updates to them. Any
advice on where to start?
Thanks.
A.B.
这篇关于发布/订阅Lib for Python?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文