title: Daemon with Clojure/JVM
body: <p>I'd like to have a small (not doing too damn much) daemon running on a little server, watching a directory for new files being added to it (and any directories in the main one), and calling another Clojure program to deal with that new file. </p>
  
  <p>Ideally, each file would be added to a queue (a list represented by a <code>ref</code> in Clojure?) and the main process would take care of those files in the queue on a FIFO basis. </p>
  
  <p>My question is: is having a JVM up running this little program all the time too much a resource hog? And do you have any suggestions as to how go about doing this?</p>
  
  <p>Thank you very much!</p>
  
  <p>EDIT: Another question I should ask: should I run this as its own instance (using less memory) and have it launch a new JVM when a file is seen, or have it on the same JVM the Clojure code that will process the file?</p>