title: Design Guidelines Distributed computing
body: <p>I have a software system that performs OCR on Multiple machine simultaneously. Current system works as follows:</p>
  
  <ol>
  <li>All documents which needs to be ocred are inserted into a table in db.</li>
  <li>Each client ocr machine pools that table and whenever data is found for ocr, it locks table and pick n no. of files for ocr. Locking is used for atomicity.</li>
  <li>After each document is ocred, status of the document is updated as complete.</li>
  </ol>
  
  <p>I know this is a serious mistakes to set a database as a synchronization place. It is running fine but sometimes I can see dead lock on database..</p>
  
  <p>So my question is, What is the better way to design such system, I want database as a storage device only not a synchronizing place. I want to hear your thoughts.</p>