title: Real time stock watch with node.js angular and socket.io backend mysql and php
body: <p>I am working on new project to display an online stock price screen for a user. We already have this in a combination of php, MySQL and AJAX, but it is very slow and lots of requests are generated on the server. So I want to change the technology. </p>
  
  <p>I have the database in MySQL. One process is already updated: the last price of stock in my database. I fetch those records and display them in the screen. After searching Google, I feel I have to use socket.io, node.js and angularjs. After this I am planning the following:</p>
  
  <ol>
  <li>Front End in angular.js</li>
  <li>Socket.io with nodes.js</li>
  <li>Nodes.js </li>
  <li>Restful API call initiated on nodes.js every 10 seconds for <code>page.php</code>. This page will fetch all symbols of market (around 1000) from the MySQL database and send back a json object. (Can I directly call a MySQL query from node.js and received the json object, and will this reduce the php in-between?)</li>
  <li>Socket.io emits this query to every client connect on the site.</li>
  <li>Then the angular front-end will display only the symbol which is selected by the user and highlight the changes on the screen.</li>
  </ol>
  
  <p>I have the following problems, as I have limited knowledge of the above technologies.</p>
  
  <ol>
  <li>How do I receive the json object from socket.io into angular.js?</li>
  <li>How can I make the logic in the angular page to display only the symbol which user selected from a 1000 symbols response and highlight the change price field only?</li>
  <li>How will I connect three and server with MySQL or php?</li>
  <li>One thing is read for middle ware i can use the expressJS.AS I want my front end in AngularJS how can i fit the express in between Angular and socket.io and node.js</li>
  </ol>