Running Flask and Autobahn WAMP Server on the same port

I understand that there is an example of how to start a PythonAutobahn webserver and a Flask server together in twisted (see below):

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/websocket/echo_wsgi/server.py

However, I would like to do the same with WAMP Server and I cannot find an easy way.

Is there a simple example on how to do this?

+3


source to share


2 answers


Crossbar.io allows you to run web services (like static or WSGI) along with a WAMP router on the same port. See here .

Note that, strictly speaking, there are only WAMP and WAMP routers. "server" is a WAMP transport layer artifact. Also note that we are moving all of the WAMP router code to Crossbar.io.



If you're okay with something that "looks like Flask" but works entirely asynch, you might be interested in Klein . See here and here .

+1


source


It is not clear from your question if the + Flask + WebSocket + WAMP key is a key or is it also required for WebSocket support to be provided by Autobahn.



If this is the first one and Autobahn is optional, here is an example of a simple Flask and WebSocket core: flask-as-example Unlike Autobahn, it uses gevent rather than Twisted or asyncio for its concurrency.

0


source







All Articles