title: How to synchronize data between multiple clients on Node.js Server
body: <p>The following diagram is a basic representation of a web application I am creating.</p>
  
  <p><a href="https://i.stack.imgur.com/Gfhc4.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Gfhc4.png" alt="Node.js Web Application Schematic"></a></p>
  
  <p>The basic operation of the application is as follows:</p>
  
  <ol>
  <li>Client sends request for data from node.js server</li>
  <li>Server receives request.</li>
  <li>Server fetches data from database.</li>
  <li>Server sends data back to client as JSON string.</li>
  <li>Client receives data stores it as a JSON object and binds it to a table.</li>
  </ol>
  
  <p>This all works fine. The problem I am having is best represented by the following situation.</p>
  
  <ol>
  <li>Clients 1 to 4 all complete the steps above (i.e. all have an table of data binded to a JSON object).</li>
  <li>Client 1 now sends an update request to the server.</li>
  <li>Server receives request.</li>
  <li>Server updates database.</li>
  <li>Server sends response to client 1 indicating successful operation and updates JSON object binded to table.</li>
  <li><strong>THE PROBLEM</strong> JSON data shown on clients 2 to 4 is now no longer in sync with the database.</li>
  </ol>
  
  <p>So my question is how do I keep the JSON data on all 4 (or more) of my clients in real-time sync with the database on my Node.js server?</p>