Probably need to make the locking mechanism more granular. Only lock the database during db writes, see if we can do multiple readers and a single writer. Otherwise, the daemon will not be able to service requests while an event is being handled, which is not good.