Alternatives lib for WAMP clients ?

#1

I know you have little time, I’m justing pushing ideas in the suggestion box, don’t mind me.

I can see at leat 2 libraries that would benefit from a WAMP client integration.

First :

Circuit : http://circuitsframework.com/

It’s pure Python and works from 2.6 to 3.4. A good alternative to trollus and doesn’t require any compilation.

Gevent :

I think we talked about it last year. It’s more about getting the gevent community in the boat with us.

0 Likes

#2

Hi Michel,

I know you have little time, I'm justing pushing ideas in the suggestion
box, don't mind me.

No, this is highly welcome! Thanks for the pointers/thoughts. I am definitely interested in findings like these .. my radar reach is limited;)

I can see at leat 2 libraries that would benefit from a WAMP client
integration.

First :

Circuit : http://circuitsframework.com/

It's pure Python and works from 2.6 to 3.4. A good alternative to
trollus and doesn't require any compilation.

I've been skimming over the docs of circuits a little. Here are my thoughts:

- they talk "components" .. which is interesting. However, I think what they mean is more like a component framework for within Python-only programs, not general cross-language, networked components

- they have invented their own asynchronous networking stuff under the hood (not using any Twisted, asyncio/Trollius, etc). Huh. I think this is a bad idea. Python definitely does not lack in options here. In fact, it is my view that Python is at a distinct disadvantage compared to Node for example. In Node, there is _one_ way of doing anything async. - network, disk, whatever. That is _huge_. Python is fragmented in this respect.

This latter is a bummer for me. Why reinvent the wheel (asynch networking) .. a 5th time?

But there is a least-common denominator integration point into WAMP:

Crossbar.io supports a REST-WAMP bridge (currently only Publisher role, but the other 3 are just a matter of getting it done).

Gevent :

I think we talked about it last year. It's more about getting the gevent
community in the boat with us.

Absolutely:
https://bitbucket.org/Jeffrey/gevent-websocket/issue/57/wamp-v2-support

gevent-websocket _seems_ to be the "way to go" when doing WebSocket on gevent .. not aware of any other lib.

Regarding support for Python networking frameworks in general:

- Twisted -> AutobahnPython
- asyncio/Trollius -> AutobahnPython
- gevent -> gevent-websocket
- Tornado -> https://github.com/tavendo/AutobahnPython/issues/314

Are there any more (significant)?

/Tobias

···

Am 04.01.2015 um 07:55 schrieb Michel Desmoulin:

0 Likes

#3

Hi Tobias,

···

2015-01-04 9:25 GMT+01:00 Tobias Oberstein tobias.o...@gmail.com:

Hi Michel,

Am 04.01.2015 um 07:55 schrieb Michel Desmoulin:

I know you have little time, I’m justing pushing ideas in the suggestion

box, don’t mind me.

No, this is highly welcome! Thanks for the pointers/thoughts. I am definitely interested in findings like these … my radar reach is limited;)

I can see at leat 2 libraries that would benefit from a WAMP client

integration.

First :

Circuit : http://circuitsframework.com/

It’s pure Python and works from 2.6 to 3.4. A good alternative to

trollus and doesn’t require any compilation.

I’ve been skimming over the docs of circuits a little. Here are my thoughts:

  • they talk “components” … which is interesting. However, I think what they mean is more like a component framework for within Python-only programs, not general cross-language, networked components

  • they have invented their own asynchronous networking stuff under the hood (not using any Twisted, asyncio/Trollius, etc). Huh. I think this is a bad idea. Python definitely does not lack in options here. In fact, it is my view that Python is at a distinct disadvantage compared to Node for example. In Node, there is one way of doing anything async. - network, disk, whatever. That is huge. Python is fragmented in this respect.

This latter is a bummer for me. Why reinvent the wheel (asynch networking) … a 5th time?

Technically, circuits predate asyncio… if anything, circuits didn’t reivent the wheel. From a high level API, it’s more pythonic than both Tornado (at least when it was callback only) and Twisted. It’s just it’s a low key framework, much like CherryPy. It doesn’t mean it doesn’t have its place.

0 Likes

#4

Technically, circuits predate asyncio... if anything, circuits didn't
reivent the wheel. From a high level API, it's more pythonic than both
Tornado (at least when it was callback only) and Twisted. It's just it's a
low key framework, much like CherryPy. It doesn't mean it doesn't have its
place.

By the way, this wasn't meant to push for a WAMP fragmentation by
supporting every single framework out there. I agree with you Tobias, pick
the makor frameworks and stick to them only. At least, from a semi-official
perspective.

···

--
- Sylvain
http://www.defuze.org
http://twitter.com/lawouach

0 Likes

#5

Hi Sylvain,

    Technically, circuits predate asyncio... if anything, circuits
    didn't reivent the wheel. From a high level API, it's more pythonic

Ok, didn't knew that.

    than both Tornado (at least when it was callback only) and Twisted.

FWIW, Twisted predates _all_ others as far as I know. Wrong?

And Twisted had "co-routine" style (inlineCallbacks) when that wasn't even a thing in Python. I am still impressed by the ingenious way they do that (now copied by Trollius I think .. using exceptions to "unwrap generators").

    It's just it's a low key framework, much like CherryPy. It doesn't
    mean it doesn't have its place.

By the way, this wasn't meant to push for a WAMP fragmentation by
supporting every single framework out there. I agree with you Tobias,
pick the makor frameworks and stick to them only. At least, from a
semi-official perspective.

Yeah;)

FWIW, I find it mildly ironic that Python has a philosophy of (which I subscribe to)

"There should be one-- and preferably only one --obvious way to do it."

https://www.python.org/dev/peps/pep-0020/

but then there are like half a dozen ways of doing async;)

Other languages have that "issue" also. JavaScript does not (wrt to async that is). Erlang does not.

/Tobias

···

Am 04.01.2015 um 10:03 schrieb Sylvain Hellegouarch:

0 Likes

#6

I’m just suggesting circuit to allow clients to be written in Python 2 and 3 without compilation. Alhough, I’m actually considering joining the porting effort for twisted, but not sure I can invest the time. At least this would allow crossbar to be portable too.

···

On Sunday, January 4, 2015 10:22:47 AM UTC+1, Tobias Oberstein wrote:

Hi Sylvain,

Am 04.01.2015 um 10:03 schrieb Sylvain Hellegouarch:

Technically, circuits predate asyncio... if anything, circuits
didn't reivent the wheel. From a high level API, it's more pythonic

Ok, didn’t knew that.

than both Tornado (at least when it was callback only) and Twisted.

FWIW, Twisted predates all others as far as I know. Wrong?

And Twisted had “co-routine” style (inlineCallbacks) when that wasn’t
even a thing in Python. I am still impressed by the ingenious way they
do that (now copied by Trollius I think … using exceptions to “unwrap
generators”).

It's just it's a low key framework, much like CherryPy. It doesn't
mean it doesn't have its place.

By the way, this wasn’t meant to push for a WAMP fragmentation by

supporting every single framework out there. I agree with you Tobias,

pick the makor frameworks and stick to them only. At least, from a

semi-official perspective.

Yeah;)

FWIW, I find it mildly ironic that Python has a philosophy of (which I
subscribe to)

“There should be one-- and preferably only one --obvious way to do it.”

https://www.python.org/dev/peps/pep-0020/

but then there are like half a dozen ways of doing async;)

Other languages have that “issue” also. JavaScript does not (wrt to
async that is). Erlang does not.

/Tobias

0 Likes

#7

Probably because most of us were not born in The Netherlands!

“Although that way may not be obvious at first unless you’re Dutch.”

:wink:

In such cases, I take ‘at first’ to mean ‘the first few decades’…

···

Op zondag 4 januari 2015 10:22:47 UTC+1 schreef Tobias Oberstein:

Hi Sylvain,

FWIW, I find it mildly ironic that Python has a philosophy of (which I
subscribe to)

“There should be one-- and preferably only one --obvious way to do it.”

https://www.python.org/dev/peps/pep-0020/

but then there are like half a dozen ways of doing async;)

0 Likes

#8

    FWIW, I find it mildly ironic that Python has a philosophy of (which I
    subscribe to)

    "There should be one-- and preferably only one --obvious way to do it."

    https://www.python.org/dev/peps/pep-0020/
    <https://www.python.org/dev/peps/pep-0020/>

    but then there are like half a dozen ways of doing async;)

Probably because most of us were not born in The Netherlands!

"Although that way may not be obvious at first unless you're Dutch."
:wink:
In such cases, I take 'at first' to mean 'the first few decades'...

:wink:

I'm German, and still it was immediately "obvious" to me.

Does that mean I should look for Dutch ancestors in my family? :wink:

Cheers,
/Tobias

0 Likes