title: Client server communication: REST vs Socket architecture
body: <p>What are the advantages and disadvantages of using <strong>only</strong> socket based communication vs a hybrid of REST and socket (using socket only when bidirectional communication is necessary, like receiving messages in a chat).</p>
  
  <p>When I say only socket, I mean that instead of sending a GET request asking for <code>/entities</code>, I'd send <code>update_needed</code> and the server would send a push via socket.</p>
  
  <p>My question is not really about performance, it's more about the concept, like <code>delegate</code> vs <code>block/lambda</code> (using socket would be like the delegate concept and REST is more like block).</p>