any websocket <=> WAMP2 bridge example?

60 views
Skip to first unread message

Icham Achtir

unread,
Feb 25, 2015, 5:55:08 PM2/25/15
to autob...@googlegroups.com
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 


Alexander Gödde

unread,
Mar 1, 2015, 5:28:09 AM3/1/15
to autob...@googlegroups.com
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

Tobias Oberstein

unread,
Mar 1, 2015, 5:56:54 AM3/1/15
to autob...@googlegroups.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

Icham Achtir

unread,
Mar 2, 2015, 4:20:00 PM3/2/15
to autob...@googlegroups.com
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 ;)
> --
> 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.
Reply all
Reply to author
Forward
0 new messages