title: receive TCP/IP data on a rails application
body: <p>I have a custom device with a TCP/IP stack implemented that's sending a byte each 5 seconds to a remote IP.</p>
  
  <p>On that remote IP, I'm building a site with rails 3.1.3 that will have to receive, store and display the data sent by the custom device.</p>
  
  <p>I was thinking on having a TCP Socket running in the background, something like <a href="http://www.tutorialspoint.com/ruby/ruby_socket_programming.htm" rel="nofollow">this</a>, but i don't have a clue on how to integrate this with a rails site. Where to place it, how to start it and how to propagate the data to the views.</p>
  
  <p>Does anybody have a clue on how shall I proceed? </p>