noobprog
noobprog

Reputation: 337

Websocket connection between two servers

Im using python tornado as web server and I have a backend server and a frontend server. I want to create browser-frontend-backend connection. Can anyone help me how to do this? I know how to create websocket connection between frontend and browser but I have no idea how to connect my frontend server to backend server to stream realtime data parsed by my backend server.

Upvotes: 0

Views: 1912

Answers (2)

Dr. Jan-Philip Gehrcke
Dr. Jan-Philip Gehrcke

Reputation: 35826

WebSocket was designed for low-latency bidirectional browser<->service communication. It's placed on top of TCP/IP and brings along some overhead. It was designed to solve all the problems that you simply do not have when it's about front-end<->back-end communication, because there we're talking about a defined environment which is under your control. Hence, I would recommend going back to the basics and do simple TCP/IP communication between your front-end and back-end.

Upvotes: 0

Who8MyLunch
Who8MyLunch

Reputation: 1190

It looks tornado had an ability to also operate as a websocket client. Perhaps you could use this with your front end server acting as a client to the backend server.

Upvotes: 2

Related Questions