I am making a platform where users submit a message to a board and everyone sees that message (almost instantly). Using AJAX, that message is sent to the Flask server and saved in a database. How do I ensure that other users get this message?
The only solution I have thought of is asking the server for an updated message list every T seconds (for example, run an AJAX call every 5 seconds). Is this the best way with the technology I am using? Anything more optimal?