Roshan A Roshan A -4 years ago 141
Node.js Question

chat application as separate endpoint

I am planning to design the chat(web socket) application for my eCommerce django REST application.
What is the best design

  1. Integrate the chat inside application inside the same django REST server

  2. Deploy chat as a separate end point for chat only.
    If put different server and db for chat. how we communicate with rest sever to validate.? and whats the best design. ?

Answer Source

As per the discussion in Chat.

Here is the architecture:

enter image description here

  • Your Chat app will run separately and will have no impact on your main app.
  • I suggest using a different Database for Chat (MongoDB recommended but you can create separate MySQL DB too) to not put Chat burden on main DB.
  • Keep the authentications on REST server and not allow Chat server to access main DB. Create an endpoint when you need it.
  • You can move Chat to a different server too in future, if you need to.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download