use capped collections and unsafe writes to store events