title: Cap mongodb collection (but not using CappedCollections)
body: <p>I am trying to create a collection which can only have specific number of documents (say 1000 records). However, I cannot use the capped collection because it just deletes the older records(and I want my prog to handle what to delete). Does anyone have any suggestions for a fine way to implement this? I have not found a whole lot of encouraging ideas online.</p>