zeromq / pyzmq

PyZMQ: Python bindings for zeromq
http://zguide.zeromq.org/py:all
BSD 3-Clause "New" or "Revised" License
3.74k stars 636 forks source link

ZBeacon Support #423

Closed whitmo closed 9 years ago

whitmo commented 11 years ago

I'd love to use ZBeacon from the python bindings, but have no idea how to add it. Filing this ticket to learn more!

felipecruz commented 11 years ago

I'm also interested.. my thoughts..

It's kind of easy to support via cffi using czmq but.. since pyzmq wraps libzmq it doesn't make sense this way. The ideal solution is to code zbeacon on python.

let's see other people's thoughts

whitmo commented 11 years ago

maybe a cffi solution outside pyzmq would be the fastest way to start? then see what folks do with it?

I need to look at the czmq implementation closer.

-w

On Tue, Oct 8, 2013 at 2:30 PM, Felipe Cruz notifications@github.comwrote:

I'm also interested.. my thoughts..

It's kind of easy to support via cffi using czmq but.. since pyzmq wraps libzmq it doesn't make sense this way. The ideal solution is to code zbeacon on python.

let's see other people's thoughts

— Reply to this email directly or view it on GitHubhttps://github.com/zeromq/pyzmq/issues/423#issuecomment-25920131 .

<=> david "whit" morriss

"If you don't know where you are, you don't know anything at all"

Dr. Edgar Spencer, Ph.D., 1995

minrk commented 11 years ago

PyZMQ will not link against czmq. If anything, such things should be implemented in the binding language (Python), or you can add a separate czmq binding in Python.

whitmo commented 11 years ago

gotcha, sounds like a plan.

-w

On Tue, Oct 8, 2013 at 2:53 PM, Min RK notifications@github.com wrote:

PyZMQ will not link against czmq. If anything, such things should be implemented in the binding language (Python), or you can add a separate czmq binding in Python.

— Reply to this email directly or view it on GitHubhttps://github.com/zeromq/pyzmq/issues/423#issuecomment-25921869 .

<=> david "whit" morriss

"If you don't know where you are, you don't know anything at all"

Dr. Edgar Spencer, Ph.D., 1995

minrk commented 11 years ago

I would be inclined to have Python implementations of the various utility protocols and behaviors in czmq. That way the various backends of pyzmq can be reused, and they can be implemented in a way that plays nice with existing Python apps (tornado or gevent, etc.). At this point, I'm not sure whether these should be implemented as a package that depends on pyzmq, or as part of pyzmq itself. My guess is it will be some of each.

While wrapping czmq with cffi will result in getting to zbeacon in the smallest amount of new code, I don't think it's the best way to go about it for Python. But obviously, you are welcome to build that if you disagree.

whitmo commented 11 years ago

nah, I had sort of mistaken the level of abstraction zbeacon works. I think a zbeacon implementation in pyzmq in python is the way to go.

On Tue, Oct 8, 2013 at 3:17 PM, Min RK notifications@github.com wrote:

I would be inclined to have Python implementations of the various utility protocols and behaviors in czmq. That way the various backends of pyzmq can be reused, and they can be implemented in a way that plays nice with existing Python apps (tornado or gevent, etc.). At this point, I'm not sure whether these should be implemented as a package that depends on pyzmq, or as part of pyzmq itself. My guess is it will be some of each.

While wrapping czmq with cffi will result in getting to zbeacon in the smallest amount of new code, I don't think it's the best way to go about it for Python. But obviously, you are welcome to build that if you disagree.

— Reply to this email directly or view it on GitHubhttps://github.com/zeromq/pyzmq/issues/423#issuecomment-25923705 .

<=> david "whit" morriss

"If you don't know where you are, you don't know anything at all"

Dr. Edgar Spencer, Ph.D., 1995

akatrevorjay commented 11 years ago

https://github.com/michelp/pyczmq

whitmo commented 11 years ago

Hah! thanks for googling that for me. I need to keep up with my friends better :)

On Thu, Oct 10, 2013 at 7:38 AM, Trevor Joynson notifications@github.comwrote:

https://github.com/michelp/pyczmq

— Reply to this email directly or view it on GitHubhttps://github.com/zeromq/pyzmq/issues/423#issuecomment-26049749 .

<=> david "whit" morriss

"If you don't know where you are, you don't know anything at all"

Dr. Edgar Spencer, Ph.D., 1995

minrk commented 11 years ago

There's also zeromq/pyre, which is a Python implementation of ZRE.

akatrevorjay commented 11 years ago

If anyone's interested, I modified zypre, which I believe is what pyre is based off of, but I could be wrong here, to not use gevent and opted for a standard IOLoop: https://github.com/akatrevorjay/zypre

On Fri, Nov 15, 2013 at 7:41 PM, Min RK notifications@github.com wrote:

There's also zeromq/pyre https://github.com/zeromq/pyre, which is a Python implementation of ZRE.

— Reply to this email directly or view it on GitHubhttps://github.com/zeromq/pyzmq/issues/423#issuecomment-28615093 .

dkrikun commented 9 years ago

IMO, zbeacon is a very useful, independent (of czmq/pyczmq) protocol, and it should be implemented directly in pyzmq. See NetMQ beacon for example, cool stuff :smile:.

minrk commented 9 years ago

I agree that implementing it in Python is probably a good idea. I would however suggest that it be implemented outside pyzmq, and then consider upstreaming it into pyzmq after it turns out to be sufficiently valuable, popular, stable, and useful for that to be appropriate.

There's minimal cost to it being a separate package, especially if it's pure Python, and binding it to the pyzmq relatively slow release cycle wouldn't be beneficial.