title: Ruby on Rails: keep collecting data in background and store in DB
body: <p>Here is my scenario: I have some data coming into serial port. I want to keep collecting this data and store in the database. Then the rails app uses this data from the database and shows some statistics like graphs and stuff.</p>
  
  <p>So my question is how can I keep collecting this data in a separate thread from the rails app, while the rest of the things work like any other rails app on the database.</p>
  
  <p>If there is a better way of doing this please advice.</p>
  
  <p>PS: I dont have any problem in reading from serial port. This is about doing this task from rails app in separate thread.</p>