Search code examples
pythonflasktwistedautobahnwamp-protocol

Running Flask and Autobahn WAMP Server on the same port


I understand there is a example on how to run a PythonAutobahn websocket server 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 a WAMP Server, and I cannot find a simple way.

Is there a easy example on how to do it?


Solution

  • Crossbar.io allows you to run Web services (like static or WSGI) together with a WAMP router on 1 port. Please see here.

    Please note that, strictly speaking, there are only WAMP routers and WAMP clients. "server" is a WAMP transport level artifact. Please also note, that we are moving all WAMP router code to Crossbar.io.

    If you are fine with something that "feels like Flask", but works fully asynch., you might be interested in Klein. Please see here and here.