1
votes

I am building a chat application that consists of a Django web backend with a Node.js/socket.io powered chat server. There will be instances when changes made via the web interface (e.g. banning a user) need to be pushed immediately to the chat server. I can think of the following options:

  • Use a Python-based socket.io client to interface directly with the server (what are some good Python clients?)
  • Use redis or a message queue to do pub/sub of events (seems like overkill)
  • implement a simple TCP wire protocol on a secondary localhost-only port (this could be done using the built-in Node and Python TCP libraries)

What would be the best option?

1

1 Answers

2
votes

Expose a Restful API on the chat server. Then your Django web application can easily make API calls to modify state in the chat server.

Doing anything else is more complicated and most likely unnecessary.