any websocket <=> WAMP2 bridge example?

#1

Hi,

do you have any example todo a bridge between websocket and wamp2?

actually we can publish from outside to crossbar via the rest bridge

non autobahn app => rest bridge => pub to wamp app

It is possible to do something like that

non autobahn app <=> websocket <=> wamp2 bridge <=> wamp app

there are a lot of python websocket library

using this https://github.com/liris/websocket-client we can connect as client to a websocket

using this https://gevent-socketio.readthedocs.org/en/latest/ we can do a complete django or flask or pyramid app

using this https://github.com/miguelgrinberg/Flask-SocketIO flask app

using this https://bitbucket.org/amagee/gevent-websocket a basic web app

0 Likes

#2

Hi Icham!

We currently only have a REST bridge (which we intend to extend to support to go beyond push).

It is, of course, possible to write a bridge component which receives messages via WebSocket as a transport + some other messaging protocol on top, and then translates this to WAMP calls. This would need to be protocol specific, since WebSocket is just a transport layer without PubSub & RPC functionality.

What protocol does your non-WAMP app use over WebSocket?

Regards,

Alex

···

Am Mittwoch, 25. Februar 2015 23:55:08 UTC+1 schrieb Icham Achtir:

Hi,

do you have any example todo a bridge between websocket and wamp2?

actually we can publish from outside to crossbar via the rest bridge

non autobahn app => rest bridge => pub to wamp app

It is possible to do something like that

non autobahn app <=> websocket <=> wamp2 bridge <=> wamp app

there are a lot of python websocket library

using this https://github.com/liris/websocket-client we can connect as client to a websocket

using this https://gevent-socketio.readthedocs.org/en/latest/ we can do a complete django or flask or pyramid app

using this https://github.com/miguelgrinberg/Flask-SocketIO flask app

using this https://bitbucket.org/amagee/gevent-websocket a basic web app

0 Likes

#3

do you have any example todo a bridge between websocket and wamp2?

WAMP runs over WebSocket natively, so there is no need for a bridge.

/Tobias

0 Likes

#4

thanks for your answer.
I know wamp can run as websocket.
I have read the tutorial django + wamp @sametmax.com
To learn wamp i want to use a different schema for my application.
My external application it's a multipurpose poller, i am using gevent
+ flask to expose a rest api to manage the list of host to pool.
for each host a gevent coroutine is started and loop sending snmp
request to get the trafic.

I know i can use the rest bridge at the end of the loop to publish
the traffic to the crossbar router.
But for learning purpose i'am trying to send the event to a websocket.
Actually using ws4python client i can see the event on a ws4python server.
actualy i do flask + gevent coroutine (via ws4python) -> ws4python-server
And iam trying to do.
flask + gevent coroutine (via ws4python) -> autobhan.python (push
notification) -> crossbar router -> a lot of cool stuff :wink:

···

2015-03-01 11:56 GMT+01:00 Tobias Oberstein <tobias.o...@gmail.com>:

do you have any example todo a bridge between websocket and wamp2?

WAMP runs over WebSocket natively, so there is no need for a bridge.

/Tobias

--
You received this message because you are subscribed to a topic in the
Google Groups "Autobahn" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/autobahnws/XtwQfS0Yup4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
autobahnws+...@googlegroups.com.
To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/autobahnws/54F2F073.4060303%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes