Python on the server but javascript clients?

#1

Just need some clarification: I need to use Twisted python on the server (I have legacy Twisted code) and my clients are all browsers/javascript. But I’ve just read that Crossbar (or some other router) is required for WAMP javascript clients. In that case, how could the clients talk to the Twisted server with Crossbar in between? I must be missing something, or is it even possible?

0 Likes

#2

Sure.

Browsers can be WAMP clients using a WAMP client library such as AutobahnJS.

Twisted programs can be WAMP clients using a WAMP client library such as AutobahnPython/Twisted.

Then your browser clients and your Twisted program clients both connect to a WAMP router such as Crossbar.io

Browser ---> Crossbar.io <---- Twisted program

and then all of your components can talk freely to each other

Browser <----> Twisted program

This latter diagram illustrates that the router in the middle is transparent to WAMP components .. _logically_ they talk peer-to-peer.

Cheers,
/Tobias

···

Am 31.12.2014 um 10:20 schrieb Carlos Choy:

Just need some clarification: I need to use Twisted python on the server
(I have legacy Twisted code) and my clients are all
browsers/javascript. But I've just read that Crossbar (or some other
router) is required for WAMP javascript clients. In that case, how
could the clients talk to the Twisted server with Crossbar in between?
I must be missing something, or is it even possible?

0 Likes