Answer the question
In order to leave comments, you need to log in
Is it worth using WebSocket in this implementation?
Good time!
The task was to implement the following functionality: it is necessary that when a user enters a certain page, it is blocked for others. In the current implementation, I use a server raised on AIOHTTP and communicate with the frontend via WebSocket. You also need to check if the user performs any actions, if not for a while, then the page is released for other users. Used pages are stored in the MongoDB database.
The question is, is the chosen architecture the right one? Can it be simplified somehow? Are WebSockets really necessary here?
Answer the question
In order to leave comments, you need to log in
In addition to the fact that the client itself transmits information to the server, WebSocket allows the server to interrogate a specific client and inform other clients that the page is blocked / unblocked. Otherwise, all clients themselves must periodically poll the server about the state of the pages, which increases the load and delays in obtaining this information.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question