title: How to update web application with data every n minutes
body: <p>I want to create a web application that displays data from a public api.  I will use d3 (a javascript data-visualization library).  I want to retrieve data from the api every ten minutes, and update my page (say it is traffic, or something).  I have not built many web applications, how do I get the updates?  </p>
  
  <p>Should the js on the client side use a timer to request updates from the server side of my application (perhaps the application is written in Rails or node.js).  The server then makes the api call and sends a response asynchronously?  Is this called a socket?   I have read that HTML5 provides sockets.</p>
  
  <p>Or, perhaps an AJAX request?  </p>
  
  <p>Or, does the server side of my application create a timer, make the api call, and then "push" updates to the view.  This seems wrong to me, there could be other views in this application, and the server shouldn't have to keep track of which view is active.  </p>
  
  <p>Is there a standard pattern for this type of web application? Any examples or tutorials greatly appreciated. </p>