mercredi 11 novembre 2020

Web application with realtime updates

I am building an app which by desing should be highly interactive - users set up simulation by adding, and connecting nodes on the canvas. Each node has its state and can process information in a different way. Next, users can interact with nodes which causes flow of information through the created network. Also nodes can generate traffic periodically too. Application presents what information and when arrived to/left a node. For a general approach I have chosen event-based architecture such that interactions and infromation arrivals to nodes can be modeled as events. However I have trouble choosing more specific architecture. I am considering two solutions:

  • Leave nodes logic for processing information on frontend and for a backend leave storing results in db. (But I was taught that logic on frontend is bad)
  • All logic on backend and communicate with frontend via websockets which will allow realtime updates. However I dont know how to solve problem of multiple users at a time. Different thread per session?

For a frontend I am using angular + konvajs and for backend spring boot.

Could you please advise me what to do?

Aucun commentaire:

Enregistrer un commentaire